acai-ui-library 0.1.14 → 0.1.16

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.
@@ -88,7 +88,7 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
88
88
  {
89
89
  ref,
90
90
  className: cn(
91
- "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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",
91
+ "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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",
92
92
  className
93
93
  ),
94
94
  ...props
@@ -101,7 +101,7 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
101
101
  ref,
102
102
  sideOffset,
103
103
  className: cn(
104
- "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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",
104
+ "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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",
105
105
  className
106
106
  ),
107
107
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/dropdown-menu.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none focus:bg-[var(--hc-primary-100)] data-[state=open]:bg-[var(--hc-primary-100)]\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ms-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none transition-colors focus:bg-[var(--hc-primary-100)] data-[highlighted]:bg-[var(--hc-primary-600)] data-[highlighted]:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-[12px] py-[6px] text-[14px] font-semibold\", inset && \"ps-8\", className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-[var(--hc-color-border-subtle)]\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ms-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,4BAAuC;AACvC,0BAA4C;;;ACF5C,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADWE;AAXF,IAAM,eAAqC;AAC3C,IAAM,sBAA4C;AAClD,IAAM,oBAA0C;AAChD,IAAM,qBAA2C;AACjD,IAAM,kBAAwC;AAC9C,IAAM,yBAA+C;AAErD,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,4CAAC,oCAAa,WAAU,mBAAkB;AAAA;AAAA;AAC5C,CACD;AACD,uBAAuB,cAAoC,iCAAW;AAEtE,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,uBAAuB,cAAoC,iCAAW;AAEtE,IAAM,sBAA4B,iBAGhC,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C,4CAAuB,8BAAtB,EACC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,oBAAoB,cAAoC,8BAAQ;AAEhE,IAAM,mBAAyB,iBAG7B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAoC,2BAAK;AAE1D,IAAM,2BAAiC,iBAGrC,CAAC,EAAE,WAAW,UAAU,SAAS,GAAG,MAAM,GAAG,QAC7C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,kDAAC,UAAK,WAAU,iEACd,sDAAuB,qCAAtB,EACC,sDAAC,6BAAM,WAAU,WAAU,GAC7B,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,yBAAyB,cAAoC,mCAAa;AAE1E,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,kDAAC,UAAK,WAAU,iEACd,sDAAuB,qCAAtB,EACC,sDAAC,8BAAO,WAAU,wBAAuB,GAC3C,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAEpE,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,gDAAgD,SAAS,QAAQ,SAAS;AAAA,IACvF,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAoC,4BAAM;AAE5D,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,sDAAsD,SAAS;AAAA,IAC5E,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAEpE,IAAM,uBAAuB,CAAC,EAAE,WAAW,GAAG,MAAM,MAClD,4CAAC,UAAK,WAAW,GAAG,8CAA8C,SAAS,GAAI,GAAG,OAAO;AAE3F,qBAAqB,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/dropdown-menu.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none focus:bg-[var(--hc-primary-100)] data-[state=open]:bg-[var(--hc-primary-100)]\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ms-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none transition-colors focus:bg-[var(--hc-primary-100)] data-[highlighted]:bg-[var(--hc-primary-600)] data-[highlighted]:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-[12px] py-[6px] text-[14px] font-semibold\", inset && \"ps-8\", className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-[var(--hc-color-border-subtle)]\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ms-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":"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","names":[]}
@@ -40,7 +40,7 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
40
40
  {
41
41
  ref,
42
42
  className: cn(
43
- "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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",
43
+ "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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",
44
44
  className
45
45
  ),
46
46
  ...props
@@ -53,7 +53,7 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
53
53
  ref,
54
54
  sideOffset,
55
55
  className: cn(
56
- "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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",
56
+ "z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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",
57
57
  className
58
58
  ),
59
59
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/dropdown-menu.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none focus:bg-[var(--hc-primary-100)] data-[state=open]:bg-[var(--hc-primary-100)]\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ms-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm 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\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none transition-colors focus:bg-[var(--hc-primary-100)] data-[highlighted]:bg-[var(--hc-primary-600)] data-[highlighted]:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-[12px] py-[6px] text-[14px] font-semibold\", inset && \"ps-8\", className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-[var(--hc-color-border-subtle)]\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ms-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,YAAY,2BAA2B;AACvC,SAAS,OAAO,cAAc,cAAc;;;ACF5C,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADWE,SAUE,KAVF;AAXF,IAAM,eAAqC;AAC3C,IAAM,sBAA4C;AAClD,IAAM,oBAA0C;AAChD,IAAM,qBAA2C;AACjD,IAAM,kBAAwC;AAC9C,IAAM,yBAA+C;AAErD,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,gBAAa,WAAU,mBAAkB;AAAA;AAAA;AAC5C,CACD;AACD,uBAAuB,cAAoC,iCAAW;AAEtE,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,uBAAuB,cAAoC,iCAAW;AAEtE,IAAM,sBAA4B,iBAGhC,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C,oBAAuB,8BAAtB,EACC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,oBAAoB,cAAoC,8BAAQ;AAEhE,IAAM,mBAAyB,iBAG7B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAoC,2BAAK;AAE1D,IAAM,2BAAiC,iBAGrC,CAAC,EAAE,WAAW,UAAU,SAAS,GAAG,MAAM,GAAG,QAC7C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,iEACd,8BAAuB,qCAAtB,EACC,8BAAC,SAAM,WAAU,WAAU,GAC7B,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,yBAAyB,cAAoC,mCAAa;AAE1E,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,iEACd,8BAAuB,qCAAtB,EACC,8BAAC,UAAO,WAAU,wBAAuB,GAC3C,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAEpE,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,gDAAgD,SAAS,QAAQ,SAAS;AAAA,IACvF,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAoC,4BAAM;AAE5D,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,sDAAsD,SAAS;AAAA,IAC5E,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAEpE,IAAM,uBAAuB,CAAC,EAAE,WAAW,GAAG,MAAM,MAClD,oBAAC,UAAK,WAAW,GAAG,8CAA8C,SAAS,GAAI,GAAG,OAAO;AAE3F,qBAAqB,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/dropdown-menu.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none focus:bg-[var(--hc-primary-100)] data-[state=open]:bg-[var(--hc-primary-100)]\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ms-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-[var(--hc-color-border-subtle)] bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none 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\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[6px] px-[12px] py-[6px] text-[14px] leading-[20px] font-normal text-[var(--hc-grey-700)] outline-none transition-colors focus:bg-[var(--hc-primary-100)] data-[highlighted]:bg-[var(--hc-primary-600)] data-[highlighted]:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"ps-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute start-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-[12px] py-[6px] text-[14px] font-semibold\", inset && \"ps-8\", className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-[var(--hc-color-border-subtle)]\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ms-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":"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","names":[]}
@@ -20,36 +20,82 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/components/sonner.tsx
21
21
  var sonner_exports = {};
