periplo-ui 4.16.0 → 4.16.2

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.
Files changed (78) hide show
  1. package/dist/components/data-display/DataTable/components/DataTableCell.js +1 -1
  2. package/dist/components/data-display/DataTable/components/DataTableCell.js.map +1 -1
  3. package/dist/components/data-display/DataTable/components/DataTableGroupRow.js +1 -1
  4. package/dist/components/data-display/DataTable/components/DataTableGroupRow.js.map +1 -1
  5. package/dist/components/data-display/Marquee/Marquee.js +2 -2
  6. package/dist/components/data-display/Marquee/Marquee.js.map +1 -1
  7. package/dist/components/data-display/NotificationBadge/NotificationBadge.js +1 -1
  8. package/dist/components/data-display/NotificationBadge/NotificationBadge.js.map +1 -1
  9. package/dist/components/data-display/Tooltip/Tooltip.js +1 -1
  10. package/dist/components/data-display/Tooltip/Tooltip.js.map +1 -1
  11. package/dist/components/feedback/Dialog/Dialog.js +2 -2
  12. package/dist/components/feedback/Dialog/Dialog.js.map +1 -1
  13. package/dist/components/feedback/Progress/Progress.js +1 -1
  14. package/dist/components/feedback/Progress/Progress.js.map +1 -1
  15. package/dist/components/feedback/Skeleton/Skeleton.js +1 -1
  16. package/dist/components/feedback/Skeleton/Skeleton.js.map +1 -1
  17. package/dist/components/inputs/Button/Button.js +1 -1
  18. package/dist/components/inputs/Button/Button.js.map +1 -1
  19. package/dist/components/inputs/Checkbox/Checkbox.js +1 -1
  20. package/dist/components/inputs/Checkbox/Checkbox.js.map +1 -1
  21. package/dist/components/inputs/Combobox/Combobox.js +2 -1
  22. package/dist/components/inputs/Combobox/Combobox.js.map +1 -1
  23. package/dist/components/inputs/Combobox/StaticComboboxList.js +1 -2
  24. package/dist/components/inputs/Combobox/StaticComboboxList.js.map +1 -1
  25. package/dist/components/inputs/Combobox/VirtualizedComboboxList.js +1 -2
  26. package/dist/components/inputs/Combobox/VirtualizedComboboxList.js.map +1 -1
  27. package/dist/components/inputs/InlineMultiSelect/InlineMultiSelect.js +12 -13
  28. package/dist/components/inputs/InlineMultiSelect/InlineMultiSelect.js.map +1 -1
  29. package/dist/components/inputs/Input/Input.js +1 -1
  30. package/dist/components/inputs/Input/Input.js.map +1 -1
  31. package/dist/components/inputs/InputDate/InputDate.js +1 -1
  32. package/dist/components/inputs/InputDate/InputDate.js.map +1 -1
  33. package/dist/components/inputs/LazyDatePicker/LazyDatePicker.js +1 -1
  34. package/dist/components/inputs/LazyDatePicker/LazyDatePicker.js.map +1 -1
  35. package/dist/components/inputs/MultiSelect/MultiSelect.js +12 -13
  36. package/dist/components/inputs/MultiSelect/MultiSelect.js.map +1 -1
  37. package/dist/components/inputs/PhoneInput/PhoneInput.js +2 -1
  38. package/dist/components/inputs/PhoneInput/PhoneInput.js.map +1 -1
  39. package/dist/components/inputs/RadioGroup/RadioGroup.js +1 -1
  40. package/dist/components/inputs/RadioGroup/RadioGroup.js.map +1 -1
  41. package/dist/components/inputs/Select/Select.js +6 -5
  42. package/dist/components/inputs/Select/Select.js.map +1 -1
  43. package/dist/components/inputs/Textarea/Textarea.js +1 -1
  44. package/dist/components/inputs/Textarea/Textarea.js.map +1 -1
  45. package/dist/components/inputs/Toggle/Toggle.js +1 -1
  46. package/dist/components/inputs/Toggle/Toggle.js.map +1 -1
  47. package/dist/components/navigation/DropdownMenu/DropdownMenu.js +7 -6
  48. package/dist/components/navigation/DropdownMenu/DropdownMenu.js.map +1 -1
  49. package/dist/components/navigation/Sheet/Sheet.js +2 -2
  50. package/dist/components/navigation/Sheet/Sheet.js.map +1 -1
  51. package/dist/components/navigation/Sidebar/Sidebar.js +6 -2
  52. package/dist/components/navigation/Sidebar/Sidebar.js.map +1 -1
  53. package/dist/components/navigation/Sidebar/SidebarMenu.js +29 -55
  54. package/dist/components/navigation/Sidebar/SidebarMenu.js.map +1 -1
  55. package/dist/components/navigation/Sidebar/SidebarUser.d.ts +3 -1
  56. package/dist/components/navigation/Sidebar/SidebarUser.js +18 -5
  57. package/dist/components/navigation/Sidebar/SidebarUser.js.map +1 -1
  58. package/dist/components/navigation/Sidebar/index.js +2 -2
  59. package/dist/components/navigation/Sidebar/styles.d.ts +2 -2
  60. package/dist/components/navigation/Sidebar/styles.js +4 -2
  61. package/dist/components/navigation/Sidebar/styles.js.map +1 -1
  62. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  63. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  64. package/dist/components/surface/Accordion/Accordion.js +3 -3
  65. package/dist/components/surface/Accordion/Accordion.js.map +1 -1
  66. package/dist/components/utils/Command/Command.js +8 -7
  67. package/dist/components/utils/Command/Command.js.map +1 -1
  68. package/dist/components/utils/Popover/Popover.js +2 -1
  69. package/dist/components/utils/Popover/Popover.js.map +1 -1
  70. package/dist/index.js +2 -2
  71. package/dist/lib/surface.d.ts +5 -0
  72. package/dist/lib/surface.js +10 -0
  73. package/dist/lib/surface.js.map +1 -0
  74. package/dist/lib/useSlidingIndicator.d.ts +22 -0
  75. package/dist/lib/useSlidingIndicator.js +65 -0
  76. package/dist/lib/useSlidingIndicator.js.map +1 -0
  77. package/dist/theme.css +46 -26
  78. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","names":["React"],"sources":["../../../../src/components/inputs/Select/Select.tsx"],"sourcesContent":["import { CaretDownIcon } from '@phosphor-icons/react/dist/ssr/CaretDown'\nimport { CaretUpIcon } from '@phosphor-icons/react/dist/ssr/CaretUp'\nimport { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { buttonVariants } from '../Button'\n\nimport { cn } from '@/lib/utils'\n\nconst SelectRoot = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger ref={ref} className={className} {...props}>\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretDownIcon className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretUpIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretDownIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {\n container?: HTMLElement\n }\n>(({ className, children, position = 'popper', container, ...props }, ref) => (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content\n ref={ref}\n sideOffset={4}\n className={cn(\n 'text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height,300px) min-w-32 overflow-hidden rounded-md border bg-[#fff] shadow-md',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' && 'w-(--radix-select-trigger-width) md:w-auto md:min-w-(--radix-select-trigger-width)',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn('py-1.5 pr-2 pl-8 text-sm font-semibold', className)} {...props} />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:text-accent-foreground relative flex w-full items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport type Option = {\n value: string\n label: React.ReactElement | string | number\n}\n\nexport {\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectRoot,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n\ntype Props = {\n onValueChange?: (value: string) => void\n defaultValue?: string\n value?: string\n placeholder?: string\n options: Array<Option>\n className?: string\n disabled?: boolean\n error?: boolean | string\n id?: string\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void\n container?: HTMLElement\n renderOption?: (option: Option) => React.ReactNode\n}\n\nexport function Select({\n onValueChange,\n defaultValue,\n value,\n options,\n placeholder,\n className,\n disabled = false,\n error,\n id,\n onKeyDown,\n container,\n renderOption,\n ...props\n}: Readonly<Props>) {\n const [open, setOpen] = React.useState(false)\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n if (!disabled) setOpen(nextOpen)\n },\n [disabled],\n )\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <SelectRoot\n {...props}\n open={open}\n onOpenChange={handleOpenChange}\n onValueChange={onValueChange}\n value={value}\n defaultValue={defaultValue}\n disabled={disabled}\n >\n <SelectTrigger\n id={id}\n onKeyDown={onKeyDown}\n aria-invalid={error ? 'true' : 'false'}\n className={cn(\n buttonVariants({ variant: 'input', size: 'lg' }),\n 'flex justify-between',\n error && 'ring-error-400 focus-within:ring-error-700 border-none ring-1',\n className,\n )}\n onPointerDown={(event) => {\n event.stopPropagation()\n if (open) {\n setOpen(false)\n event.preventDefault()\n } else {\n setOpen(true)\n }\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent\n container={container}\n onPointerDownOutside={(event) => {\n if (!container) return\n const original = (event as unknown as Record<string, unknown>).detail as\n { originalEvent?: PointerEvent } | undefined\n if (!original?.originalEvent?.composedPath) return\n if (original.originalEvent.composedPath().includes(container)) {\n event.preventDefault()\n }\n }}\n >\n {options.map((option) =>\n renderOption ? (\n <SelectPrimitive.Item\n key={option.value}\n value={option.value}\n data-testid={option.value}\n textValue={typeof option.label === 'string' ? option.label : undefined}\n className=\"focus:text-accent-foreground relative flex w-full items-start rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50\"\n >\n <span className=\"hidden\">\n <SelectPrimitive.ItemText>{option.label}</SelectPrimitive.ItemText>\n </span>\n {renderOption(option)}\n </SelectPrimitive.Item>\n ) : (\n <SelectItem key={option.value} value={option.value} data-testid={option.value}>\n {option.label}\n </SelectItem>\n ),\n )}\n </SelectContent>\n </SelectRoot>\n {typeof error === 'string' && <span className=\"text-error-500 text-sm\">{error}</span>}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AAUA,IAAM,aAAa,gBAAgB;AAEnC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,gBAAgB,SAAjB;CAA8B;CAAgB;CAAW,GAAI;CAA7D,UAAA,CACG,UACD,oBAAC,gBAAgB,MAAjB;EAAsB,SAAA;EACpB,UAAA,oBAAC,eAAD,EAAe,WAAU,qBAAsB,CAAA;CAC3B,CAAA,CACC;AAC1B,CAAA,CAAA;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,uBAAuBA,QAAM,YAGhC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,gBAAjB;CACO;CACL,WAAW,GAAG,wDAAwD,SAAS;CAC/E,GAAI;CAEJ,UAAA,oBAAC,aAAD,EAAa,WAAU,UAAW,CAAA;AACJ,CAAA,CACjC;AACD,qBAAqB,cAAc,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AA,QAAQ,KAAK,WACZ,eACE,qBAAC,gBAAgB,MAAjB;KAEE,OAAO,OAAO;KACd,eAAa,OAAO;KACpB,WAAW,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,KAAA;KAC7D,WAAU;KALZ,UAAA,CAOE,oBAAC,QAAD;MAAM,WAAU;MACd,UAAA,oBAAC,gBAAgB,UAAjB,EAAA,UAA2B,OAAO,MAAgC,CAAA;KAC9D,CAAA,GACL,aAAa,MAAM,CACA;IAVf,GAAA,OAAO,KAUQ,IAEtB,oBAAC,YAAD;KAA+B,OAAO,OAAO;KAAO,eAAa,OAAO;KACrE,UAAA,OAAO;IACE,GAFK,OAAO,KAEZ,CAEhB;GACa,CAAA,CACL;EACX,CAAA,GAAA,OAAO,UAAU,YAAY,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAY,CAAA,CACjF;;AAET"}
1
+ {"version":3,"file":"Select.js","names":["React"],"sources":["../../../../src/components/inputs/Select/Select.tsx"],"sourcesContent":["import { CaretDownIcon } from '@phosphor-icons/react/dist/ssr/CaretDown'\nimport { CaretUpIcon } from '@phosphor-icons/react/dist/ssr/CaretUp'\nimport { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { buttonVariants } from '../Button'\n\nimport { SURFACE_ITEM, SURFACE_LIST } from '@/lib/surface'\nimport { cn } from '@/lib/utils'\n\nconst SelectRoot = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger ref={ref} className={className} {...props}>\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretDownIcon className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretUpIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <CaretDownIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {\n container?: HTMLElement\n }\n>(({ className, children, position = 'popper', container, ...props }, ref) => (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content\n ref={ref}\n sideOffset={4}\n className={cn(\n SURFACE_LIST,\n '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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0',\n 'text-popover-foreground relative z-50 max-h-(--radix-select-content-available-height,300px) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden border bg-[#fff] shadow-md',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-(--surface-inset)',\n position === 'popper' && 'w-(--radix-select-trigger-width) md:w-auto md:min-w-(--radix-select-trigger-width)',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn('py-1.5 pr-2 pl-8 text-sm font-semibold', className)} {...props} />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex min-h-10 w-full items-center py-2 pr-3 pl-10 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-3 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport type Option = {\n value: string\n label: React.ReactElement | string | number\n}\n\nexport {\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectRoot,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n\ntype Props = {\n onValueChange?: (value: string) => void\n defaultValue?: string\n value?: string\n placeholder?: string\n options: Array<Option>\n className?: string\n disabled?: boolean\n error?: boolean | string\n id?: string\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void\n container?: HTMLElement\n renderOption?: (option: Option) => React.ReactNode\n}\n\nexport function Select({\n onValueChange,\n defaultValue,\n value,\n options,\n placeholder,\n className,\n disabled = false,\n error,\n id,\n onKeyDown,\n container,\n renderOption,\n ...props\n}: Readonly<Props>) {\n const [open, setOpen] = React.useState(false)\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n if (!disabled) setOpen(nextOpen)\n },\n [disabled],\n )\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <SelectRoot\n {...props}\n open={open}\n onOpenChange={handleOpenChange}\n onValueChange={onValueChange}\n value={value}\n defaultValue={defaultValue}\n disabled={disabled}\n >\n <SelectTrigger\n id={id}\n onKeyDown={onKeyDown}\n aria-invalid={error ? 'true' : 'false'}\n className={cn(\n buttonVariants({ variant: 'input', size: 'lg' }),\n 'flex justify-between',\n error && 'ring-error-400 focus-within:ring-error-700 border-none ring-1',\n className,\n )}\n onPointerDown={(event) => {\n event.stopPropagation()\n if (open) {\n setOpen(false)\n event.preventDefault()\n } else {\n setOpen(true)\n }\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent\n container={container}\n onPointerDownOutside={(event) => {\n if (!container) return\n const original = (event as unknown as Record<string, unknown>).detail as\n { originalEvent?: PointerEvent } | undefined\n if (!original?.originalEvent?.composedPath) return\n if (original.originalEvent.composedPath().includes(container)) {\n event.preventDefault()\n }\n }}\n >\n {options.map((option) =>\n renderOption ? (\n <SelectPrimitive.Item\n key={option.value}\n value={option.value}\n data-testid={option.value}\n textValue={typeof option.label === 'string' ? option.label : undefined}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex min-h-10 w-full items-start px-3 py-2 text-sm outline-none select-none focus:bg-neutral-100 data-disabled:pointer-events-none data-disabled:opacity-50',\n )}\n >\n <span className=\"hidden\">\n <SelectPrimitive.ItemText>{option.label}</SelectPrimitive.ItemText>\n </span>\n {renderOption(option)}\n </SelectPrimitive.Item>\n ) : (\n <SelectItem key={option.value} value={option.value} data-testid={option.value}>\n {option.label}\n </SelectItem>\n ),\n )}\n </SelectContent>\n </SelectRoot>\n {typeof error === 'string' && <span className=\"text-error-500 text-sm\">{error}</span>}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,aAAa,gBAAgB;AAEnC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,gBAAgB,SAAjB;CAA8B;CAAgB;CAAW,GAAI;CAA7D,UAAA,CACG,UACD,oBAAC,gBAAgB,MAAjB;EAAsB,SAAA;EACpB,UAAA,oBAAC,eAAD,EAAe,WAAU,qBAAsB,CAAA;CAC3B,CAAA,CACC;AAC1B,CAAA,CAAA;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,uBAAuBA,QAAM,YAGhC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,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B,IAAI,CAAC,WAAW;KAChB,MAAM,WAAY,MAA6C;KAE/D,IAAI,CAAC,UAAU,eAAe,cAAc;KAC5C,IAAI,SAAS,cAAc,aAAa,CAAC,CAAC,SAAS,SAAS,GAC1D,MAAM,eAAe;IAEzB;IAEC,UAAA,QAAQ,KAAK,WACZ,eACE,qBAAC,gBAAgB,MAAjB;KAEE,OAAO,OAAO;KACd,eAAa,OAAO;KACpB,WAAW,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,KAAA;KAC7D,WAAW,GACT,cACA,mMACF;KARF,UAAA,CAUE,oBAAC,QAAD;MAAM,WAAU;MACd,UAAA,oBAAC,gBAAgB,UAAjB,EAAA,UAA2B,OAAO,MAAgC,CAAA;KAC9D,CAAA,GACL,aAAa,MAAM,CACA;IAbf,GAAA,OAAO,KAaQ,IAEtB,oBAAC,YAAD;KAA+B,OAAO,OAAO;KAAO,eAAa,OAAO;KACrE,UAAA,OAAO;IACE,GAFK,OAAO,KAEZ,CAEhB;GACa,CAAA,CACL;EACX,CAAA,GAAA,OAAO,UAAU,YAAY,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAY,CAAA,CACjF;;AAET"}
@@ -25,7 +25,7 @@ var Textarea = React$1.forwardRef(({ className, disabled, error, resize = false,
25
25
  })]
26
26
  })
27
27
  }), typeof error === "string" && /* @__PURE__ */ jsx("span", {
28
- className: "text-error-500 text-sm",
28
+ className: "text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150",
29
29
  children: error
30
30
  })]
31
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","names":["React"],"sources":["../../../../src/components/inputs/Textarea/Textarea.tsx"],"sourcesContent":["import { WarningCircleIcon } from '@phosphor-icons/react/dist/ssr/WarningCircle'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport type TextareaProps = {\n disabled?: boolean\n error?: boolean | string\n resize?: boolean\n} & React.TextareaHTMLAttributes<HTMLTextAreaElement>\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, disabled, error, resize = false, ...props }, ref) => {\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"flex w-full items-start\">\n <div\n className={cn(\n 'relative flex w-full rounded-lg border border-neutral-200 bg-white transition-colors focus-within:border-neutral-950',\n disabled && 'bg-neutral-50',\n error && 'border-error-400 focus-within:border-error-700',\n className,\n )}\n >\n <textarea\n className={cn(\n 'min-h-15 w-full rounded-lg bg-transparent p-3 pr-8 outline-0 transition-colors placeholder:text-neutral-300 disabled:cursor-not-allowed disabled:opacity-50',\n !resize && 'resize-none',\n )}\n ref={ref}\n disabled={disabled}\n {...props}\n />\n {error && (\n <div className=\"absolute top-3 right-3\">\n <WarningCircleIcon data-testid=\"exclaim-icon\" className=\"text-error-500\" size={18} />\n </div>\n )}\n </div>\n </div>\n {typeof error === 'string' && <span className=\"text-error-500 text-sm\">{error}</span>}\n </div>\n )\n },\n)\nTextarea.displayName = 'Textarea'\n\nexport { Textarea }\n"],"mappings":";;;;;AAWA,IAAM,WAAWA,QAAM,YACpB,EAAE,WAAW,UAAU,OAAO,SAAS,OAAO,GAAG,SAAS,QAAQ;CACjE,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,qBAAC,OAAD;IACE,WAAW,GACT,wHACA,YAAY,iBACZ,SAAS,kDACT,SACF;IANF,UAAA,CAQE,oBAAC,YAAD;KACE,WAAW,GACT,+JACA,CAAC,UAAU,aACb;KACK;KACK;KACV,GAAI;IACL,CAAA,GACA,SACC,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,mBAAD;MAAmB,eAAY;MAAe,WAAU;MAAiB,MAAM;KAAK,CAAA;IACjF,CAAA,CAEJ;;EACF,CAAA,GACJ,OAAO,UAAU,YAAY,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAY,CAAA,CACjF;;AAET,CACF;AACA,SAAS,cAAc"}
1
+ {"version":3,"file":"Textarea.js","names":["React"],"sources":["../../../../src/components/inputs/Textarea/Textarea.tsx"],"sourcesContent":["import { WarningCircleIcon } from '@phosphor-icons/react/dist/ssr/WarningCircle'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport type TextareaProps = {\n disabled?: boolean\n error?: boolean | string\n resize?: boolean\n} & React.TextareaHTMLAttributes<HTMLTextAreaElement>\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, disabled, error, resize = false, ...props }, ref) => {\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"flex w-full items-start\">\n <div\n className={cn(\n 'relative flex w-full rounded-lg border border-neutral-200 bg-white transition-colors focus-within:border-neutral-950',\n disabled && 'bg-neutral-50',\n error && 'border-error-400 focus-within:border-error-700',\n className,\n )}\n >\n <textarea\n className={cn(\n 'min-h-15 w-full rounded-lg bg-transparent p-3 pr-8 outline-0 transition-colors placeholder:text-neutral-300 disabled:cursor-not-allowed disabled:opacity-50',\n !resize && 'resize-none',\n )}\n ref={ref}\n disabled={disabled}\n {...props}\n />\n {error && (\n <div className=\"absolute top-3 right-3\">\n <WarningCircleIcon data-testid=\"exclaim-icon\" className=\"text-error-500\" size={18} />\n </div>\n )}\n </div>\n </div>\n {typeof error === 'string' && (\n <span className=\"text-error-500 animate-in fade-in-0 slide-in-from-top-1 ease-out-strong motion-reduce:slide-in-from-top-0 text-sm duration-150\">\n {error}\n </span>\n )}\n </div>\n )\n },\n)\nTextarea.displayName = 'Textarea'\n\nexport { Textarea }\n"],"mappings":";;;;;AAWA,IAAM,WAAWA,QAAM,YACpB,EAAE,WAAW,UAAU,OAAO,SAAS,OAAO,GAAG,SAAS,QAAQ;CACjE,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,qBAAC,OAAD;IACE,WAAW,GACT,wHACA,YAAY,iBACZ,SAAS,kDACT,SACF;IANF,UAAA,CAQE,oBAAC,YAAD;KACE,WAAW,GACT,+JACA,CAAC,UAAU,aACb;KACK;KACK;KACV,GAAI;IACL,CAAA,GACA,SACC,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,mBAAD;MAAmB,eAAY;MAAe,WAAU;MAAiB,MAAM;KAAK,CAAA;IACjF,CAAA,CAEJ;;EACF,CAAA,GACJ,OAAO,UAAU,YAChB,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA;EACG,CAAA,CAEL;;AAET,CACF;AACA,SAAS,cAAc"}
@@ -4,7 +4,7 @@ import * as React$1 from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import * as TogglePrimitive from "@radix-ui/react-toggle";
6
6
  //#region src/components/inputs/Toggle/Toggle.tsx
7
- var toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
7
+ var toggleVariants = cva("inline-flex items-center justify-center rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
8
8
  variants: {
9
9
  variant: {
10
10
  primary: [
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.js","names":["React"],"sources":["../../../../src/components/inputs/Toggle/Toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from '@radix-ui/react-toggle'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst toggleVariants = cva(\n 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n primary: [\n 'bg-neutral-50 text-neutral-950',\n 'hover:bg-neutral-100',\n 'data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',\n ],\n outline: [\n 'border border-primary bg-transparent',\n 'hover:bg-neutral-50 hover:text-neutral-950',\n 'data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',\n ],\n ghost: [\n 'bg-transparent',\n 'hover:bg-neutral-50 hover:text-neutral-950',\n 'data-[state=on]:bg-neutral-100 data-[state=on]:text-neutral-950',\n ],\n },\n size: {\n sm: 'h-8 min-h-8 px-2.5 text-sm',\n md: 'h-10 min-h-10 px-3 text-sm',\n lg: 'h-12 min-h-12 px-5 text-base',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n },\n)\n\ntype ToggleProps = {\n /** Style variant of the toggle: 'primary' | 'outline' | 'ghost'\n * @default primary\n */\n variant?: VariantProps<typeof toggleVariants>['variant']\n /** Size variant of the toggle: 'sm' | 'md' | 'lg'\n * @default md\n */\n size?: VariantProps<typeof toggleVariants>['size']\n /** The controlled pressed state of the toggle */\n pressed?: boolean\n /** Whether the toggle is disabled */\n disabled?: boolean\n} & Omit<React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, 'size'>\n\n/**\n * A toggleable button component that can be either on or off.\n *\n * @example\n * ```tsx\n * <Toggle variant=\"outline\" size=\"sm\" onPressedChange={(pressed) => console.info(pressed)}>\n * Toggle Me\n * </Toggle>\n * ```\n */\nconst Toggle = React.forwardRef<React.ComponentRef<typeof TogglePrimitive.Root>, ToggleProps>(\n ({ className, variant = 'primary', size = 'md', ...props }, ref) => (\n <TogglePrimitive.Root ref={ref} className={cn(toggleVariants({ className, variant, size }))} {...props} />\n ),\n)\n\nToggle.displayName = TogglePrimitive.Root.displayName\n\nexport { Toggle, toggleVariants }\nexport type { ToggleProps }\n"],"mappings":";;;;;;AAMA,IAAM,iBAAiB,IACrB,wQACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;IACP;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;;;;;;;;;;;AA2BA,IAAM,SAASA,QAAM,YAClB,EAAE,WAAW,UAAU,WAAW,OAAO,MAAM,GAAG,SAAS,QAC1D,oBAAC,gBAAgB,MAAjB;CAA2B;CAAK,WAAW,GAAG,eAAe;EAAE;EAAW;EAAS;CAAK,CAAC,CAAC;CAAG,GAAI;AAAQ,CAAA,CAE7G;AAEA,OAAO,cAAc,gBAAgB,KAAK"}
1
+ {"version":3,"file":"Toggle.js","names":["React"],"sources":["../../../../src/components/inputs/Toggle/Toggle.tsx"],"sourcesContent":["import * as TogglePrimitive from '@radix-ui/react-toggle'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst toggleVariants = cva(\n 'inline-flex items-center justify-center rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n primary: [\n 'bg-neutral-50 text-neutral-950',\n 'hover:bg-neutral-100',\n 'data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',\n ],\n outline: [\n 'border border-primary bg-transparent',\n 'hover:bg-neutral-50 hover:text-neutral-950',\n 'data-[state=on]:bg-primary data-[state=on]:text-primary-foreground',\n ],\n ghost: [\n 'bg-transparent',\n 'hover:bg-neutral-50 hover:text-neutral-950',\n 'data-[state=on]:bg-neutral-100 data-[state=on]:text-neutral-950',\n ],\n },\n size: {\n sm: 'h-8 min-h-8 px-2.5 text-sm',\n md: 'h-10 min-h-10 px-3 text-sm',\n lg: 'h-12 min-h-12 px-5 text-base',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n },\n)\n\ntype ToggleProps = {\n /** Style variant of the toggle: 'primary' | 'outline' | 'ghost'\n * @default primary\n */\n variant?: VariantProps<typeof toggleVariants>['variant']\n /** Size variant of the toggle: 'sm' | 'md' | 'lg'\n * @default md\n */\n size?: VariantProps<typeof toggleVariants>['size']\n /** The controlled pressed state of the toggle */\n pressed?: boolean\n /** Whether the toggle is disabled */\n disabled?: boolean\n} & Omit<React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, 'size'>\n\n/**\n * A toggleable button component that can be either on or off.\n *\n * @example\n * ```tsx\n * <Toggle variant=\"outline\" size=\"sm\" onPressedChange={(pressed) => console.info(pressed)}>\n * Toggle Me\n * </Toggle>\n * ```\n */\nconst Toggle = React.forwardRef<React.ComponentRef<typeof TogglePrimitive.Root>, ToggleProps>(\n ({ className, variant = 'primary', size = 'md', ...props }, ref) => (\n <TogglePrimitive.Root ref={ref} className={cn(toggleVariants({ className, variant, size }))} {...props} />\n ),\n)\n\nToggle.displayName = TogglePrimitive.Root.displayName\n\nexport { Toggle, toggleVariants }\nexport type { ToggleProps }\n"],"mappings":";;;;;;AAMA,IAAM,iBAAiB,IACrB,wQACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;IACP;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;;;;;;;;;;;AA2BA,IAAM,SAASA,QAAM,YAClB,EAAE,WAAW,UAAU,WAAW,OAAO,MAAM,GAAG,SAAS,QAC1D,oBAAC,gBAAgB,MAAjB;CAA2B;CAAK,WAAW,GAAG,eAAe;EAAE;EAAW;EAAS;CAAK,CAAC,CAAC;CAAG,GAAI;AAAQ,CAAA,CAE7G;AAEA,OAAO,cAAc,gBAAgB,KAAK"}
@@ -1,4 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
+ import { SURFACE, SURFACE_INSET, SURFACE_ITEM } from "../../../lib/surface.js";
2
3
  import * as React$1 from "react";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
5
  import { CaretRightIcon } from "@phosphor-icons/react/dist/ssr/CaretRight";
@@ -14,33 +15,33 @@ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
14
15
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
15
16
  var DropdownMenuSubTrigger = React$1.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
16
17
  ref,
17
- className: cn("flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-50 data-[state=open]:bg-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
18
+ className: cn(SURFACE_ITEM, "flex items-center gap-2 px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-50 data-[state=open]:bg-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
18
19
  ...props,
19
20
  children: [children, /* @__PURE__ */ jsx(CaretRightIcon, { className: "ml-auto" })]
20
21
  }));
21
22
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
22
23
  var DropdownMenuSubContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
23
24
  ref,
24
- className: cn("text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border bg-white p-1 shadow-lg", className),
25
+ className: cn(SURFACE, SURFACE_INSET, "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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0", "text-popover-foreground z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden border bg-white shadow-lg", className),
25
26
  ...props
26
27
  }));