22
22
  __export(sonner_exports, {
23
+ ERROR_TOAST_MS: () => ERROR_TOAST_MS,
24
+ TOAST_BOTTOM_OFFSET: () => TOAST_BOTTOM_OFFSET,
25
+ TOAST_DURATION_MS: () => TOAST_DURATION_MS,
23
26
  Toaster: () => Toaster,
24
- toast: () => import_sonner.toast
27
+ toast: () => toast
25
28
  });
26
29
  module.exports = __toCommonJS(sonner_exports);
27
30
  var import_next_themes = require("next-themes");
28
31
  var import_sonner = require("sonner");
29
32
  var import_jsx_runtime = require("react/jsx-runtime");
30
- var Toaster = ({ ...props }) => {
31
- const { theme = "system" } = (0, import_next_themes.useTheme)();
33
+ var TOAST_DURATION_MS = 4e3;
34
+ var ERROR_TOAST_MS = 7e3;
35
+ var TOKENS = {
36
+ "--normal-bg": "var(--hc-color-popover, #fff)",
37
+ "--normal-border": "var(--hc-color-border, rgba(0,0,0,0.12))",
38
+ "--normal-text": "var(--hc-color-popover-fg, #1a1a1e)",
39
+ fontFamily: "inherit"
40
+ };
41
+ var ACCENT = "!border-l-4";
42
+ var CLASS_NAMES = {
43
+ toast: "toast !font-[inherit] !rounded-lg !shadow-lg",
44
+ title: "!font-medium",
45
+ description: "!text-[var(--hc-color-muted-fg,#595961)]",
46
+ actionButton: "!bg-[var(--hc-color-primary,#5542ca)] !text-[var(--hc-color-primary-fg,#fff)]",
47
+ cancelButton: "!bg-[var(--hc-color-muted,#f1f1f1)] !text-[var(--hc-color-popover-fg,#1a1a1e)]",
48
+ closeButton: "!bg-[var(--hc-color-popover,#fff)] !text-[var(--hc-color-muted-fg,#595961)] !border-[var(--hc-color-border,rgba(0,0,0,0.12))]",
49
+ success: `${ACCENT} !border-l-[var(--hc-color-success,#16a34a)] [&_[data-icon]]:!text-[var(--hc-color-success,#16a34a)]`,
50
+ error: `${ACCENT} !border-l-[var(--hc-color-destructive,#dc2626)] [&_[data-icon]]:!text-[var(--hc-color-destructive,#dc2626)]`,
51
+ warning: `${ACCENT} !border-l-[var(--hc-color-warning,#d97706)] [&_[data-icon]]:!text-[var(--hc-color-warning,#d97706)]`,
52
+ info: `${ACCENT} !border-l-[var(--hc-color-primary,#5542ca)] [&_[data-icon]]:!text-[var(--hc-color-primary,#5542ca)]`,
53
+ loading: `${ACCENT} !border-l-[var(--hc-color-muted-fg,#595961)] [&_[data-icon]]:!text-[var(--hc-color-muted-fg,#595961)]`
54
+ };
55
+ var TOAST_BOTTOM_OFFSET = "calc(16px + env(safe-area-inset-bottom, 0px))";
56
+ var Toaster = ({ style, toastOptions, ...props }) => {
57
+ const { resolvedTheme, forcedTheme } = (0, import_next_themes.useTheme)();
32
58
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
33
59
  import_sonner.Toaster,
34
60
  {
35
- theme,
61
+ theme: (forcedTheme ?? resolvedTheme) === "dark" ? "dark" : "light",
36
62
  className: "toaster group",
37
- toastOptions: {
38
- classNames: {
39
- toast: "group toast group-[.toaster]:!bg-white group-[.toaster]:!rounded-[6px] group-[.toaster]:!shadow-lg group-[.toaster]:!border group-[.toaster]:!border-[rgba(0,0,0,0.08)] group-[.toaster]:!p-4 group-[.toaster]:!font-[Inter]",
40
- title: "group-[.toast]:!text-sm group-[.toast]:!leading-[24px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-grey-600)]",
41
- description: "group-[.toast]:!text-xs group-[.toast]:!leading-[18px] group-[.toast]:!text-[var(--hc-grey-600)] group-[.toast]:!font-normal",
42
- actionButton: "group-[.toast]:!text-sm group-[.toast]:!leading-[18px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-primary-600)] group-[.toast]:!bg-transparent group-[.toast]:!p-0",
43
- cancelButton: "group-[.toast]:!bg-transparent group-[.toast]:!text-foreground group-[.toast]:!text-sm group-[.toast]:!font-medium group-[.toast]:!p-0",
44
- closeButton: "group-[.toast]:!text-[var(--hc-grey-300)]"
45
- }
46
- },
63
+ position: "bottom-center",
64
+ offset: { bottom: TOAST_BOTTOM_OFFSET },
65
+ mobileOffset: { bottom: TOAST_BOTTOM_OFFSET },
66
+ visibleToasts: 3,
67
+ duration: TOAST_DURATION_MS,
68
+ closeButton: true,
69
+ style: { ...TOKENS, ...style },
70
+ toastOptions: { ...toastOptions, classNames: { ...CLASS_NAMES, ...toastOptions?.classNames } },
47
71
  ...props
48
72
  }
49
73
  );
50
74
  };
75
+ function withDefaults(kind, message, data) {
76
+ return {
77
+ ...typeof message === "string" && data?.id === void 0 ? { id: `${kind}:${message}` } : {},
78
+ ...kind === "error" && data?.duration === void 0 ? { duration: ERROR_TOAST_MS } : {},
79
+ ...data
80
+ };
81
+ }
82
+ var typed = (kind) => (message, data) => import_sonner.toast[kind](message, withDefaults(kind, message, data));
83
+ var toast = Object.assign(
84
+ (message, data) => (0, import_sonner.toast)(message, data),
85
+ import_sonner.toast,
86
+ {
87
+ success: typed("success"),
88
+ info: typed("info"),
89
+ warning: typed("warning"),
90
+ error: typed("error"),
91
+ message: typed("message")
92
+ }
93
+ );
51
94
  // Annotate the CommonJS export names for ESM import in node:
52
95
  0 && (module.exports = {
96
+ ERROR_TOAST_MS,
97
+ TOAST_BOTTOM_OFFSET,
98
+ TOAST_DURATION_MS,
53
99
  Toaster,
54
100
  toast
55
101
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sonner.tsx"],"sourcesContent":["import { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, toast } from \"sonner\"\nimport { cn } from \"../lib/utils\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:!bg-white group-[.toaster]:!rounded-[6px] group-[.toaster]:!shadow-lg group-[.toaster]:!border group-[.toaster]:!border-[rgba(0,0,0,0.08)] group-[.toaster]:!p-4 group-[.toaster]:!font-[Inter]\",\n title:\n \"group-[.toast]:!text-sm group-[.toast]:!leading-[24px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-grey-600)]\",\n description:\n \"group-[.toast]:!text-xs group-[.toast]:!leading-[18px] group-[.toast]:!text-[var(--hc-grey-600)] group-[.toast]:!font-normal\",\n actionButton:\n \"group-[.toast]:!text-sm group-[.toast]:!leading-[18px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-primary-600)] group-[.toast]:!bg-transparent group-[.toast]:!p-0\",\n cancelButton:\n \"group-[.toast]:!bg-transparent group-[.toast]:!text-foreground group-[.toast]:!text-sm group-[.toast]:!font-medium group-[.toast]:!p-0\",\n closeButton:\n \"group-[.toast]:!text-[var(--hc-grey-300)]\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster, toast }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAyB;AACzB,oBAAyC;AASrC;AAJJ,IAAM,UAAU,CAAC,EAAE,GAAG,MAAM,MAAoB;AAC9C,QAAM,EAAE,QAAQ,SAAS,QAAI,6BAAS;AAEtC,SACE;AAAA,IAAC,cAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAU;AAAA,MACV,cAAc;AAAA,QACZ,YAAY;AAAA,UACV,OACE;AAAA,UACF,OACE;AAAA,UACF,aACE;AAAA,UACF,cACE;AAAA,UACF,cACE;AAAA,UACF,aACE;AAAA,QACJ;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["Sonner"]}
1
+ {"version":3,"sources":["../../src/components/sonner.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\"\nimport { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, toast as sonnerToast, type ExternalToast } from \"sonner\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nexport const TOAST_DURATION_MS = 4000\n/** Errors stay up longer: they usually need reading, and often a retry. */\nexport const ERROR_TOAST_MS = 7000\n\n/*\n * Colours come from the app's --hc-color-* tokens (acai-ui-library/styles), set as\n * sonner's own CSS variables, so light and dark follow the theme. Fallbacks keep it\n * readable if an app has not loaded the tokens.\n */\nconst TOKENS = {\n \"--normal-bg\": \"var(--hc-color-popover, #fff)\",\n \"--normal-border\": \"var(--hc-color-border, rgba(0,0,0,0.12))\",\n \"--normal-text\": \"var(--hc-color-popover-fg, #1a1a1e)\",\n fontFamily: \"inherit\",\n} as CSSProperties\n\nconst ACCENT = \"!border-l-4\"\n\n/** Per type: a coloured left accent and icon colour; the text stays popover-fg on popover. */\nconst CLASS_NAMES: NonNullable<NonNullable<ToasterProps[\"toastOptions\"]>[\"classNames\"]> = {\n toast: \"toast !font-[inherit] !rounded-lg !shadow-lg\",\n title: \"!font-medium\",\n description: \"!text-[var(--hc-color-muted-fg,#595961)]\",\n actionButton: \"!bg-[var(--hc-color-primary,#5542ca)] !text-[var(--hc-color-primary-fg,#fff)]\",\n cancelButton: \"!bg-[var(--hc-color-muted,#f1f1f1)] !text-[var(--hc-color-popover-fg,#1a1a1e)]\",\n closeButton:\n \"!bg-[var(--hc-color-popover,#fff)] !text-[var(--hc-color-muted-fg,#595961)] !border-[var(--hc-color-border,rgba(0,0,0,0.12))]\",\n success: `${ACCENT} !border-l-[var(--hc-color-success,#16a34a)] [&_[data-icon]]:!text-[var(--hc-color-success,#16a34a)]`,\n error: `${ACCENT} !border-l-[var(--hc-color-destructive,#dc2626)] [&_[data-icon]]:!text-[var(--hc-color-destructive,#dc2626)]`,\n warning: `${ACCENT} !border-l-[var(--hc-color-warning,#d97706)] [&_[data-icon]]:!text-[var(--hc-color-warning,#d97706)]`,\n info: `${ACCENT} !border-l-[var(--hc-color-primary,#5542ca)] [&_[data-icon]]:!text-[var(--hc-color-primary,#5542ca)]`,\n loading: `${ACCENT} !border-l-[var(--hc-color-muted-fg,#595961)] [&_[data-icon]]:!text-[var(--hc-color-muted-fg,#595961)]`,\n}\n\n/** 16px above the bottom edge plus the safe area, clear of mobile bottom tab bars. */\nexport const TOAST_BOTTOM_OFFSET = \"calc(16px + env(safe-area-inset-bottom, 0px))\"\n\n/**\n * The one Toaster for an app: render it once in the root layout, with no props.\n * Bottom-center, three visible, 4 s (errors 7 s), close button, theme-following colours,\n * the app's own font.\n */\nconst Toaster = ({ style, toastOptions, ...props }: ToasterProps) => {\n const { resolvedTheme, forcedTheme } = useTheme()\n\n return (\n <Sonner\n theme={(forcedTheme ?? resolvedTheme) === \"dark\" ? \"dark\" : \"light\"}\n className=\"toaster group\"\n position=\"bottom-center\"\n offset={{ bottom: TOAST_BOTTOM_OFFSET }}\n mobileOffset={{ bottom: TOAST_BOTTOM_OFFSET }}\n visibleToasts={3}\n duration={TOAST_DURATION_MS}\n closeButton\n style={{ ...TOKENS, ...style }}\n toastOptions={{ ...toastOptions, classNames: { ...CLASS_NAMES, ...toastOptions?.classNames } }}\n {...props}\n />\n )\n}\n\ntype Typed = \"success\" | \"info\" | \"warning\" | \"error\" | \"message\"\n\n/*\n * Errors default to 7 s. A string message gets its own text as the toast id unless the\n * caller passes one, so the same message fired twice (a double click, a retried mutation)\n * updates the toast already showing instead of stacking a copy.\n */\nfunction withDefaults(kind: Typed, message: unknown, data?: ExternalToast): ExternalToast {\n return {\n ...(typeof message === \"string\" && data?.id === undefined ? { id: `${kind}:${message}` } : {}),\n ...(kind === \"error\" && data?.duration === undefined ? { duration: ERROR_TOAST_MS } : {}),\n ...data,\n }\n}\n\nconst typed =\n (kind: Typed): (typeof sonnerToast)[Typed] =>\n (message, data) =>\n sonnerToast[kind](message, withDefaults(kind, message, data))\n\n/** sonner's `toast`, same API (promise, loading, custom, dismiss, action), with the defaults above. */\nconst toast: typeof sonnerToast = Object.assign(\n (message: Parameters<typeof sonnerToast>[0], data?: ExternalToast) => sonnerToast(message, data),\n sonnerToast,\n {\n success: typed(\"success\"),\n info: typed(\"info\"),\n warning: typed(\"warning\"),\n error: typed(\"error\"),\n message: typed(\"message\"),\n },\n)\n\nexport { Toaster, toast }\nexport type { ToasterProps, ExternalToast }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,yBAAyB;AACzB,oBAA4E;AAkDxE;AA9CG,IAAM,oBAAoB;AAE1B,IAAM,iBAAiB;AAO9B,IAAM,SAAS;AAAA,EACb,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,YAAY;AACd;AAEA,IAAM,SAAS;AAGf,IAAM,cAAoF;AAAA,EACxF,OAAO;AAAA,EACP,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aACE;AAAA,EACF,SAAS,GAAG,MAAM;AAAA,EAClB,OAAO,GAAG,MAAM;AAAA,EAChB,SAAS,GAAG,MAAM;AAAA,EAClB,MAAM,GAAG,MAAM;AAAA,EACf,SAAS,GAAG,MAAM;AACpB;AAGO,IAAM,sBAAsB;AAOnC,IAAM,UAAU,CAAC,EAAE,OAAO,cAAc,GAAG,MAAM,MAAoB;AACnE,QAAM,EAAE,eAAe,YAAY,QAAI,6BAAS;AAEhD,SACE;AAAA,IAAC,cAAAA;AAAA,IAAA;AAAA,MACC,QAAQ,eAAe,mBAAmB,SAAS,SAAS;AAAA,MAC5D,WAAU;AAAA,MACV,UAAS;AAAA,MACT,QAAQ,EAAE,QAAQ,oBAAoB;AAAA,MACtC,cAAc,EAAE,QAAQ,oBAAoB;AAAA,MAC5C,eAAe;AAAA,MACf,UAAU;AAAA,MACV,aAAW;AAAA,MACX,OAAO,EAAE,GAAG,QAAQ,GAAG,MAAM;AAAA,MAC7B,cAAc,EAAE,GAAG,cAAc,YAAY,EAAE,GAAG,aAAa,GAAG,cAAc,WAAW,EAAE;AAAA,MAC5F,GAAG;AAAA;AAAA,EACN;AAEJ;AASA,SAAS,aAAa,MAAa,SAAkB,MAAqC;AACxF,SAAO;AAAA,IACL,GAAI,OAAO,YAAY,YAAY,MAAM,OAAO,SAAY,EAAE,IAAI,GAAG,IAAI,IAAI,OAAO,GAAG,IAAI,CAAC;AAAA,IAC5F,GAAI,SAAS,WAAW,MAAM,aAAa,SAAY,EAAE,UAAU,eAAe,IAAI,CAAC;AAAA,IACvF,GAAG;AAAA,EACL;AACF;AAEA,IAAM,QACJ,CAAC,SACD,CAAC,SAAS,SACR,cAAAC,MAAY,IAAI,EAAE,SAAS,aAAa,MAAM,SAAS,IAAI,CAAC;AAGhE,IAAM,QAA4B,OAAO;AAAA,EACvC,CAAC,SAA4C,aAAyB,cAAAA,OAAY,SAAS,IAAI;AAAA,EAC/F,cAAAA;AAAA,EACA;AAAA,IACE,SAAS,MAAM,SAAS;AAAA,IACxB,MAAM,MAAM,MAAM;AAAA,IAClB,SAAS,MAAM,SAAS;AAAA,IACxB,OAAO,MAAM,OAAO;AAAA,IACpB,SAAS,MAAM,SAAS;AAAA,EAC1B;AACF;","names":["Sonner","sonnerToast"]}
@@ -1,8 +1,20 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Toaster as Toaster$1 } from 'sonner';
3
- export { toast } from 'sonner';
2
+ import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
3
+ export { ExternalToast } from 'sonner';
4
4
 
5
5
  type ToasterProps = React.ComponentProps<typeof Toaster$1>;
6
- declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
6
+ declare const TOAST_DURATION_MS = 4000;
7
+ /** Errors stay up longer: they usually need reading, and often a retry. */
8
+ declare const ERROR_TOAST_MS = 7000;
9
+ /** 16px above the bottom edge plus the safe area, clear of mobile bottom tab bars. */
10
+ declare const TOAST_BOTTOM_OFFSET = "calc(16px + env(safe-area-inset-bottom, 0px))";
11
+ /**
12
+ * The one Toaster for an app: render it once in the root layout, with no props.
13
+ * Bottom-center, three visible, 4 s (errors 7 s), close button, theme-following colours,
14
+ * the app's own font.
15
+ */
16
+ declare const Toaster: ({ style, toastOptions, ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
17
+ /** sonner's `toast`, same API (promise, loading, custom, dismiss, action), with the defaults above. */
18
+ declare const toast: typeof toast$1;
7
19
 
8
- export { Toaster };
20
+ export { ERROR_TOAST_MS, TOAST_BOTTOM_OFFSET, TOAST_DURATION_MS, Toaster, type ToasterProps, toast };
@@ -1,8 +1,20 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Toaster as Toaster$1 } from 'sonner';
3
- export { toast } from 'sonner';
2
+ import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
3
+ export { ExternalToast } from 'sonner';
4
4
 
5
5
  type ToasterProps = React.ComponentProps<typeof Toaster$1>;
6
- declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
6
+ declare const TOAST_DURATION_MS = 4000;
7
+ /** Errors stay up longer: they usually need reading, and often a retry. */
8
+ declare const ERROR_TOAST_MS = 7000;
9
+ /** 16px above the bottom edge plus the safe area, clear of mobile bottom tab bars. */
10
+ declare const TOAST_BOTTOM_OFFSET = "calc(16px + env(safe-area-inset-bottom, 0px))";
11
+ /**
12
+ * The one Toaster for an app: render it once in the root layout, with no props.
13
+ * Bottom-center, three visible, 4 s (errors 7 s), close button, theme-following colours,
14
+ * the app's own font.
15
+ */
16
+ declare const Toaster: ({ style, toastOptions, ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
17
+ /** sonner's `toast`, same API (promise, loading, custom, dismiss, action), with the defaults above. */
18
+ declare const toast: typeof toast$1;
7
19
 
8
- export { Toaster };
20
+ export { ERROR_TOAST_MS, TOAST_BOTTOM_OFFSET, TOAST_DURATION_MS, Toaster, type ToasterProps, toast };
@@ -1,29 +1,72 @@
1
1
  // src/components/sonner.tsx
2
2
  import { useTheme } from "next-themes";
3
- import { Toaster as Sonner, toast } from "sonner";
3
+ import { Toaster as Sonner, toast as sonnerToast } from "sonner";
4
4
  import { jsx } from "react/jsx-runtime";
5
- var Toaster = ({ ...props }) => {
6
- const { theme = "system" } = useTheme();
5
+ var TOAST_DURATION_MS = 4e3;
6
+ var ERROR_TOAST_MS = 7e3;
7
+ var TOKENS = {
8
+ "--normal-bg": "var(--hc-color-popover, #fff)",
9
+ "--normal-border": "var(--hc-color-border, rgba(0,0,0,0.12))",
10
+ "--normal-text": "var(--hc-color-popover-fg, #1a1a1e)",
11
+ fontFamily: "inherit"
12
+ };
13
+ var ACCENT = "!border-l-4";
14
+ var CLASS_NAMES = {
15
+ toast: "toast !font-[inherit] !rounded-lg !shadow-lg",
16
+ title: "!font-medium",
17
+ description: "!text-[var(--hc-color-muted-fg,#595961)]",
18
+ actionButton: "!bg-[var(--hc-color-primary,#5542ca)] !text-[var(--hc-color-primary-fg,#fff)]",
19
+ cancelButton: "!bg-[var(--hc-color-muted,#f1f1f1)] !text-[var(--hc-color-popover-fg,#1a1a1e)]",
20
+ closeButton: "!bg-[var(--hc-color-popover,#fff)] !text-[var(--hc-color-muted-fg,#595961)] !border-[var(--hc-color-border,rgba(0,0,0,0.12))]",
21
+ success: `${ACCENT} !border-l-[var(--hc-color-success,#16a34a)] [&_[data-icon]]:!text-[var(--hc-color-success,#16a34a)]`,
22
+ error: `${ACCENT} !border-l-[var(--hc-color-destructive,#dc2626)] [&_[data-icon]]:!text-[var(--hc-color-destructive,#dc2626)]`,
23
+ warning: `${ACCENT} !border-l-[var(--hc-color-warning,#d97706)] [&_[data-icon]]:!text-[var(--hc-color-warning,#d97706)]`,
24
+ info: `${ACCENT} !border-l-[var(--hc-color-primary,#5542ca)] [&_[data-icon]]:!text-[var(--hc-color-primary,#5542ca)]`,
25
+ loading: `${ACCENT} !border-l-[var(--hc-color-muted-fg,#595961)] [&_[data-icon]]:!text-[var(--hc-color-muted-fg,#595961)]`
26
+ };
27
+ var TOAST_BOTTOM_OFFSET = "calc(16px + env(safe-area-inset-bottom, 0px))";
28
+ var Toaster = ({ style, toastOptions, ...props }) => {
29
+ const { resolvedTheme, forcedTheme } = useTheme();
7
30
  return /* @__PURE__ */ jsx(
8
31
  Sonner,
9
32
  {
10
- theme,
33
+ theme: (forcedTheme ?? resolvedTheme) === "dark" ? "dark" : "light",
11
34
  className: "toaster group",
12
- toastOptions: {
13
- classNames: {
14
- toast: "group toast group-[.toaster]:!bg-white group-[.toaster]:!rounded-[6px] group-[.toaster]:!shadow-lg group-[.toaster]:!border group-[.toaster]:!border-[rgba(0,0,0,0.08)] group-[.toaster]:!p-4 group-[.toaster]:!font-[Inter]",
15
- title: "group-[.toast]:!text-sm group-[.toast]:!leading-[24px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-grey-600)]",
16
- description: "group-[.toast]:!text-xs group-[.toast]:!leading-[18px] group-[.toast]:!text-[var(--hc-grey-600)] group-[.toast]:!font-normal",
17
- actionButton: "group-[.toast]:!text-sm group-[.toast]:!leading-[18px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-primary-600)] group-[.toast]:!bg-transparent group-[.toast]:!p-0",
18
- cancelButton: "group-[.toast]:!bg-transparent group-[.toast]:!text-foreground group-[.toast]:!text-sm group-[.toast]:!font-medium group-[.toast]:!p-0",
19
- closeButton: "group-[.toast]:!text-[var(--hc-grey-300)]"
20
- }
21
- },
35
+ position: "bottom-center",
36
+ offset: { bottom: TOAST_BOTTOM_OFFSET },
37
+ mobileOffset: { bottom: TOAST_BOTTOM_OFFSET },
38
+ visibleToasts: 3,
39
+ duration: TOAST_DURATION_MS,
40
+ closeButton: true,
41
+ style: { ...TOKENS, ...style },
42
+ toastOptions: { ...toastOptions, classNames: { ...CLASS_NAMES, ...toastOptions?.classNames } },
22
43
  ...props
23
44
  }
24
45
  );
25
46
  };
47
+ function withDefaults(kind, message, data) {
48
+ return {
49
+ ...typeof message === "string" && data?.id === void 0 ? { id: `${kind}:${message}` } : {},
50
+ ...kind === "error" && data?.duration === void 0 ? { duration: ERROR_TOAST_MS } : {},
51
+ ...data
52
+ };
53
+ }
54
+ var typed = (kind) => (message, data) => sonnerToast[kind](message, withDefaults(kind, message, data));
55
+ var toast = Object.assign(
56
+ (message, data) => sonnerToast(message, data),
57
+ sonnerToast,
58
+ {
59
+ success: typed("success"),
60
+ info: typed("info"),
61
+ warning: typed("warning"),
62
+ error: typed("error"),
63
+ message: typed("message")
64
+ }
65
+ );
26
66
  export {
67
+ ERROR_TOAST_MS,
68
+ TOAST_BOTTOM_OFFSET,
69
+ TOAST_DURATION_MS,
27
70
  Toaster,
28
71
  toast
29
72
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sonner.tsx"],"sourcesContent":["import { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, toast } from \"sonner\"\nimport { cn } from \"../lib/utils\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:!bg-white group-[.toaster]:!rounded-[6px] group-[.toaster]:!shadow-lg group-[.toaster]:!border group-[.toaster]:!border-[rgba(0,0,0,0.08)] group-[.toaster]:!p-4 group-[.toaster]:!font-[Inter]\",\n title:\n \"group-[.toast]:!text-sm group-[.toast]:!leading-[24px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-grey-600)]\",\n description:\n \"group-[.toast]:!text-xs group-[.toast]:!leading-[18px] group-[.toast]:!text-[var(--hc-grey-600)] group-[.toast]:!font-normal\",\n actionButton:\n \"group-[.toast]:!text-sm group-[.toast]:!leading-[18px] group-[.toast]:!font-medium group-[.toast]:!text-[var(--hc-primary-600)] group-[.toast]:!bg-transparent group-[.toast]:!p-0\",\n cancelButton:\n \"group-[.toast]:!bg-transparent group-[.toast]:!text-foreground group-[.toast]:!text-sm group-[.toast]:!font-medium group-[.toast]:!p-0\",\n closeButton:\n \"group-[.toast]:!text-[var(--hc-grey-300)]\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster, toast }\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,WAAW,QAAQ,aAAa;AASrC;AAJJ,IAAM,UAAU,CAAC,EAAE,GAAG,MAAM,MAAoB;AAC9C,QAAM,EAAE,QAAQ,SAAS,IAAI,SAAS;AAEtC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAU;AAAA,MACV,cAAc;AAAA,QACZ,YAAY;AAAA,UACV,OACE;AAAA,UACF,OACE;AAAA,UACF,aACE;AAAA,UACF,cACE;AAAA,UACF,cACE;AAAA,UACF,aACE;AAAA,QACJ;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/sonner.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\"\nimport { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, toast as sonnerToast, type ExternalToast } from \"sonner\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nexport const TOAST_DURATION_MS = 4000\n/** Errors stay up longer: they usually need reading, and often a retry. */\nexport const ERROR_TOAST_MS = 7000\n\n/*\n * Colours come from the app's --hc-color-* tokens (acai-ui-library/styles), set as\n * sonner's own CSS variables, so light and dark follow the theme. Fallbacks keep it\n * readable if an app has not loaded the tokens.\n */\nconst TOKENS = {\n \"--normal-bg\": \"var(--hc-color-popover, #fff)\",\n \"--normal-border\": \"var(--hc-color-border, rgba(0,0,0,0.12))\",\n \"--normal-text\": \"var(--hc-color-popover-fg, #1a1a1e)\",\n fontFamily: \"inherit\",\n} as CSSProperties\n\nconst ACCENT = \"!border-l-4\"\n\n/** Per type: a coloured left accent and icon colour; the text stays popover-fg on popover. */\nconst CLASS_NAMES: NonNullable<NonNullable<ToasterProps[\"toastOptions\"]>[\"classNames\"]> = {\n toast: \"toast !font-[inherit] !rounded-lg !shadow-lg\",\n title: \"!font-medium\",\n description: \"!text-[var(--hc-color-muted-fg,#595961)]\",\n actionButton: \"!bg-[var(--hc-color-primary,#5542ca)] !text-[var(--hc-color-primary-fg,#fff)]\",\n cancelButton: \"!bg-[var(--hc-color-muted,#f1f1f1)] !text-[var(--hc-color-popover-fg,#1a1a1e)]\",\n closeButton:\n \"!bg-[var(--hc-color-popover,#fff)] !text-[var(--hc-color-muted-fg,#595961)] !border-[var(--hc-color-border,rgba(0,0,0,0.12))]\",\n success: `${ACCENT} !border-l-[var(--hc-color-success,#16a34a)] [&_[data-icon]]:!text-[var(--hc-color-success,#16a34a)]`,\n error: `${ACCENT} !border-l-[var(--hc-color-destructive,#dc2626)] [&_[data-icon]]:!text-[var(--hc-color-destructive,#dc2626)]`,\n warning: `${ACCENT} !border-l-[var(--hc-color-warning,#d97706)] [&_[data-icon]]:!text-[var(--hc-color-warning,#d97706)]`,\n info: `${ACCENT} !border-l-[var(--hc-color-primary,#5542ca)] [&_[data-icon]]:!text-[var(--hc-color-primary,#5542ca)]`,\n loading: `${ACCENT} !border-l-[var(--hc-color-muted-fg,#595961)] [&_[data-icon]]:!text-[var(--hc-color-muted-fg,#595961)]`,\n}\n\n/** 16px above the bottom edge plus the safe area, clear of mobile bottom tab bars. */\nexport const TOAST_BOTTOM_OFFSET = \"calc(16px + env(safe-area-inset-bottom, 0px))\"\n\n/**\n * The one Toaster for an app: render it once in the root layout, with no props.\n * Bottom-center, three visible, 4 s (errors 7 s), close button, theme-following colours,\n * the app's own font.\n */\nconst Toaster = ({ style, toastOptions, ...props }: ToasterProps) => {\n const { resolvedTheme, forcedTheme } = useTheme()\n\n return (\n <Sonner\n theme={(forcedTheme ?? resolvedTheme) === \"dark\" ? \"dark\" : \"light\"}\n className=\"toaster group\"\n position=\"bottom-center\"\n offset={{ bottom: TOAST_BOTTOM_OFFSET }}\n mobileOffset={{ bottom: TOAST_BOTTOM_OFFSET }}\n visibleToasts={3}\n duration={TOAST_DURATION_MS}\n closeButton\n style={{ ...TOKENS, ...style }}\n toastOptions={{ ...toastOptions, classNames: { ...CLASS_NAMES, ...toastOptions?.classNames } }}\n {...props}\n />\n )\n}\n\ntype Typed = \"success\" | \"info\" | \"warning\" | \"error\" | \"message\"\n\n/*\n * Errors default to 7 s. A string message gets its own text as the toast id unless the\n * caller passes one, so the same message fired twice (a double click, a retried mutation)\n * updates the toast already showing instead of stacking a copy.\n */\nfunction withDefaults(kind: Typed, message: unknown, data?: ExternalToast): ExternalToast {\n return {\n ...(typeof message === \"string\" && data?.id === undefined ? { id: `${kind}:${message}` } : {}),\n ...(kind === \"error\" && data?.duration === undefined ? { duration: ERROR_TOAST_MS } : {}),\n ...data,\n }\n}\n\nconst typed =\n (kind: Typed): (typeof sonnerToast)[Typed] =>\n (message, data) =>\n sonnerToast[kind](message, withDefaults(kind, message, data))\n\n/** sonner's `toast`, same API (promise, loading, custom, dismiss, action), with the defaults above. */\nconst toast: typeof sonnerToast = Object.assign(\n (message: Parameters<typeof sonnerToast>[0], data?: ExternalToast) => sonnerToast(message, data),\n sonnerToast,\n {\n success: typed(\"success\"),\n info: typed(\"info\"),\n warning: typed(\"warning\"),\n error: typed(\"error\"),\n message: typed(\"message\"),\n },\n)\n\nexport { Toaster, toast }\nexport type { ToasterProps, ExternalToast }\n"],"mappings":";AACA,SAAS,gBAAgB;AACzB,SAAS,WAAW,QAAQ,SAAS,mBAAuC;AAkDxE;AA9CG,IAAM,oBAAoB;AAE1B,IAAM,iBAAiB;AAO9B,IAAM,SAAS;AAAA,EACb,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,YAAY;AACd;AAEA,IAAM,SAAS;AAGf,IAAM,cAAoF;AAAA,EACxF,OAAO;AAAA,EACP,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aACE;AAAA,EACF,SAAS,GAAG,MAAM;AAAA,EAClB,OAAO,GAAG,MAAM;AAAA,EAChB,SAAS,GAAG,MAAM;AAAA,EAClB,MAAM,GAAG,MAAM;AAAA,EACf,SAAS,GAAG,MAAM;AACpB;AAGO,IAAM,sBAAsB;AAOnC,IAAM,UAAU,CAAC,EAAE,OAAO,cAAc,GAAG,MAAM,MAAoB;AACnE,QAAM,EAAE,eAAe,YAAY,IAAI,SAAS;AAEhD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ,eAAe,mBAAmB,SAAS,SAAS;AAAA,MAC5D,WAAU;AAAA,MACV,UAAS;AAAA,MACT,QAAQ,EAAE,QAAQ,oBAAoB;AAAA,MACtC,cAAc,EAAE,QAAQ,oBAAoB;AAAA,MAC5C,eAAe;AAAA,MACf,UAAU;AAAA,MACV,aAAW;AAAA,MACX,OAAO,EAAE,GAAG,QAAQ,GAAG,MAAM;AAAA,MAC7B,cAAc,EAAE,GAAG,cAAc,YAAY,EAAE,GAAG,aAAa,GAAG,cAAc,WAAW,EAAE;AAAA,MAC5F,GAAG;AAAA;AAAA,EACN;AAEJ;AASA,SAAS,aAAa,MAAa,SAAkB,MAAqC;AACxF,SAAO;AAAA,IACL,GAAI,OAAO,YAAY,YAAY,MAAM,OAAO,SAAY,EAAE,IAAI,GAAG,IAAI,IAAI,OAAO,GAAG,IAAI,CAAC;AAAA,IAC5F,GAAI,SAAS,WAAW,MAAM,aAAa,SAAY,EAAE,UAAU,eAAe,IAAI,CAAC;AAAA,IACvF,GAAG;AAAA,EACL;AACF;AAEA,IAAM,QACJ,CAAC,SACD,CAAC,SAAS,SACR,YAAY,IAAI,EAAE,SAAS,aAAa,MAAM,SAAS,IAAI,CAAC;AAGhE,IAAM,QAA4B,OAAO;AAAA,EACvC,CAAC,SAA4C,SAAyB,YAAY,SAAS,IAAI;AAAA,EAC/F;AAAA,EACA;AAAA,IACE,SAAS,MAAM,SAAS;AAAA,IACxB,MAAM,MAAM,MAAM;AAAA,IAClB,SAAS,MAAM,SAAS;AAAA,IACxB,OAAO,MAAM,OAAO;AAAA,IACpB,SAAS,MAAM,SAAS;AAAA,EAC1B;AACF;","names":[]}
@@ -48,7 +48,7 @@ function cn(...inputs) {
48
48
  // src/components/switch.tsx
49
49
  var import_jsx_runtime = require("react/jsx-runtime");
50
50
  var switchVariants = (0, import_class_variance_authority.cva)(
51
- "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-200)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2",
51
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-400,#7C7C83)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2",
52
52
  {
53
53
  variants: {
54
54
  variant: {
@@ -83,7 +83,7 @@ var Switch = React.forwardRef(({ className, variant, size = "default", ...props
83
83
  SwitchPrimitives.Thumb,
84
84
  {
85
85
  className: cn(
86
- "pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300)]",
86
+ "pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300,#A2A2A6)]",
87
87
  thumbStyles[size ?? "default"]
88
88
  )
89
89
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/switch.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../lib/utils\"\n\ntype SwitchSize = \"sm\" | \"default\" | \"lg\"\n\nconst switchVariants = cva(\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-200)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"data-[state=checked]:bg-[var(--hc-primary-600)]\",\n destructive: \"data-[state=checked]:bg-destructive\",\n success: \"data-[state=checked]:bg-success\",\n },\n size: {\n sm: \"h-5 w-9\",\n default: \"h-[28px] w-[52px]\",\n lg: \"h-[36px] w-[64px]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst thumbStyles: Record<SwitchSize, string> = {\n sm: \"h-3.5 w-3.5 data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[15px]\",\n default:\n \"h-[22px] w-[22px] data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[23px]\",\n lg: \"h-[26px] w-[26px] data-[state=unchecked]:translate-x-[4px] data-[state=checked]:translate-x-[30px]\",\n}\n\nexport interface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>,\n VariantProps<typeof switchVariants> {}\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n SwitchProps\n>(({ className, variant, size = \"default\", ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(switchVariants({ variant, size }), className)}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300)]\",\n thumbStyles[(size ?? \"default\") as SwitchSize]\n )}\n />\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch, switchVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,uBAAkC;AAClC,sCAAuC;;;ACFvC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD4CI;AA1CJ,IAAM,qBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEA,IAAM,cAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,SACE;AAAA,EACF,IAAI;AACN;AAMA,IAAM,SAAe,iBAGnB,CAAC,EAAE,WAAW,SAAS,OAAO,WAAW,GAAG,MAAM,GAAG,QACrD;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,eAAe,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,IACzD,GAAG;AAAA,IACJ;AAAA,IAEA;AAAA,MAAkB;AAAA,MAAjB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAa,QAAQ,SAAwB;AAAA,QAC/C;AAAA;AAAA,IACF;AAAA;AACF,CACD;AACD,OAAO,cAA+B,sBAAK;","names":[]}
1
+ {"version":3,"sources":["../../src/components/switch.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../lib/utils\"\n\ntype SwitchSize = \"sm\" | \"default\" | \"lg\"\n\n// Unchecked track: grey-400 (>=3:1 on white and on dark surfaces); the fallback covers apps that do not load the library tokens.\nconst switchVariants = cva(\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-400,#7C7C83)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"data-[state=checked]:bg-[var(--hc-primary-600)]\",\n destructive: \"data-[state=checked]:bg-destructive\",\n success: \"data-[state=checked]:bg-success\",\n },\n size: {\n sm: \"h-5 w-9\",\n default: \"h-[28px] w-[52px]\",\n lg: \"h-[36px] w-[64px]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst thumbStyles: Record<SwitchSize, string> = {\n sm: \"h-3.5 w-3.5 data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[15px]\",\n default:\n \"h-[22px] w-[22px] data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[23px]\",\n lg: \"h-[26px] w-[26px] data-[state=unchecked]:translate-x-[4px] data-[state=checked]:translate-x-[30px]\",\n}\n\nexport interface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>,\n VariantProps<typeof switchVariants> {}\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n SwitchProps\n>(({ className, variant, size = \"default\", ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(switchVariants({ variant, size }), className)}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300,#A2A2A6)]\",\n thumbStyles[(size ?? \"default\") as SwitchSize]\n )}\n />\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch, switchVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,uBAAkC;AAClC,sCAAuC;;;ACFvC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD6CI;AA1CJ,IAAM,qBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEA,IAAM,cAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,SACE;AAAA,EACF,IAAI;AACN;AAMA,IAAM,SAAe,iBAGnB,CAAC,EAAE,WAAW,SAAS,OAAO,WAAW,GAAG,MAAM,GAAG,QACrD;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,eAAe,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,IACzD,GAAG;AAAA,IACJ;AAAA,IAEA;AAAA,MAAkB;AAAA,MAAjB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAa,QAAQ,SAAwB;AAAA,QAC/C;AAAA;AAAA,IACF;AAAA;AACF,CACD;AACD,OAAO,cAA+B,sBAAK;","names":[]}
@@ -13,7 +13,7 @@ function cn(...inputs) {
13
13
  // src/components/switch.tsx
14
14
  import { jsx } from "react/jsx-runtime";
15
15
  var switchVariants = cva(
16
- "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-200)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2",
16
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-400,#7C7C83)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2",
17
17
  {
18
18
  variants: {
19
19
  variant: {
@@ -48,7 +48,7 @@ var Switch = React.forwardRef(({ className, variant, size = "default", ...props
48
48
  SwitchPrimitives.Thumb,
49
49
  {
50
50
  className: cn(
51
- "pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300)]",
51
+ "pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300,#A2A2A6)]",
52
52
  thumbStyles[size ?? "default"]
53
53
  )
54
54
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/switch.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../lib/utils\"\n\ntype SwitchSize = \"sm\" | \"default\" | \"lg\"\n\nconst switchVariants = cva(\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-200)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"data-[state=checked]:bg-[var(--hc-primary-600)]\",\n destructive: \"data-[state=checked]:bg-destructive\",\n success: \"data-[state=checked]:bg-success\",\n },\n size: {\n sm: \"h-5 w-9\",\n default: \"h-[28px] w-[52px]\",\n lg: \"h-[36px] w-[64px]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst thumbStyles: Record<SwitchSize, string> = {\n sm: \"h-3.5 w-3.5 data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[15px]\",\n default:\n \"h-[22px] w-[22px] data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[23px]\",\n lg: \"h-[26px] w-[26px] data-[state=unchecked]:translate-x-[4px] data-[state=checked]:translate-x-[30px]\",\n}\n\nexport interface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>,\n VariantProps<typeof switchVariants> {}\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n SwitchProps\n>(({ className, variant, size = \"default\", ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(switchVariants({ variant, size }), className)}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300)]\",\n thumbStyles[(size ?? \"default\") as SwitchSize]\n )}\n />\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch, switchVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAClC,SAAS,WAA8B;;;ACFvC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD4CI;AA1CJ,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEA,IAAM,cAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,SACE;AAAA,EACF,IAAI;AACN;AAMA,IAAM,SAAe,iBAGnB,CAAC,EAAE,WAAW,SAAS,OAAO,WAAW,GAAG,MAAM,GAAG,QACrD;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,eAAe,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,IACzD,GAAG;AAAA,IACJ;AAAA,IAEA;AAAA,MAAkB;AAAA,MAAjB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAa,QAAQ,SAAwB;AAAA,QAC/C;AAAA;AAAA,IACF;AAAA;AACF,CACD;AACD,OAAO,cAA+B,sBAAK;","names":[]}
1
+ {"version":3,"sources":["../../src/components/switch.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../lib/utils\"\n\ntype SwitchSize = \"sm\" | \"default\" | \"lg\"\n\n// Unchecked track: grey-400 (>=3:1 on white and on dark surfaces); the fallback covers apps that do not load the library tokens.\nconst switchVariants = cva(\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-[var(--hc-grey-400,#7C7C83)] aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive aria-[invalid=true]:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"data-[state=checked]:bg-[var(--hc-primary-600)]\",\n destructive: \"data-[state=checked]:bg-destructive\",\n success: \"data-[state=checked]:bg-success\",\n },\n size: {\n sm: \"h-5 w-9\",\n default: \"h-[28px] w-[52px]\",\n lg: \"h-[36px] w-[64px]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst thumbStyles: Record<SwitchSize, string> = {\n sm: \"h-3.5 w-3.5 data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[15px]\",\n default:\n \"h-[22px] w-[22px] data-[state=unchecked]:translate-x-[3px] data-[state=checked]:translate-x-[23px]\",\n lg: \"h-[26px] w-[26px] data-[state=unchecked]:translate-x-[4px] data-[state=checked]:translate-x-[30px]\",\n}\n\nexport interface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>,\n VariantProps<typeof switchVariants> {}\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n SwitchProps\n>(({ className, variant, size = \"default\", ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(switchVariants({ variant, size }), className)}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 [[disabled]_&]:bg-[var(--hc-grey-300,#A2A2A6)]\",\n thumbStyles[(size ?? \"default\") as SwitchSize]\n )}\n />\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch, switchVariants }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAClC,SAAS,WAA8B;;;ACFvC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD6CI;AA1CJ,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEA,IAAM,cAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,SACE;AAAA,EACF,IAAI;AACN;AAMA,IAAM,SAAe,iBAGnB,CAAC,EAAE,WAAW,SAAS,OAAO,WAAW,GAAG,MAAM,GAAG,QACrD;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,eAAe,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS;AAAA,IACzD,GAAG;AAAA,IACJ;AAAA,IAEA;AAAA,MAAkB;AAAA,MAAjB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAa,QAAQ,SAAwB;AAAA,QAC/C;AAAA;AAAA,IACF;AAAA;AACF,CACD;AACD,OAAO,cAA+B,sBAAK;","names":[]}