27
28
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
28
29
  var DropdownMenuContent = React$1.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
29
30
  ref,
30
31
  sideOffset,
31
- className: cn("text-popover-foreground z-50 min-w-[min(var(--radix-dropdown-menu-trigger-width),8rem)] overflow-hidden rounded-md border bg-white p-1 shadow-md", "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", className),
32
+ className: cn(SURFACE, SURFACE_INSET, "text-popover-foreground z-50 min-w-[min(var(--radix-dropdown-menu-trigger-width),8rem)] overflow-hidden border bg-white shadow-md", "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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0", "origin-(--radix-dropdown-menu-content-transform-origin)", className),
32
33
  ...props
33
34
  }) }));
34
35
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
35
36
  var DropdownMenuItem = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
36
37
  ref,
37
- className: cn("focus:text-accent-foreground relative flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className),
38
+ className: cn(SURFACE_ITEM, "focus:text-accent-foreground relative flex items-center gap-2 px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className),
38
39
  ...props
39
40
  }));
40
41
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
41
42
  var DropdownMenuCheckboxItem = React$1.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
42
43
  ref,
43
- className: cn("focus:text-accent-foreground relative flex items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50", className),
44
+ className: cn(SURFACE_ITEM, "focus:text-accent-foreground relative flex items-center py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50", className),
44
45
  checked,
45
46
  ...props,
46
47
  children: [/* @__PURE__ */ jsx("span", {
@@ -51,7 +52,7 @@ var DropdownMenuCheckboxItem = React$1.forwardRef(({ className, children, checke
51
52
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
52
53
  var DropdownMenuRadioItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
53
54
  ref,
54
- className: cn("focus:text-accent-foreground relative flex items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50", className),
55
+ className: cn(SURFACE_ITEM, "focus:text-accent-foreground relative flex items-center py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50", className),
55
56
  ...props,
56
57
  children: [/* @__PURE__ */ jsx("span", {
57
58
  className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":["React"],"sources":["../../../../src/components/navigation/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import { CaretRightIcon } from '@phosphor-icons/react/dist/ssr/CaretRight'\nimport { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { DotIcon } from '@phosphor-icons/react/dist/ssr/Dot'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-50 data-[state=open]:bg-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <CaretRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border bg-white p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ComponentRef<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 'text-popover-foreground z-50 min-w-[min(var(--radix-dropdown-menu-trigger-width),8rem)] overflow-hidden rounded-md border bg-white p-1 shadow-md',\n '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.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:text-accent-foreground relative flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<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 'focus:text-accent-foreground relative flex items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon 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.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:text-accent-foreground relative flex items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotIcon 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.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-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"],"mappings":";;;;;;;;AAQA,IAAM,eAAe,sBAAsB;AAE3C,IAAM,sBAAsB,sBAAsB;AAElD,IAAM,oBAAoB,sBAAsB;AAEhD,IAAM,qBAAqB,sBAAsB;AAEjD,IAAM,kBAAkB,sBAAsB;AAE9C,IAAM,yBAAyB,sBAAsB;AAErD,IAAM,yBAAyBA,QAAM,YAKlC,EAAE,WAAW,OAAO,UAAU,GAAG,SAAS,QAC3C,qBAAC,sBAAsB,YAAvB;CACO;CACL,WAAW,GACT,mMACA,SAAS,QACT,SACF;CACA,GAAI;CAPN,UAAA,CASG,UACD,oBAAC,gBAAD,EAAgB,WAAU,UAAW,CAAA,CACL;AACnC,CAAA,CAAA;AACD,uBAAuB,cAAc,sBAAsB,WAAW;AAEtE,IAAM,yBAAyBA,QAAM,YAGlC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,sBAAsB,YAAvB;CACO;CACL,WAAW,GACT,mbACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,uBAAuB,cAAc,sBAAsB,WAAW;AAEtE,IAAM,sBAAsBA,QAAM,YAG/B,EAAE,WAAW,aAAa,GAAG,GAAG,SAAS,QAC1C,oBAAC,sBAAsB,QAAvB,EAAA,UACE,oBAAC,sBAAsB,SAAvB;CACO;CACO;CACZ,W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AAwBA,QAAM,YAGjC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,sBAAsB,WAAvB;CAAsC;CAAK,WAAW,GAAG,4BAA4B,SAAS;CAAG,GAAI;AAAQ,CAAA,CAC9G;AACD,sBAAsB,cAAc,sBAAsB,UAAU;AAEpE,IAAM,wBAAwB,EAAE,WAAW,GAAG,YAAmD;CAC/F,OAAO,oBAAC,QAAD;EAAM,WAAW,GAAG,8CAA8C,SAAS;EAAG,GAAI;CAAQ,CAAA;AACnG;AACA,qBAAqB,cAAc"}
1
+ {"version":3,"file":"DropdownMenu.js","names":["React"],"sources":["../../../../src/components/navigation/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import { CaretRightIcon } from '@phosphor-icons/react/dist/ssr/CaretRight'\nimport { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { DotIcon } from '@phosphor-icons/react/dist/ssr/Dot'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { SURFACE, SURFACE_INSET, SURFACE_ITEM } from '@/lib/surface'\nimport { cn } from '@/lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n SURFACE_ITEM,\n 'flex items-center gap-2 px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-50 data-[state=open]:bg-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <CaretRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n SURFACE,\n SURFACE_INSET,\n '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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0',\n 'text-popover-foreground z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden border bg-white shadow-lg',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ComponentRef<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 SURFACE,\n SURFACE_INSET,\n 'text-popover-foreground z-50 min-w-[min(var(--radix-dropdown-menu-trigger-width),8rem)] overflow-hidden border bg-white shadow-md',\n '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 ease-out-strong motion-reduce:data-[state=closed]:zoom-out-100 motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[side=bottom]:slide-in-from-top-0 motion-reduce:data-[side=left]:slide-in-from-right-0 motion-reduce:data-[side=right]:slide-in-from-left-0 motion-reduce:data-[side=top]:slide-in-from-bottom-0',\n 'origin-(--radix-dropdown-menu-content-transform-origin)',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex items-center gap-2 px-2 py-1.5 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<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 SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex items-center py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon 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.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n SURFACE_ITEM,\n 'focus:text-accent-foreground relative flex items-center py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none focus:bg-neutral-50 data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotIcon 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.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-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"],"mappings":";;;;;;;;;AASA,IAAM,eAAe,sBAAsB;AAE3C,IAAM,sBAAsB,sBAAsB;AAElD,IAAM,oBAAoB,sBAAsB;AAEhD,IAAM,qBAAqB,sBAAsB;AAEjD,IAAM,kBAAkB,sBAAsB;AAE9C,IAAM,yBAAyB,sBAAsB;AAErD,IAAM,yBAAyBA,QAAM,YAKlC,EAAE,WAAW,OAAO,UAAU,GAAG,SAAS,QAC3C,qBAAC,sBAAsB,YAAvB;CACO;CACL,WAAW,GACT,cACA,wLACA,SAAS,QACT,SACF;CACA,GAAI;CARN,UAAA,CAUG,UACD,oBAAC,gBAAD,EAAgB,WAAU,UAAW,CAAA,CACL;AACnC,CAAA,CAAA;AACD,uBAAuB,cAAc,sBAAsB,WAAW;AAEtE,IAAM,yBAAyBA,QAAM,YAGlC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,sBAAsB,YAAvB;CACO;CACL,WAA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C8B;AAClC,CAAA,CAAA;AACD,sBAAsB,cAAc,sBAAsB,UAAU;AAEpE,IAAM,oBAAoBA,QAAM,YAK7B,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,sBAAsB,OAAvB;CACO;CACL,WAAW,GAAG,qCAAqC,SAAS,QAAQ,SAAS;CAC7E,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc,sBAAsB,MAAM;AAE5D,IAAM,wBAAwBA,QAAM,YAGjC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,sBAAsB,WAAvB;CAAsC;CAAK,WAAW,GAAG,4BAA4B,SAAS;CAAG,GAAI;AAAQ,CAAA,CAC9G;AACD,sBAAsB,cAAc,sBAAsB,UAAU;AAEpE,IAAM,wBAAwB,EAAE,WAAW,GAAG,YAAmD;CAC/F,OAAO,oBAAC,QAAD;EAAM,WAAW,GAAG,8CAA8C,SAAS;EAAG,GAAI;CAAQ,CAAA;AACnG;AACA,qBAAqB,cAAc"}
@@ -10,12 +10,12 @@ var SheetTrigger = SheetPrimitive.Trigger;
10
10
  var SheetClose = SheetPrimitive.Close;
11
11
  var SheetPortal = SheetPrimitive.Portal;
12
12
  var SheetOverlay = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SheetPrimitive.Overlay, {
13
- className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", className),
13
+ className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ease-out-strong fixed inset-0 z-50 bg-neutral-950/32", className),
14
14
  ...props,
15
15
  ref
16
16
  }));
17
17
  SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
18
- var sheetVariants = cva("fixed z-50 gap-4 bg-background-100 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
18
+ var sheetVariants = cva("fixed z-50 gap-4 bg-background-100 p-6 shadow-lg ease-drawer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-250 motion-reduce:data-[state=closed]:duration-0 motion-reduce:data-[state=open]:duration-0", {
19
19
  variants: { side: {
20
20
  top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
21
21
  bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.js","names":["React"],"sources":["../../../../src/components/navigation/Sheet/Sheet.tsx"],"sourcesContent":["import { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst SheetRoot = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',\n className,\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n 'fixed z-50 gap-4 bg-background-100 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n {\n variants: {\n side: {\n top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',\n bottom:\n 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',\n right:\n 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'left',\n },\n },\n)\n\ntype SheetContentProps = {\n showClose?: boolean\n} & React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> &\n VariantProps<typeof sheetVariants>\n\nconst SheetContent = React.forwardRef<React.ComponentRef<typeof SheetPrimitive.Content>, SheetContentProps>(\n ({ side = 'left', className, children, showClose, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n {showClose && (\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary ring-offset-background absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n ),\n)\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />\n)\nSheetHeader.displayName = 'SheetHeader'\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nSheetFooter.displayName = 'SheetFooter'\n\nconst SheetTitle = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport type SheetComponentProps = {\n trigger: string | React.ReactNode\n title: string | React.ReactNode\n content: string | React.ReactNode\n showClose?: boolean\n className?: string\n side?: 'top' | 'bottom' | 'left' | 'right'\n}\n\nexport const Sheet = ({ trigger, title, content, side, className, showClose }: SheetComponentProps) => {\n return (\n <SheetRoot>\n <SheetTrigger>{trigger}</SheetTrigger>\n <SheetContent showClose={showClose} side={side} className={className}>\n <SheetHeader>\n <SheetTitle>{title}</SheetTitle>\n </SheetHeader>\n {content}\n </SheetContent>\n </SheetRoot>\n )\n}\n\nexport {\n SheetRoot,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n"],"mappings":";;;;;;;AAOA,IAAM,YAAY,eAAe;AAEjC,IAAM,eAAe,eAAe;AAEpC,IAAM,aAAa,eAAe;AAElC,IAAM,cAAc,eAAe;AAEnC,IAAM,eAAeA,QAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,eAAe,SAAhB;CACE,WAAW,GACT,0JACA,SACF;CACA,GAAI;CACC;AACN,CAAA,CACF;AACD,aAAa,cAAc,eAAe,QAAQ;AAElD,IAAM,gBAAgB,IACpB,wMACA;CACE,UAAU,EACR,MAAM;EACJ,KAAK;EACL,QACE;EACF,MAAM;EACN,OACE;CACJ,EACF;CACA,iBAAiB,EACf,MAAM,OACR;AACF,CACF;AAOA,IAAM,eAAeA,QAAM,YACxB,EA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EAAA,UAAe,QAAsB,CAAA,GACrC,qBAAC,cAAD;EAAyB;EAAiB;EAAiB;EAA3D,UAAA,CACE,oBAAC,aAAD,EAAA,UACE,oBAAC,YAAD,EAAA,UAAa,MAAkB,CAAA,EACpB,CAAA,GACZ,OACW;CACL,CAAA,CAAA,EAAA,CAAA;AAEf"}
1
+ {"version":3,"file":"Sheet.js","names":["React"],"sources":["../../../../src/components/navigation/Sheet/Sheet.tsx"],"sourcesContent":["import { XIcon } from '@phosphor-icons/react/dist/ssr/X'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst SheetRoot = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ease-out-strong fixed inset-0 z-50 bg-neutral-950/32',\n className,\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n 'fixed z-50 gap-4 bg-background-100 p-6 shadow-lg ease-drawer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-250 motion-reduce:data-[state=closed]:duration-0 motion-reduce:data-[state=open]:duration-0',\n {\n variants: {\n side: {\n top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',\n bottom:\n 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',\n right:\n 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'left',\n },\n },\n)\n\ntype SheetContentProps = {\n showClose?: boolean\n} & React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> &\n VariantProps<typeof sheetVariants>\n\nconst SheetContent = React.forwardRef<React.ComponentRef<typeof SheetPrimitive.Content>, SheetContentProps>(\n ({ side = 'left', className, children, showClose, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n {showClose && (\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary ring-offset-background absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n ),\n)\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />\n)\nSheetHeader.displayName = 'SheetHeader'\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nSheetFooter.displayName = 'SheetFooter'\n\nconst SheetTitle = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ComponentRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport type SheetComponentProps = {\n trigger: string | React.ReactNode\n title: string | React.ReactNode\n content: string | React.ReactNode\n showClose?: boolean\n className?: string\n side?: 'top' | 'bottom' | 'left' | 'right'\n}\n\nexport const Sheet = ({ trigger, title, content, side, className, showClose }: SheetComponentProps) => {\n return (\n <SheetRoot>\n <SheetTrigger>{trigger}</SheetTrigger>\n <SheetContent showClose={showClose} side={side} className={className}>\n <SheetHeader>\n <SheetTitle>{title}</SheetTitle>\n </SheetHeader>\n {content}\n </SheetContent>\n </SheetRoot>\n )\n}\n\nexport {\n SheetRoot,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n"],"mappings":";;;;;;;AAOA,IAAM,YAAY,eAAe;AAEjC,IAAM,eAAe,eAAe;AAEpC,IAAM,aAAa,eAAe;AAElC,IAAM,cAAc,eAAe;AAEnC,IAAM,eAAeA,QAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,eAAe,SAAhB;CACE,WAAW,GACT,gLACA,SACF;CACA,GAAI;CACC;AACN,CAAA,CACF;AACD,aAAa,cAAc,eAAe,QAAQ;AAElD,IAAM,gBAAgB,IACpB,qRACA;CACE,UAAU,EACR,MAAM;EACJ,KAAK;EACL,QACE;EACF,MAAM;EACN,OACE;CACJ,EACF;CACA,iBAAiB,EACf,MAAM,OACR;AACF,CACF;AAOA,IAAM,eAAeA,QAAM,YACxB,EAAE,OAAO,QAAQ,WAAW,UAAU,WAAW,GAAG,SAAS,QAC5D,qBAAC,aAAD,EAAA,UAAA,CACE,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oBAAC,aAAD,EAAA,UACE,oBAAC,YAAD,EAAA,UAAa,MAAkB,CAAA,EACpB,CAAA,GACZ,OACW;CACL,CAAA,CAAA,EAAA,CAAA;AAEf"}
@@ -35,6 +35,7 @@ var marquee = createMarquee({
35
35
  var SidebarProvider = React$1.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, size = "medium", className, style, children, onPointerOver, onPointerOut, onFocus, onBlur, ...props }, ref) => {
36
36
  const isMobile = useIsMobile();
37
37
  const [openMobile, setOpenMobile] = React$1.useState(false);
38
+ const [instant, setInstant] = React$1.useState(false);
38
39
  const [_open, _setOpen] = React$1.useState(defaultOpen);
39
40
  const open = openProp ?? _open;
40
41
  const setOpen = React$1.useCallback((value) => {
@@ -60,7 +61,9 @@ var SidebarProvider = React$1.forwardRef(({ defaultOpen = true, open: openProp,
60
61
  const isEditing = event.target instanceof HTMLElement && (event.target.isContentEditable || event.target.closest("input, textarea, select") !== null);
61
62
  if (isShortcut && !isEditing && !event.defaultPrevented) {
62
63
  event.preventDefault();
64
+ setInstant(true);
63
65
  toggleSidebarRef.current();
66
+ requestAnimationFrame(() => requestAnimationFrame(() => setInstant(false)));
64
67
  }
65
68
  };
66
69
  window.addEventListener("keydown", handleKeyDown);
@@ -98,7 +101,8 @@ var SidebarProvider = React$1.forwardRef(({ defaultOpen = true, open: openProp,
98
101
  "--sidebar-width-icon": SIDEBAR_WIDTH_ICON[size],
99
102
  ...style
100
103
  },
101
- className: cn("flex min-h-svh w-full [--page-padding:1rem] sm:[--page-padding:1.5rem] lg:[--page-padding:2rem]", className),
104
+ "data-instant": instant || void 0,
105
+ className: cn("flex min-h-svh w-full [--page-padding:1rem] data-[instant=true]:**:duration-0! sm:[--page-padding:1.5rem] lg:[--page-padding:2rem]", className),
102
106
  ref,
103
107
  onPointerOver: (event) => {
104
108
  onPointerOver?.(event);
@@ -130,7 +134,7 @@ var SidebarRoot = React$1.forwardRef(({ variant = "default", className, children
130
134
  children: /* @__PURE__ */ jsxs(SheetContent, {
131
135
  ref,
132
136
  "data-sidebar": "sidebar",
133
- className: cn("bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 ease-out data-[state=closed]:duration-200 data-[state=open]:duration-300 motion-reduce:data-[state=closed]:duration-0 motion-reduce:data-[state=open]:duration-0", className),
137
+ className: cn("bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0", className),
134
138
  style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
135
139
  ...props,
136
140
  side: "left",
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","names":["React"],"sources":["../../../../src/components/navigation/Sidebar/Sidebar.tsx"],"sourcesContent":["'use client'\n\nimport { ListIcon } from '@phosphor-icons/react/dist/ssr/List'\nimport { SidebarSimpleIcon } from '@phosphor-icons/react/dist/ssr/SidebarSimple'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useIsMobile } from '../../../lib/useMobile'\nimport { Separator } from '../../data-display/Separator'\nimport { TooltipProvider } from '../../data-display/Tooltip'\nimport { Typography } from '../../data-display/Typography'\nimport { Input } from '../../inputs/Input'\nimport { SheetContent, SheetDescription, SheetHeader, SheetRoot, SheetTitle } from '../Sheet'\n\nimport { SidebarContext, useSidebar, useResolvedSize } from './context'\nimport type { SidebarSize } from './context'\nimport { MOTION, SCROLLBAR } from './styles'\n\nimport { trackInputModality } from '@/lib/inputModality'\nimport { createMarquee } from '@/lib/marquee'\nimport { cn } from '@/lib/utils'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '17.5rem'\nconst SIDEBAR_WIDTH_MOBILE = '18.5rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = /^b$/i\n\nconst SIDEBAR_WIDTH_ICON: Record<SidebarSize, string> = {\n small: '3.5rem',\n medium: '4rem',\n big: '4.5rem',\n}\n\nconst MARQUEE_ROW = '[data-sidebar=menu-button], [data-sidebar=menu-sub-button], [data-sidebar=user]'\nconst marquee = createMarquee({\n rows: MARQUEE_ROW,\n disabled: (row) => row.closest('[data-side][data-state=collapsed]') !== null,\n})\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n size?: SidebarSize\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n size = 'medium',\n className,\n style,\n children,\n onPointerOver,\n onPointerOut,\n onFocus,\n onBlur,\n ...props\n },\n ref,\n ) => {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean) => {\n if (setOpenProp) {\n setOpenProp(value)\n } else {\n _setOpen(value)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp],\n )\n\n const toggleSidebar = React.useCallback(() => {\n if (isMobile) {\n setOpenMobile((value) => !value)\n } else {\n setOpen(!open)\n }\n }, [isMobile, open, setOpen])\n\n const toggleSidebarRef = React.useRef(toggleSidebar)\n React.useEffect(() => {\n toggleSidebarRef.current = toggleSidebar\n }, [toggleSidebar])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isShortcut =\n SIDEBAR_KEYBOARD_SHORTCUT.test(event.key) &&\n (event.metaKey || event.ctrlKey) &&\n !event.shiftKey &&\n !event.altKey\n const isEditing =\n event.target instanceof HTMLElement &&\n (event.target.isContentEditable || event.target.closest('input, textarea, select') !== null)\n\n if (isShortcut && !isEditing && !event.defaultPrevented) {\n event.preventDefault()\n toggleSidebarRef.current()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [])\n\n React.useEffect(trackInputModality, [])\n\n React.useEffect(() => {\n if (!open) {\n marquee.stopAll()\n }\n }, [open])\n\n const state = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo<SidebarContext>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n size,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar, size],\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider>\n <div\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON[size],\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'flex min-h-svh w-full [--page-padding:1rem] sm:[--page-padding:1.5rem] lg:[--page-padding:2rem]',\n className,\n )}\n ref={ref}\n onPointerOver={(event) => {\n onPointerOver?.(event)\n marquee.onPointerOver(event)\n }}\n onPointerOut={(event) => {\n onPointerOut?.(event)\n marquee.onPointerOut(event)\n }}\n onFocus={(event) => {\n onFocus?.(event)\n marquee.onFocus(event)\n }}\n onBlur={(event) => {\n onBlur?.(event)\n marquee.onBlur(event)\n }}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n },\n)\nSidebarProvider.displayName = 'SidebarProvider'\n\nconst SidebarRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n /** @deprecated The sidebar is always on the left; this prop is ignored. */\n side?: 'left' | 'right'\n variant?: 'default' | 'hidden'\n }\n>(({ variant = 'default', className, children, 'aria-label': ariaLabel = 'Main', ...props }, ref) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (isMobile) {\n return (\n <SheetRoot open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n ref={ref}\n data-sidebar=\"sidebar\"\n className={cn(\n 'bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 ease-out data-[state=closed]:duration-200 data-[state=open]:duration-300 motion-reduce:data-[state=closed]:duration-0 motion-reduce:data-[state=open]:duration-0',\n className,\n )}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n {...props}\n side=\"left\"\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <nav aria-label={ariaLabel} className=\"@container flex h-full w-full flex-col gap-3 px-3 pb-3\">\n {children}\n </nav>\n </SheetContent>\n </SheetRoot>\n )\n }\n\n return (\n <TooltipProvider delayDuration={0}>\n <div ref={ref} className=\"group text-sidebar-foreground hidden md:block\" data-state={state} data-side=\"left\">\n <div\n className={cn(\n 'w-(--sidebar-width) transition-[width]',\n MOTION,\n variant === 'default' && 'group-data-[state=collapsed]:w-(--sidebar-width-icon)',\n variant === 'hidden' && 'group-data-[state=collapsed]:w-0',\n )}\n />\n <div\n className={cn(\n 'fixed inset-y-0 left-0 z-10 flex h-svh w-(--sidebar-width) transition-[left,width]',\n MOTION,\n variant === 'default' && 'group-data-[state=collapsed]:w-(--sidebar-width-icon)',\n variant === 'hidden' && 'group-data-[state=collapsed]:-left-(--sidebar-width)',\n className,\n )}\n {...props}\n >\n <nav\n data-sidebar=\"sidebar\"\n aria-label={ariaLabel}\n className=\"bg-sidebar @container flex h-full w-full flex-col gap-3 px-3 pb-3\"\n >\n {children}\n </nav>\n </div>\n </div>\n </TooltipProvider>\n )\n})\nSidebarRoot.displayName = 'SidebarRoot'\n\nconst SIDEBAR_TRIGGER: Record<SidebarSize, string> = {\n small: 'size-7 [&>svg]:size-4.5',\n medium: 'size-8 [&>svg]:size-5',\n big: 'size-8 [&>svg]:size-6',\n}\n\nconst SidebarTrigger = React.forwardRef<HTMLButtonElement, React.ComponentProps<'button'> & { icon?: React.ReactNode }>(\n ({ className, onClick, icon, ...props }, ref) => {\n const { isMobile, toggleSidebar, size, open, openMobile } = useSidebar()\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-sidebar=\"trigger\"\n aria-expanded={isMobile ? openMobile : open}\n className={cn(\n 'text-sidebar-foreground hover:bg-sidebar-accent focus-visible:ring-sidebar-ring relative flex shrink-0 items-center justify-center rounded-lg outline-hidden focus-visible:ring-2',\n 'transition-colors motion-reduce:transition-none',\n SIDEBAR_TRIGGER[size],\n className,\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n {icon ?? (isMobile ? <ListIcon aria-hidden /> : <SidebarSimpleIcon aria-hidden />)}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </button>\n )\n },\n)\nSidebarTrigger.displayName = 'SidebarTrigger'\n\nconst SIDEBAR_HEADER_TRIGGER: Record<SidebarSize, string> = {\n small: 'right-0 group-data-[state=collapsed]:right-0.5',\n medium: 'right-0 group-data-[state=collapsed]:right-1',\n big: 'right-1 group-data-[state=collapsed]:right-2',\n}\n\nconst SidebarHeaderTrigger = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof SidebarTrigger>>(\n ({ className, ...props }, ref) => {\n const { isMobile, size } = useSidebar()\n\n if (isMobile) {\n return null\n }\n\n return (\n <SidebarTrigger\n ref={ref}\n className={cn(\n 'absolute inset-y-0 my-auto transition-[right,background-color]',\n MOTION,\n SIDEBAR_HEADER_TRIGGER[size],\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarHeaderTrigger.displayName = 'SidebarHeaderTrigger'\n\nconst SIDEBAR_LOGO: Record<SidebarSize, { frame: string; logo: string; tag: string }> = {\n small: { frame: '[--logo-inset:0.4375rem]', logo: 'h-8.5 w-10', tag: 'mb-[5.75px] ml-[3.75px] text-[8.75px]/none' },\n medium: { frame: '[--logo-inset:0.625rem]', logo: 'h-10 w-12', tag: 'mb-[6.5px] ml-[4.5px] text-[10.5px]/none' },\n big: { frame: '[--logo-inset:0.75rem]', logo: 'h-11.5 w-14', tag: 'mb-[7.25px] ml-[5.25px] text-[12.25px]/none' },\n}\n\nconst SidebarLogo = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & { asChild?: boolean; tag?: React.ReactNode }\n>(({ className, asChild = false, tag, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div'\n const { size, isMobile } = useSidebar()\n\n return (\n <div\n className={cn(\n 'flex w-full items-end overflow-hidden mask-[linear-gradient(to_right,transparent,black_var(--logo-inset))] py-0.5',\n 'transition-[opacity,visibility] group-data-[state=collapsed]:invisible group-data-[state=collapsed]:opacity-0',\n MOTION,\n SIDEBAR_LOGO[size].frame,\n )}\n >\n <Comp\n ref={ref}\n data-sidebar=\"logo\"\n className={cn(\n 'focus-visible:ring-sidebar-ring flex shrink-0 items-center justify-center rounded-lg outline-hidden focus-visible:ring-2',\n '[&>img]:aspect-48/27 [&>img]:w-full [&>img]:object-contain [&>svg]:aspect-48/27 [&>svg]:w-full',\n isMobile ? 'ml-(--logo-inset)' : 'ml-[calc(100%-var(--sidebar-width)+1.5rem+var(--logo-inset))]',\n SIDEBAR_LOGO[size].logo,\n className,\n )}\n {...props}\n />\n {tag && (\n <Typography\n weight=\"bold\"\n data-sidebar=\"logo-tag\"\n className={cn('shrink-0 whitespace-nowrap', SIDEBAR_LOGO[size].tag)}\n >\n {tag}\n </Typography>\n )}\n </div>\n )\n})\nSidebarLogo.displayName = 'SidebarLogo'\n\nconst SIDEBAR_INPUT_HEIGHT: Record<SidebarSize, string> = {\n small: 'h-8',\n medium: 'h-10',\n big: 'h-12',\n}\n\nconst SidebarInput = React.forwardRef<\n React.ComponentRef<typeof Input>,\n Omit<React.ComponentProps<typeof Input>, 'size'> & { size?: SidebarSize }\n>(({ className, size, id, onFocus, ...props }, ref) => {\n const { state, isMobile, setOpen } = useSidebar()\n const generatedId = React.useId()\n const inputId = id ?? generatedId\n const resolvedSize = useResolvedSize(size)\n const isRail = state === 'collapsed' && !isMobile\n\n return (\n <label htmlFor={inputId} className=\"block group-data-[state=collapsed]:cursor-pointer\">\n <Input\n ref={ref}\n id={inputId}\n data-sidebar=\"input\"\n className={cn('md:text-sm', SIDEBAR_INPUT_HEIGHT[resolvedSize], className)}\n onFocus={(event) => {\n onFocus?.(event)\n if (isRail) {\n setOpen(true)\n }\n }}\n {...props}\n />\n </label>\n )\n})\nSidebarInput.displayName = 'SidebarInput'\n\nconst SIDEBAR_HEADER: Record<SidebarSize, string> = {\n small: 'min-h-12',\n medium: 'min-h-14',\n big: 'min-h-16',\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n const { size } = useSidebar()\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn('relative flex shrink-0 items-center', SIDEBAR_HEADER[size], className)}\n {...props}\n />\n )\n})\nSidebarHeader.displayName = 'SidebarHeader'\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return <div ref={ref} data-sidebar=\"footer\" className={cn('flex flex-col gap-3', className)} {...props} />\n})\nSidebarFooter.displayName = 'SidebarFooter'\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, React.ComponentProps<typeof Separator>>(\n ({ className, ...props }, ref) => {\n return (\n <Separator ref={ref} data-sidebar=\"separator\" className={cn('bg-sidebar-border w-auto', className)} {...props} />\n )\n },\n)\nSidebarSeparator.displayName = 'SidebarSeparator'\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n '-my-1 -mr-3 -ml-1 flex min-h-0 flex-1 flex-col gap-3 overflow-x-hidden overflow-y-auto py-1 pl-1 md:mt-[calc(var(--page-padding)-15px)]',\n SCROLLBAR,\n '*:w-[min(100cqw,calc(100%-0.25rem))] *:shrink-0',\n className,\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = 'SidebarContent'\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return (\n <div ref={ref} data-sidebar=\"group\" className={cn('relative flex w-full min-w-0 flex-col', className)} {...props} />\n )\n})\nSidebarGroup.displayName = 'SidebarGroup'\n\nconst sidebarGroupLabelVariants = cva(\n [\n 'text-sidebar-foreground/70 ring-sidebar-ring flex shrink-0 items-center rounded-md transition-[margin,opacity] outline-hidden focus-visible:ring-2 [&>svg]:shrink-0 group-data-[state=collapsed]:opacity-0',\n MOTION,\n ].join(' '),\n {\n variants: {\n size: {\n small: 'h-8 pl-1.75 [&>svg]:size-4 group-data-[state=collapsed]:-mt-8',\n medium: 'h-10 pl-2.5 [&>svg]:size-4 group-data-[state=collapsed]:-mt-10',\n big: 'h-12 pl-3 [&>svg]:size-5 group-data-[state=collapsed]:-mt-12',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n)\n\nconst SIDEBAR_GROUP_LABEL_TEXT_VARIANT: Record<SidebarSize, 'label-md' | 'label-lg'> = {\n small: 'label-md',\n medium: 'label-md',\n big: 'label-lg',\n}\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & { asChild?: boolean; size?: SidebarSize }\n>(({ className, asChild = false, size, children, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div'\n const resolvedSize = useResolvedSize(size)\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(sidebarGroupLabelVariants({ size: resolvedSize }), className)}\n {...props}\n >\n {typeof children === 'string' ? (\n <Typography variant={SIDEBAR_GROUP_LABEL_TEXT_VARIANT[resolvedSize]} color=\"secondary\">\n {children}\n </Typography>\n ) : (\n children\n )}\n </Comp>\n )\n})\nSidebarGroupLabel.displayName = 'SidebarGroupLabel'\n\nconst sidebarGroupActionVariants = cva(\n [\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute flex aspect-square items-center justify-center rounded-md p-0 transition-[opacity,visibility,color,background-color] outline-hidden focus-visible:ring-2 after:absolute after:-inset-2 after:md:hidden group-data-[state=collapsed]:invisible group-data-[state=collapsed]:opacity-0 [&>svg]:shrink-0',\n MOTION,\n ].join(' '),\n {\n variants: {\n size: {\n small: 'top-1.5 right-1.5 w-5 [&>svg]:size-4',\n medium: 'top-2.5 right-1.5 w-5 [&>svg]:size-4',\n big: 'top-3 right-1.5 w-6 [&>svg]:size-5',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n)\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> & { asChild?: boolean; size?: SidebarSize }\n>(({ className, asChild = false, size, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n const resolvedSize = useResolvedSize(size)\n\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : 'button'}\n data-sidebar=\"group-action\"\n className={cn(sidebarGroupActionVariants({ size: resolvedSize }), className)}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = 'SidebarGroupAction'\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} data-sidebar=\"group-content\" className={cn('w-full text-sm', className)} {...props} />\n ),\n)\nSidebarGroupContent.displayName = 'SidebarGroupContent'\n\nexport {\n SidebarRoot,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarHeaderTrigger,\n SidebarInput,\n SidebarLogo,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n sidebarGroupActionVariants,\n sidebarGroupLabelVariants,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAA,sBAAA;AACA,IAAA,yBAAA;AACA,IAAA,gBAAA;AACA,IAAA,uBAAA;AACA,IAAA,4BAAA;AAEA,IAAA,qBAAA;CACE,OAAA;CACA,QAAA;CACA,KAAA;AACF;AAGA,IAAA,UAAA,cAAA;CACE,MAAA;C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,GAAA;CACD,CAAA;AAEL,CAAA;AACA,mBAAA,cAAA;AAEA,IAAA,sBAAA,QAAA,YAAA,EAAA,WAAA,GAAA,SAAA,QAAA,oBAAA,OAAA;CAEc;CAAK,gBAAA;CAA6B,WAAA,GAAA,kBAAA,SAAA;CAA4C,GAAA;AAAY,CAAA,CAAA;AAGxG,oBAAA,cAAA"}
1
+ {"version":3,"file":"Sidebar.js","names":["React"],"sources":["../../../../src/components/navigation/Sidebar/Sidebar.tsx"],"sourcesContent":["'use client'\n\nimport { ListIcon } from '@phosphor-icons/react/dist/ssr/List'\nimport { SidebarSimpleIcon } from '@phosphor-icons/react/dist/ssr/SidebarSimple'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { useIsMobile } from '../../../lib/useMobile'\nimport { Separator } from '../../data-display/Separator'\nimport { TooltipProvider } from '../../data-display/Tooltip'\nimport { Typography } from '../../data-display/Typography'\nimport { Input } from '../../inputs/Input'\nimport { SheetContent, SheetDescription, SheetHeader, SheetRoot, SheetTitle } from '../Sheet'\n\nimport { SidebarContext, useSidebar, useResolvedSize } from './context'\nimport type { SidebarSize } from './context'\nimport { MOTION, SCROLLBAR } from './styles'\n\nimport { trackInputModality } from '@/lib/inputModality'\nimport { createMarquee } from '@/lib/marquee'\nimport { cn } from '@/lib/utils'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '17.5rem'\nconst SIDEBAR_WIDTH_MOBILE = '18.5rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = /^b$/i\n\nconst SIDEBAR_WIDTH_ICON: Record<SidebarSize, string> = {\n small: '3.5rem',\n medium: '4rem',\n big: '4.5rem',\n}\n\nconst MARQUEE_ROW = '[data-sidebar=menu-button], [data-sidebar=menu-sub-button], [data-sidebar=user]'\nconst marquee = createMarquee({\n rows: MARQUEE_ROW,\n disabled: (row) => row.closest('[data-side][data-state=collapsed]') !== null,\n})\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n size?: SidebarSize\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n size = 'medium',\n className,\n style,\n children,\n onPointerOver,\n onPointerOut,\n onFocus,\n onBlur,\n ...props\n },\n ref,\n ) => {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n const [instant, setInstant] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean) => {\n if (setOpenProp) {\n setOpenProp(value)\n } else {\n _setOpen(value)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp],\n )\n\n const toggleSidebar = React.useCallback(() => {\n if (isMobile) {\n setOpenMobile((value) => !value)\n } else {\n setOpen(!open)\n }\n }, [isMobile, open, setOpen])\n\n const toggleSidebarRef = React.useRef(toggleSidebar)\n React.useEffect(() => {\n toggleSidebarRef.current = toggleSidebar\n }, [toggleSidebar])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isShortcut =\n SIDEBAR_KEYBOARD_SHORTCUT.test(event.key) &&\n (event.metaKey || event.ctrlKey) &&\n !event.shiftKey &&\n !event.altKey\n const isEditing =\n event.target instanceof HTMLElement &&\n (event.target.isContentEditable || event.target.closest('input, textarea, select') !== null)\n\n if (isShortcut && !isEditing && !event.defaultPrevented) {\n event.preventDefault()\n setInstant(true)\n toggleSidebarRef.current()\n requestAnimationFrame(() => requestAnimationFrame(() => setInstant(false)))\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [])\n\n React.useEffect(trackInputModality, [])\n\n React.useEffect(() => {\n if (!open) {\n marquee.stopAll()\n }\n }, [open])\n\n const state = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo<SidebarContext>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n size,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar, size],\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider>\n <div\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON[size],\n ...style,\n } as React.CSSProperties\n }\n data-instant={instant || undefined}\n className={cn(\n 'flex min-h-svh w-full [--page-padding:1rem] data-[instant=true]:**:duration-0! sm:[--page-padding:1.5rem] lg:[--page-padding:2rem]',\n className,\n )}\n ref={ref}\n onPointerOver={(event) => {\n onPointerOver?.(event)\n marquee.onPointerOver(event)\n }}\n onPointerOut={(event) => {\n onPointerOut?.(event)\n marquee.onPointerOut(event)\n }}\n onFocus={(event) => {\n onFocus?.(event)\n marquee.onFocus(event)\n }}\n onBlur={(event) => {\n onBlur?.(event)\n marquee.onBlur(event)\n }}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n },\n)\nSidebarProvider.displayName = 'SidebarProvider'\n\nconst SidebarRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & {\n /** @deprecated The sidebar is always on the left; this prop is ignored. */\n side?: 'left' | 'right'\n variant?: 'default' | 'hidden'\n }\n>(({ variant = 'default', className, children, 'aria-label': ariaLabel = 'Main', ...props }, ref) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (isMobile) {\n return (\n <SheetRoot open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n ref={ref}\n data-sidebar=\"sidebar\"\n className={cn('bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0', className)}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n {...props}\n side=\"left\"\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <nav aria-label={ariaLabel} className=\"@container flex h-full w-full flex-col gap-3 px-3 pb-3\">\n {children}\n </nav>\n </SheetContent>\n </SheetRoot>\n )\n }\n\n return (\n <TooltipProvider delayDuration={0}>\n <div ref={ref} className=\"group text-sidebar-foreground hidden md:block\" data-state={state} data-side=\"left\">\n <div\n className={cn(\n 'w-(--sidebar-width) transition-[width]',\n MOTION,\n variant === 'default' && 'group-data-[state=collapsed]:w-(--sidebar-width-icon)',\n variant === 'hidden' && 'group-data-[state=collapsed]:w-0',\n )}\n />\n <div\n className={cn(\n 'fixed inset-y-0 left-0 z-10 flex h-svh w-(--sidebar-width) transition-[left,width]',\n MOTION,\n variant === 'default' && 'group-data-[state=collapsed]:w-(--sidebar-width-icon)',\n variant === 'hidden' && 'group-data-[state=collapsed]:-left-(--sidebar-width)',\n className,\n )}\n {...props}\n >\n <nav\n data-sidebar=\"sidebar\"\n aria-label={ariaLabel}\n className=\"bg-sidebar @container flex h-full w-full flex-col gap-3 px-3 pb-3\"\n >\n {children}\n </nav>\n </div>\n </div>\n </TooltipProvider>\n )\n})\nSidebarRoot.displayName = 'SidebarRoot'\n\nconst SIDEBAR_TRIGGER: Record<SidebarSize, string> = {\n small: 'size-7 [&>svg]:size-4.5',\n medium: 'size-8 [&>svg]:size-5',\n big: 'size-8 [&>svg]:size-6',\n}\n\nconst SidebarTrigger = React.forwardRef<HTMLButtonElement, React.ComponentProps<'button'> & { icon?: React.ReactNode }>(\n ({ className, onClick, icon, ...props }, ref) => {\n const { isMobile, toggleSidebar, size, open, openMobile } = useSidebar()\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-sidebar=\"trigger\"\n aria-expanded={isMobile ? openMobile : open}\n className={cn(\n 'text-sidebar-foreground hover:bg-sidebar-accent focus-visible:ring-sidebar-ring relative flex shrink-0 items-center justify-center rounded-lg outline-hidden focus-visible:ring-2',\n 'transition-colors motion-reduce:transition-none',\n SIDEBAR_TRIGGER[size],\n className,\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n {icon ?? (isMobile ? <ListIcon aria-hidden /> : <SidebarSimpleIcon aria-hidden />)}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </button>\n )\n },\n)\nSidebarTrigger.displayName = 'SidebarTrigger'\n\nconst SIDEBAR_HEADER_TRIGGER: Record<SidebarSize, string> = {\n small: 'right-0 group-data-[state=collapsed]:right-0.5',\n medium: 'right-0 group-data-[state=collapsed]:right-1',\n big: 'right-1 group-data-[state=collapsed]:right-2',\n}\n\nconst SidebarHeaderTrigger = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof SidebarTrigger>>(\n ({ className, ...props }, ref) => {\n const { isMobile, size } = useSidebar()\n\n if (isMobile) {\n return null\n }\n\n return (\n <SidebarTrigger\n ref={ref}\n className={cn(\n 'absolute inset-y-0 my-auto transition-[right,background-color]',\n MOTION,\n SIDEBAR_HEADER_TRIGGER[size],\n className,\n )}\n {...props}\n />\n )\n },\n)\nSidebarHeaderTrigger.displayName = 'SidebarHeaderTrigger'\n\nconst SIDEBAR_LOGO: Record<SidebarSize, { frame: string; logo: string; tag: string }> = {\n small: { frame: '[--logo-inset:0.4375rem]', logo: 'h-8.5 w-10', tag: 'mb-[5.75px] ml-[3.75px] text-[8.75px]/none' },\n medium: { frame: '[--logo-inset:0.625rem]', logo: 'h-10 w-12', tag: 'mb-[6.5px] ml-[4.5px] text-[10.5px]/none' },\n big: { frame: '[--logo-inset:0.75rem]', logo: 'h-11.5 w-14', tag: 'mb-[7.25px] ml-[5.25px] text-[12.25px]/none' },\n}\n\nconst SidebarLogo = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & { asChild?: boolean; tag?: React.ReactNode }\n>(({ className, asChild = false, tag, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div'\n const { size, isMobile } = useSidebar()\n\n return (\n <div\n className={cn(\n 'flex w-full items-end overflow-hidden mask-[linear-gradient(to_right,transparent,black_var(--logo-inset))] py-0.5',\n 'transition-[opacity,visibility] group-data-[state=collapsed]:invisible group-data-[state=collapsed]:opacity-0',\n MOTION,\n SIDEBAR_LOGO[size].frame,\n )}\n >\n <Comp\n ref={ref}\n data-sidebar=\"logo\"\n className={cn(\n 'focus-visible:ring-sidebar-ring flex shrink-0 items-center justify-center rounded-lg outline-hidden focus-visible:ring-2',\n '[&>img]:aspect-48/27 [&>img]:w-full [&>img]:object-contain [&>svg]:aspect-48/27 [&>svg]:w-full',\n isMobile ? 'ml-(--logo-inset)' : 'ml-[calc(100%-var(--sidebar-width)+1.5rem+var(--logo-inset))]',\n SIDEBAR_LOGO[size].logo,\n className,\n )}\n {...props}\n />\n {tag && (\n <Typography\n weight=\"bold\"\n data-sidebar=\"logo-tag\"\n className={cn('shrink-0 whitespace-nowrap', SIDEBAR_LOGO[size].tag)}\n >\n {tag}\n </Typography>\n )}\n </div>\n )\n})\nSidebarLogo.displayName = 'SidebarLogo'\n\nconst SIDEBAR_INPUT_HEIGHT: Record<SidebarSize, string> = {\n small: 'h-8',\n medium: 'h-10',\n big: 'h-12',\n}\n\nconst SidebarInput = React.forwardRef<\n React.ComponentRef<typeof Input>,\n Omit<React.ComponentProps<typeof Input>, 'size'> & { size?: SidebarSize }\n>(({ className, size, id, onFocus, ...props }, ref) => {\n const { state, isMobile, setOpen } = useSidebar()\n const generatedId = React.useId()\n const inputId = id ?? generatedId\n const resolvedSize = useResolvedSize(size)\n const isRail = state === 'collapsed' && !isMobile\n\n return (\n <label htmlFor={inputId} className=\"block group-data-[state=collapsed]:cursor-pointer\">\n <Input\n ref={ref}\n id={inputId}\n data-sidebar=\"input\"\n className={cn('md:text-sm', SIDEBAR_INPUT_HEIGHT[resolvedSize], className)}\n onFocus={(event) => {\n onFocus?.(event)\n if (isRail) {\n setOpen(true)\n }\n }}\n {...props}\n />\n </label>\n )\n})\nSidebarInput.displayName = 'SidebarInput'\n\nconst SIDEBAR_HEADER: Record<SidebarSize, string> = {\n small: 'min-h-12',\n medium: 'min-h-14',\n big: 'min-h-16',\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n const { size } = useSidebar()\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn('relative flex shrink-0 items-center', SIDEBAR_HEADER[size], className)}\n {...props}\n />\n )\n})\nSidebarHeader.displayName = 'SidebarHeader'\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return <div ref={ref} data-sidebar=\"footer\" className={cn('flex flex-col gap-3', className)} {...props} />\n})\nSidebarFooter.displayName = 'SidebarFooter'\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, React.ComponentProps<typeof Separator>>(\n ({ className, ...props }, ref) => {\n return (\n <Separator ref={ref} data-sidebar=\"separator\" className={cn('bg-sidebar-border w-auto', className)} {...props} />\n )\n },\n)\nSidebarSeparator.displayName = 'SidebarSeparator'\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n '-my-1 -mr-3 -ml-1 flex min-h-0 flex-1 flex-col gap-3 overflow-x-hidden overflow-y-auto py-1 pl-1 md:mt-[calc(var(--page-padding)-15px)]',\n SCROLLBAR,\n '*:w-[min(100cqw,calc(100%-0.25rem))] *:shrink-0',\n className,\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = 'SidebarContent'\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(({ className, ...props }, ref) => {\n return (\n <div ref={ref} data-sidebar=\"group\" className={cn('relative flex w-full min-w-0 flex-col', className)} {...props} />\n )\n})\nSidebarGroup.displayName = 'SidebarGroup'\n\nconst sidebarGroupLabelVariants = cva(\n [\n 'text-sidebar-foreground/70 ring-sidebar-ring flex shrink-0 items-center rounded-md transition-[margin,opacity] outline-hidden focus-visible:ring-2 [&>svg]:shrink-0 group-data-[state=collapsed]:opacity-0',\n MOTION,\n ].join(' '),\n {\n variants: {\n size: {\n small: 'h-8 pl-1.75 [&>svg]:size-4 group-data-[state=collapsed]:-mt-8',\n medium: 'h-10 pl-2.5 [&>svg]:size-4 group-data-[state=collapsed]:-mt-10',\n big: 'h-12 pl-3 [&>svg]:size-5 group-data-[state=collapsed]:-mt-12',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n)\n\nconst SIDEBAR_GROUP_LABEL_TEXT_VARIANT: Record<SidebarSize, 'label-md' | 'label-lg'> = {\n small: 'label-md',\n medium: 'label-md',\n big: 'label-lg',\n}\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> & { asChild?: boolean; size?: SidebarSize }\n>(({ className, asChild = false, size, children, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div'\n const resolvedSize = useResolvedSize(size)\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(sidebarGroupLabelVariants({ size: resolvedSize }), className)}\n {...props}\n >\n {typeof children === 'string' ? (\n <Typography variant={SIDEBAR_GROUP_LABEL_TEXT_VARIANT[resolvedSize]} color=\"secondary\">\n {children}\n </Typography>\n ) : (\n children\n )}\n </Comp>\n )\n})\nSidebarGroupLabel.displayName = 'SidebarGroupLabel'\n\nconst sidebarGroupActionVariants = cva(\n [\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute flex aspect-square items-center justify-center rounded-md p-0 transition-[opacity,visibility,color,background-color] outline-hidden focus-visible:ring-2 after:absolute after:-inset-2 after:md:hidden group-data-[state=collapsed]:invisible group-data-[state=collapsed]:opacity-0 [&>svg]:shrink-0',\n MOTION,\n ].join(' '),\n {\n variants: {\n size: {\n small: 'top-1.5 right-1.5 w-5 [&>svg]:size-4',\n medium: 'top-2.5 right-1.5 w-5 [&>svg]:size-4',\n big: 'top-3 right-1.5 w-6 [&>svg]:size-5',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n)\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> & { asChild?: boolean; size?: SidebarSize }\n>(({ className, asChild = false, size, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n const resolvedSize = useResolvedSize(size)\n\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : 'button'}\n data-sidebar=\"group-action\"\n className={cn(sidebarGroupActionVariants({ size: resolvedSize }), className)}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = 'SidebarGroupAction'\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} data-sidebar=\"group-content\" className={cn('w-full text-sm', className)} {...props} />\n ),\n)\nSidebarGroupContent.displayName = 'SidebarGroupContent'\n\nexport {\n SidebarRoot,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarHeaderTrigger,\n SidebarInput,\n SidebarLogo,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n sidebarGroupActionVariants,\n sidebarGroupLabelVariants,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAA,sBAAA;AACA,IAAA,yBAAA;AACA,IAAA,gBAAA;AACA,IAAA,uBAAA;AACA,IAAA,4BAAA;AAEA,IAAA,qBAAA;CACE,OAAA;CACA,QAAA;CACA,KAAA;AACF;AAGA,IAAA,UAAA,cAAA;CACE,MAAA;CACA,WAAA,QAAA,IAAA,QAAA,mCAAA,MAAA;AACF,CAAA;AAEA,IAAA,kBAAA,QAAA,YAAA,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