@uselets/ui 2.0.0 → 2.0.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 (209) hide show
  1. package/dist/{as-child-Dxg3Xo1G.d.ts → as-child-T9W73ZYU.d.ts} +1 -3
  2. package/dist/{chart-B_6nC_ih.d.ts → chart-8rgtsk95.d.ts} +1 -3
  3. package/dist/cli/uselets.mjs.map +1 -1
  4. package/dist/components/accordion.d.ts +1 -3
  5. package/dist/components/accordion.js.map +1 -1
  6. package/dist/components/alert-dialog.d.ts +5 -5
  7. package/dist/components/alert-dialog.js +1 -1
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/alert.d.ts +0 -2
  10. package/dist/components/alert.js.map +1 -1
  11. package/dist/components/anchor.d.ts +1 -3
  12. package/dist/components/anchor.js.map +1 -1
  13. package/dist/components/area-chart.d.ts +1 -3
  14. package/dist/components/area-chart.js.map +1 -1
  15. package/dist/components/avatar.d.ts +1 -3
  16. package/dist/components/avatar.js.map +1 -1
  17. package/dist/components/badge.d.ts +1 -3
  18. package/dist/components/badge.js.map +1 -1
  19. package/dist/components/bar-chart.d.ts +1 -3
  20. package/dist/components/bar-chart.js.map +1 -1
  21. package/dist/components/bottom-nav.d.ts +1 -3
  22. package/dist/components/bottom-nav.js.map +1 -1
  23. package/dist/components/breadcrumb.d.ts +1 -3
  24. package/dist/components/breadcrumb.js.map +1 -1
  25. package/dist/components/button-group.d.ts +1 -3
  26. package/dist/components/button-group.js.map +1 -1
  27. package/dist/components/button.d.ts +1 -3
  28. package/dist/components/button.js.map +1 -1
  29. package/dist/components/calendar.d.ts +0 -2
  30. package/dist/components/calendar.js +1 -1
  31. package/dist/components/calendar.js.map +1 -1
  32. package/dist/components/card.d.ts +0 -2
  33. package/dist/components/card.js.map +1 -1
  34. package/dist/components/carousel.d.ts +0 -2
  35. package/dist/components/carousel.js.map +1 -1
  36. package/dist/components/center.d.ts +0 -2
  37. package/dist/components/center.js.map +1 -1
  38. package/dist/components/chart.d.ts +1 -1
  39. package/dist/components/chart.js.map +1 -1
  40. package/dist/components/checkbox.d.ts +0 -2
  41. package/dist/components/checkbox.js.map +1 -1
  42. package/dist/components/code.d.ts +0 -2
  43. package/dist/components/code.js.map +1 -1
  44. package/dist/components/collapsible.d.ts +1 -3
  45. package/dist/components/collapsible.js.map +1 -1
  46. package/dist/components/combobox.d.ts +1 -3
  47. package/dist/components/combobox.js.map +1 -1
  48. package/dist/components/command.d.ts +0 -2
  49. package/dist/components/command.js.map +1 -1
  50. package/dist/components/container.d.ts +0 -2
  51. package/dist/components/container.js.map +1 -1
  52. package/dist/components/data-table.d.ts +0 -2
  53. package/dist/components/data-table.js.map +1 -1
  54. package/dist/components/date-range-picker.d.ts +0 -2
  55. package/dist/components/date-range-picker.js.map +1 -1
  56. package/dist/components/dialog.d.ts +5 -5
  57. package/dist/components/dialog.js +1 -1
  58. package/dist/components/dialog.js.map +1 -1
  59. package/dist/components/direction.d.ts +0 -2
  60. package/dist/components/donut-chart.d.ts +0 -2
  61. package/dist/components/donut-chart.js.map +1 -1
  62. package/dist/components/drawer.d.ts +2 -4
  63. package/dist/components/drawer.js +1 -1
  64. package/dist/components/drawer.js.map +1 -1
  65. package/dist/components/dropdown-menu.d.ts +1 -3
  66. package/dist/components/dropdown-menu.js.map +1 -1
  67. package/dist/components/dropzone.d.ts +0 -2
  68. package/dist/components/dropzone.js.map +1 -1
  69. package/dist/components/empty.d.ts +0 -2
  70. package/dist/components/empty.js.map +1 -1
  71. package/dist/components/field.d.ts +0 -2
  72. package/dist/components/field.js.map +1 -1
  73. package/dist/components/flex.d.ts +0 -2
  74. package/dist/components/flex.js.map +1 -1
  75. package/dist/components/grid.d.ts +0 -2
  76. package/dist/components/grid.js.map +1 -1
  77. package/dist/components/group.d.ts +0 -2
  78. package/dist/components/group.js.map +1 -1
  79. package/dist/components/heading.d.ts +1 -3
  80. package/dist/components/heading.js.map +1 -1
  81. package/dist/components/hover-card.d.ts +1 -3
  82. package/dist/components/hover-card.js.map +1 -1
  83. package/dist/components/input-group.d.ts +0 -2
  84. package/dist/components/input-group.js.map +1 -1
  85. package/dist/components/input-otp.d.ts +0 -2
  86. package/dist/components/input-otp.js.map +1 -1
  87. package/dist/components/input.d.ts +0 -2
  88. package/dist/components/input.js.map +1 -1
  89. package/dist/components/kbd.d.ts +0 -2
  90. package/dist/components/kbd.js.map +1 -1
  91. package/dist/components/label.d.ts +1 -3
  92. package/dist/components/label.js.map +1 -1
  93. package/dist/components/list.d.ts +1 -3
  94. package/dist/components/list.js.map +1 -1
  95. package/dist/components/logo.d.ts +0 -2
  96. package/dist/components/marker.d.ts +1 -3
  97. package/dist/components/marker.js.map +1 -1
  98. package/dist/components/mask-input.d.ts +0 -2
  99. package/dist/components/mask-input.js.map +1 -1
  100. package/dist/components/native-select.d.ts +0 -2
  101. package/dist/components/native-select.js.map +1 -1
  102. package/dist/components/navigation-menu.d.ts +1 -3
  103. package/dist/components/navigation-menu.js.map +1 -1
  104. package/dist/components/number-field.d.ts +1 -3
  105. package/dist/components/number-field.js.map +1 -1
  106. package/dist/components/pagination.d.ts +0 -2
  107. package/dist/components/pagination.js.map +1 -1
  108. package/dist/components/phone-input.d.ts +0 -2
  109. package/dist/components/phone-input.js.map +1 -1
  110. package/dist/components/pie-chart.d.ts +1 -3
  111. package/dist/components/pie-chart.js.map +1 -1
  112. package/dist/components/popover.d.ts +1 -3
  113. package/dist/components/popover.js.map +1 -1
  114. package/dist/components/progress.d.ts +0 -2
  115. package/dist/components/progress.js.map +1 -1
  116. package/dist/components/radio-group.d.ts +0 -2
  117. package/dist/components/radio-group.js.map +1 -1
  118. package/dist/components/resizable.d.ts +0 -2
  119. package/dist/components/resizable.js.map +1 -1
  120. package/dist/components/ring-progress.d.ts +0 -2
  121. package/dist/components/ring-progress.js.map +1 -1
  122. package/dist/components/scroll-area.d.ts +0 -2
  123. package/dist/components/scroll-area.js.map +1 -1
  124. package/dist/components/select.d.ts +1 -3
  125. package/dist/components/select.js.map +1 -1
  126. package/dist/components/separator.d.ts +1 -3
  127. package/dist/components/separator.js.map +1 -1
  128. package/dist/components/sidebar.d.ts +1 -3
  129. package/dist/components/sidebar.js.map +1 -1
  130. package/dist/components/simple-grid.d.ts +0 -2
  131. package/dist/components/simple-grid.js.map +1 -1
  132. package/dist/components/skeleton.d.ts +0 -2
  133. package/dist/components/skeleton.js.map +1 -1
  134. package/dist/components/slider.d.ts +0 -2
  135. package/dist/components/slider.js.map +1 -1
  136. package/dist/components/sonner.d.ts +0 -2
  137. package/dist/components/sonner.js.map +1 -1
  138. package/dist/components/spinner.d.ts +0 -2
  139. package/dist/components/spinner.js.map +1 -1
  140. package/dist/components/stack.d.ts +0 -2
  141. package/dist/components/stack.js.map +1 -1
  142. package/dist/components/stepper.d.ts +1 -3
  143. package/dist/components/stepper.js.map +1 -1
  144. package/dist/components/switch.d.ts +0 -2
  145. package/dist/components/switch.js.map +1 -1
  146. package/dist/components/table.d.ts +0 -2
  147. package/dist/components/table.js.map +1 -1
  148. package/dist/components/tabs.d.ts +1 -3
  149. package/dist/components/tabs.js.map +1 -1
  150. package/dist/components/text.d.ts +1 -3
  151. package/dist/components/text.js.map +1 -1
  152. package/dist/components/textarea.d.ts +0 -2
  153. package/dist/components/textarea.js.map +1 -1
  154. package/dist/components/theme.d.ts +0 -2
  155. package/dist/components/theme.js.map +1 -1
  156. package/dist/components/timeline.d.ts +0 -2
  157. package/dist/components/timeline.js.map +1 -1
  158. package/dist/components/toggle-group.d.ts +1 -3
  159. package/dist/components/toggle-group.js.map +1 -1
  160. package/dist/components/toggle.d.ts +1 -3
  161. package/dist/components/toggle.js.map +1 -1
  162. package/dist/components/tooltip.d.ts +1 -3
  163. package/dist/components/tooltip.js.map +1 -1
  164. package/dist/components/unstyled-button.d.ts +1 -3
  165. package/dist/components/unstyled-button.js.map +1 -1
  166. package/dist/components/visibility.d.ts +0 -2
  167. package/dist/components/visibility.js.map +1 -1
  168. package/dist/hooks/use-breakpoint-value.d.ts +0 -2
  169. package/dist/hooks/use-breakpoint-value.js.map +1 -1
  170. package/dist/hooks/use-breakpoint.d.ts +0 -2
  171. package/dist/hooks/use-breakpoint.js.map +1 -1
  172. package/dist/hooks/use-disclosure.d.ts +0 -2
  173. package/dist/hooks/use-disclosure.js.map +1 -1
  174. package/dist/hooks/use-document-visibility.d.ts +0 -2
  175. package/dist/hooks/use-document-visibility.js.map +1 -1
  176. package/dist/hooks/use-hotkeys.d.ts +1 -1
  177. package/dist/hooks/use-idle.d.ts +0 -2
  178. package/dist/hooks/use-idle.js.map +1 -1
  179. package/dist/hooks/use-interval.d.ts +0 -2
  180. package/dist/hooks/use-interval.js.map +1 -1
  181. package/dist/hooks/use-local-storage.d.ts +0 -2
  182. package/dist/hooks/use-local-storage.js.map +1 -1
  183. package/dist/hooks/use-mask.d.ts +0 -2
  184. package/dist/hooks/use-mask.js.map +1 -1
  185. package/dist/hooks/use-mobile.d.ts +0 -2
  186. package/dist/hooks/use-mobile.js.map +1 -1
  187. package/dist/index.d.ts +3 -3
  188. package/dist/lib/as-child.d.ts +1 -1
  189. package/dist/lib/as-child.js.map +1 -1
  190. package/dist/lib/badge.d.ts +0 -2
  191. package/dist/lib/badge.js.map +1 -1
  192. package/dist/lib/button.d.ts +0 -2
  193. package/dist/lib/button.js.map +1 -1
  194. package/dist/lib/color.d.ts +0 -2
  195. package/dist/lib/color.js.map +1 -1
  196. package/dist/lib/compose-refs.d.ts +0 -2
  197. package/dist/lib/compose-refs.js.map +1 -1
  198. package/dist/lib/progress.d.ts +0 -2
  199. package/dist/lib/progress.js.map +1 -1
  200. package/dist/lib/utils.d.ts +0 -2
  201. package/dist/lib/utils.js.map +1 -1
  202. package/dist/logo--R3_XDgA.js.map +1 -1
  203. package/dist/postcss.config.js.map +1 -1
  204. package/dist/resolve-class-name-BurP8ngI.js.map +1 -1
  205. package/dist/skills/uselets-ui/references/component-catalog.md +3 -3
  206. package/dist/{use-hotkeys-D1_TEIwN.d.ts → use-hotkeys-BVm0IGb8.d.ts} +1 -5
  207. package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
  208. package/package.json +9 -9
  209. package/skills/uselets-ui/references/component-catalog.md +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["SelectPrimitive","resolveClassName","Select$1","props","cn","className","state","toAsChildRenderProps","asChild","children","ariaInvalid","fieldControlId","useFieldControlId","id","invalid","useFieldInvalid","size","IconSelector","alignItemWithTrigger","IconCheck","IconChevronUp","IconChevronDown"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { useFieldControlId, useFieldInvalid } from './field'\n\nexport type SelectProps<Value = string, Multiple extends boolean | undefined = false> = SelectPrimitive.Root.Props<\n Value,\n Multiple\n>\n\nexport type SelectGroupProps = AsChildPrimitiveProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = AsChildPrimitiveProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = AsChildPrimitiveProps<typeof SelectPrimitive.Trigger> & {\n /**\n * Height of the trigger.\n * @default 'md'\n */\n size?: 'sm' | 'md'\n}\n\nexport type SelectContentProps = Omit<React.ComponentProps<typeof SelectPrimitive.Popup>, 'render'> &\n Pick<\n React.ComponentProps<typeof SelectPrimitive.Positioner>,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'alignItemWithTrigger' | 'sticky'\n >\n\nexport type SelectLabelProps = AsChildPrimitiveProps<typeof SelectPrimitive.GroupLabel>\n\nexport type SelectItemProps = Omit<React.ComponentProps<typeof SelectPrimitive.Item>, 'render'>\n\nexport type SelectSeparatorProps = AsChildPrimitiveProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = AsChildPrimitiveProps<typeof SelectPrimitive.ScrollUpArrow>\n\nexport type SelectScrollDownButtonProps = AsChildPrimitiveProps<typeof SelectPrimitive.ScrollDownArrow>\n\nfunction Select<Value = string, Multiple extends boolean | undefined = false>({\n ...props\n}: SelectProps<Value, Multiple>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, asChild, children, ...props }: SelectGroupProps) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={(state) => cn('scroll-my-1 p-1', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction SelectValue({ asChild, children, ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} {...toAsChildRenderProps(asChild, children)} />\n}\n\nfunction SelectTrigger({\n className,\n id,\n size = 'md',\n children,\n asChild,\n 'aria-invalid': ariaInvalid,\n ...props\n}: SelectTriggerProps) {\n const fieldControlId = useFieldControlId(id)\n const invalid = useFieldInvalid(ariaInvalid)\n\n return (\n <SelectPrimitive.Trigger\n id={fieldControlId}\n aria-invalid={invalid}\n data-slot=\"select-trigger\"\n data-size={size}\n className={(state) =>\n cn(\n 'border-input data-placeholder:text-placeholder dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=md]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && children}\n {!asChild && (\n <SelectPrimitive.Icon render={<IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />} />\n )}\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = 'bottom',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n alignItemWithTrigger = true,\n sticky,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n sticky={sticky}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={(state) =>\n cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative isolate z-50 min-w-[max(--spacing(36),var(--anchor-width))] max-h-(--available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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 'data-[align-trigger=true]:animate-none',\n resolveClassName(className, state)\n )\n }\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, asChild, children, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={(state) => cn('text-muted-foreground px-1.5 py-1 text-xs', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={(state) =>\n cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n resolveClassName(className, state)\n )\n }\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText render={<span />}>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, asChild, children, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={(state) => cn('bg-border -mx-1 my-1 h-px pointer-events-none', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, asChild, children, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={(state) =>\n cn(\n 'bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({ className, asChild, children, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={(state) =>\n cn(\n 'bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue\n}\n"],"mappings":"4cA2CA,SAAS,OAAqE,CAC5E,GAAGG,GAC4B,CAC/B,MAAO,kBAACH,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAIG,CAAQ,CAAA,CAC9D,CAEA,SAAS,YAAY,CAAE,YAAW,UAAS,WAAU,GAAGA,GAA2B,CACjF,MACE,kBAACH,EAAgB,MAAjB,CACE,YAAU,eACV,UAAY,GAAUI,EAAG,kBAAmBH,EAAiBI,EAAWC,CAAK,CAAC,EAC9E,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,UAAS,WAAU,GAAGN,GAA2B,CACtE,MAAO,kBAACH,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAIG,EAAO,GAAII,EAAqBC,EAASC,CAAQ,CAAI,CAAA,CAClH,CAEA,SAAS,cAAc,CACrB,YACA,KACA,OAAO,KACP,WACA,UACA,eAAgBC,EAChB,GAAGP,GACkB,CACrB,IAAMQ,EAAiBC,EAAkBC,CAAE,EACrCC,EAAUC,EAAgBL,CAAW,EAE3C,MACE,kBAACV,EAAgB,QAAjB,CACE,GAAIW,EACJ,eAAcG,EACd,YAAU,iBACV,YAAWE,EACX,UAAY,GACVZ,EACE,gQACA,4EACA,qKACA,4F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AM,UAAU,+EACd,SAAA,kBAACH,EAAgB,cAAjB,CAAA,SACE,kBAACmB,EAAD,CAAW,UAAU,qBAAuB,CAAA,CACf,CAAA,CAC3B,CAAA,EACN,kBAACnB,EAAgB,SAAjB,CAA0B,OAAQ,kBAAC,OAAD,CAAO,CAAA,EAAI,UAAmC,CAAA,CAC5D,GAE1B,CAEA,SAAS,gBAAgB,CAAE,YAAW,UAAS,WAAU,GAAGG,GAA+B,CACzF,MACE,kBAACH,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAY,GAAUI,EAAG,gDAAiDH,EAAiBI,EAAWC,CAAK,CAAC,EAC5G,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,UAAS,WAAU,GAAGN,GAAoC,CACnG,MACE,kBAACH,EAAgB,cAAjB,CACE,YAAU,0BACV,UAAY,GACVI,EACE,oFACA,uCACAH,EAAiBI,EAAWC,CAAK,CACnC,EAEF,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,EAE1C,SAAA,kBAACW,EAAD,CAAgB,CAAA,CACa,CAAA,CAEnC,CAEA,SAAS,uBAAuB,CAAE,YAAW,UAAS,WAAU,GAAGjB,GAAsC,CACvG,MACE,kBAACH,EAAgB,gBAAjB,CACE,YAAU,4BACV,UAAY,GACVI,EACE,uFACA,uCACAH,EAAiBI,EAAWC,CAAK,CACnC,EAEF,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,EAE1C,SAAA,kBAACY,EAAD,CAAkB,CAAA,CACa,CAAA,CAErC"}
1
+ {"version":3,"file":"select.js","names":["SelectPrimitive","resolveClassName","Select$1","props","cn","className","state","toAsChildRenderProps","asChild","children","ariaInvalid","fieldControlId","useFieldControlId","id","invalid","useFieldInvalid","size","IconSelector","alignItemWithTrigger","IconCheck","IconChevronUp","IconChevronDown"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { useFieldControlId, useFieldInvalid } from './field'\n\nexport type SelectProps<Value = string, Multiple extends boolean | undefined = false> = SelectPrimitive.Root.Props<\n Value,\n Multiple\n>\n\nexport type SelectGroupProps = AsChildPrimitiveProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = AsChildPrimitiveProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = AsChildPrimitiveProps<typeof SelectPrimitive.Trigger> & {\n /**\n * Height of the trigger.\n * @default 'md'\n */\n size?: 'sm' | 'md'\n}\n\nexport type SelectContentProps = Omit<React.ComponentProps<typeof SelectPrimitive.Popup>, 'render'> &\n Pick<\n React.ComponentProps<typeof SelectPrimitive.Positioner>,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'alignItemWithTrigger' | 'sticky'\n >\n\nexport type SelectLabelProps = AsChildPrimitiveProps<typeof SelectPrimitive.GroupLabel>\n\nexport type SelectItemProps = Omit<React.ComponentProps<typeof SelectPrimitive.Item>, 'render'>\n\nexport type SelectSeparatorProps = AsChildPrimitiveProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = AsChildPrimitiveProps<typeof SelectPrimitive.ScrollUpArrow>\n\nexport type SelectScrollDownButtonProps = AsChildPrimitiveProps<typeof SelectPrimitive.ScrollDownArrow>\n\nfunction Select<Value = string, Multiple extends boolean | undefined = false>({\n ...props\n}: SelectProps<Value, Multiple>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, asChild, children, ...props }: SelectGroupProps) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={(state) => cn('scroll-my-1 p-1', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction SelectValue({ asChild, children, ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} {...toAsChildRenderProps(asChild, children)} />\n}\n\nfunction SelectTrigger({\n className,\n id,\n size = 'md',\n children,\n asChild,\n 'aria-invalid': ariaInvalid,\n ...props\n}: SelectTriggerProps) {\n const fieldControlId = useFieldControlId(id)\n const invalid = useFieldInvalid(ariaInvalid)\n\n return (\n <SelectPrimitive.Trigger\n id={fieldControlId}\n aria-invalid={invalid}\n data-slot=\"select-trigger\"\n data-size={size}\n className={(state) =>\n cn(\n 'border-input data-placeholder:text-placeholder dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=md]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && children}\n {!asChild && (\n <SelectPrimitive.Icon render={<IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />} />\n )}\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = 'bottom',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n alignItemWithTrigger = true,\n sticky,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n sticky={sticky}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={(state) =>\n cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative isolate z-50 min-w-[max(--spacing(36),var(--anchor-width))] max-h-(--available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n '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 'data-[align-trigger=true]:animate-none',\n resolveClassName(className, state)\n )\n }\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, asChild, children, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={(state) => cn('text-muted-foreground px-1.5 py-1 text-xs', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={(state) =>\n cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n resolveClassName(className, state)\n )\n }\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText render={<span />}>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, asChild, children, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={(state) => cn('bg-border -mx-1 my-1 h-px pointer-events-none', resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, asChild, children, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={(state) =>\n cn(\n 'bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({ className, asChild, children, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={(state) =>\n cn(\n 'bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n S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,CAAK,CAAC,EAC5G,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,UAAS,WAAU,GAAGN,GAAoC,CACnG,MACE,kBAACH,EAAgB,cAAjB,CACE,YAAU,0BACV,UAAY,GACVI,EACE,oFACA,uCACAH,EAAiBI,EAAWC,CAAK,CACnC,EAEF,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,EAE1C,SAAA,kBAACW,EAAD,CAAgB,CAAA,CACa,CAAA,CAEnC,CAEA,SAAS,uBAAuB,CAAE,YAAW,UAAS,WAAU,GAAGjB,GAAsC,CACvG,MACE,kBAACH,EAAgB,gBAAjB,CACE,YAAU,4BACV,UAAY,GACVI,EACE,uFACA,uCACAH,EAAiBI,EAAWC,CAAK,CACnC,EAEF,GAAIH,EACJ,GAAII,EAAqBC,EAASC,CAAQ,EAE1C,SAAA,kBAACY,EAAD,CAAkB,CAAA,CACa,CAAA,CAErC,C"}
@@ -1,7 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { t as AsChildPrimitiveProps } from "../as-child-Dxg3Xo1G.js";
2
+ import { t as AsChildPrimitiveProps } from "../as-child-T9W73ZYU.js";
3
3
  import { Separator as Separator$1 } from "@base-ui/react/separator";
4
- //#region src/components/separator.d.ts
5
4
  export type SeparatorProps = AsChildPrimitiveProps<typeof Separator$1> & {
6
5
  /**
7
6
  * When `true` (default), the separator is purely visual and hidden from assistive technology.
@@ -9,6 +8,5 @@ export type SeparatorProps = AsChildPrimitiveProps<typeof Separator$1> & {
9
8
  decorative?: boolean;
10
9
  };
11
10
  declare function Separator({ className, orientation, decorative, asChild, children, ...props }: SeparatorProps): import("react").JSX.Element;
12
- //#endregion
13
11
  export { Separator };
14
12
  //# sourceMappingURL=separator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"separator.js","names":["SeparatorPrimitive","resolveClassName","Separator$1","props","decorative","cn","className","state","toAsChildRenderProps","asChild","children"],"sources":["../../src/components/separator.tsx"],"sourcesContent":["import { Separator as SeparatorPrimitive } from '@base-ui/react/separator'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nexport type SeparatorProps = AsChildPrimitiveProps<typeof SeparatorPrimitive> & {\n /**\n * When `true` (default), the separator is purely visual and hidden from assistive technology.\n */\n decorative?: boolean\n}\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n asChild,\n children,\n ...props\n}: SeparatorProps) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n {...(decorative && { role: 'none', 'aria-orientation': undefined })}\n className={(state) =>\n cn(\n 'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":"0RAaA,SAAS,UAAU,CACjB,YACA,cAAc,aACd,aAAa,GACb,UACA,WACA,GAAGG,GACc,CACjB,MACE,kBAACH,EAAD,CACE,YAAU,YACG,cACb,GAAKI,GAAc,CAAE,KAAM,OAAQ,mBAAoB,IAAA,EAAU,EACjE,UAAY,GACVC,EACE,+GACAJ,EAAiBK,EAAWC,CAAK,CACnC,EAEF,GAAIJ,EACJ,GAAIK,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL"}
1
+ {"version":3,"file":"separator.js","names":["SeparatorPrimitive","resolveClassName","Separator$1","props","decorative","cn","className","state","toAsChildRenderProps","asChild","children"],"sources":["../../src/components/separator.tsx"],"sourcesContent":["import { Separator as SeparatorPrimitive } from '@base-ui/react/separator'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nexport type SeparatorProps = AsChildPrimitiveProps<typeof SeparatorPrimitive> & {\n /**\n * When `true` (default), the separator is purely visual and hidden from assistive technology.\n */\n decorative?: boolean\n}\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n asChild,\n children,\n ...props\n}: SeparatorProps) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n {...(decorative && { role: 'none', 'aria-orientation': undefined })}\n className={(state) =>\n cn(\n 'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":"A,0RAaA,SAAS,UAAU,CACjB,YACA,cAAc,aACd,aAAa,GACb,UACA,WACA,GAAGG,GACc,CACjB,MACE,kBAACH,EAAD,CACE,YAAU,YACG,cACb,GAAKI,GAAc,CAAE,KAAM,OAAQ,mBAAoB,IAAA,EAAU,EACjE,UAAY,GACVC,EACE,+GACAJ,EAAiBK,EAAWC,CAAK,CACnC,EAEF,GAAIJ,EACJ,GAAIK,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,C"}
@@ -1,12 +1,11 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
2
+ import { n as AsChildProps } from "../as-child-T9W73ZYU.js";
3
3
  import { Button } from "./button.js";
4
4
  import { Separator } from "./separator.js";
5
5
  import { Input } from "./input.js";
6
6
  import { TooltipContent } from "./tooltip.js";
7
7
  import * as React from "react";
8
8
  import { VariantProps } from "class-variance-authority";
9
- //#region src/components/sidebar.d.ts
10
9
  type SidebarContextProps = {
11
10
  state: 'expanded' | 'collapsed';
12
11
  open: boolean;
@@ -144,6 +143,5 @@ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: SidebarM
144
143
  declare function SidebarMenuSub({ className, ...props }: SidebarMenuSubProps): React.JSX.Element;
145
144
  declare function SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps): React.JSX.Element;
146
145
  declare function SidebarMenuSubButton({ size, isActive, className, ...props }: SidebarMenuSubButtonProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
147
- //#endregion
148
146
  export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
149
147
  //# sourceMappingURL=sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.js","names":["resolveClassName","React","SidebarContext","SidebarHoverPreviewContext","context","target","openProp","setOpenProp","props","isMobile","useIsMobile","openMobile","setOpenMobile","isHoverExpanded","setIsHoverExpanded","hoverSuppressedRef","dismissHoverPreview","expandOnHover","_open","_setOpen","defaultOpen","open","setOpen","openState","value","toggleSidebar","event","state","contextValue","hoverExpandOpenDelay","hoverExpandCloseDelay","hoverPreviewContextValue","style","cn","className","canHoverExpand","collapsible","effectiveHoverExpanded","pointerInsideRef","focusInsideRef","openTimeoutRef","closeTimeoutRef","pointerModalityRef","sidebarRef","suppressedRef","scheduleHoverExpanded","shouldExpand","immediate","setHoverExpanded","timeoutRef","sidebar","Drawer","side","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","variant","hoverPreview","Button","onClick","asChild","children","Fragment","IconLayoutSidebar","Input","Separator","useAsChild","sidebarMenuButtonVariants","cva","button","size","isActive","tooltip","Tooltip","showOnHover","hash","char","seed","id","width","showIcon","Skeleton"],"sources":["../../src/components/sidebar.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconLayoutSidebar } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { useIsMobile } from '../hooks/use-mobile'\nimport { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { Button } from './button'\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from './drawer'\nimport { Input } from './input'\nimport { Separator } from './separator'\nimport { Skeleton } from './skeleton'\nimport { Tooltip, type TooltipContent } from './tooltip'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '3rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\nconst SIDEBAR_HOVER_EXPAND_OPEN_DELAY = 150\nconst SIDEBAR_HOVER_EXPAND_CLOSE_DELAY = 300\nconst SIDEBAR_TEXT_FIELD_SELECTOR =\n 'textarea, select, [contenteditable]:not([contenteditable=\"false\"]), input:not([type=\"button\"], [type=\"checkbox\"], [type=\"radio\"], [type=\"reset\"], [type=\"submit\"])'\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n expandOnHover: boolean\n isHoverExpanded: boolean\n setHoverExpanded: (hoverExpanded: boolean) => void\n hoverExpandOpenDelay: number\n hoverExpandCloseDelay: number\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\n// Internal (not exposed through `useSidebar`): lets a toggle dismiss the hover preview and keep it\n// suppressed until the pointer crosses the sidebar boundary again, so it doesn't reopen right away\n// under a cursor that is still over the sidebar.\ntype SidebarHoverPreviewContextProps = {\n suppressedRef: React.RefObject<boolean>\n dismissHoverPreview: () => void\n}\n\nconst SidebarHoverPreviewContext = React.createContext<SidebarHoverPreviewContextProps | null>(null)\n\nexport type SidebarProviderProps = React.ComponentProps<'div'> & {\n /**\n * Whether the sidebar starts expanded (uncontrolled).\n * @default true\n */\n defaultOpen?: boolean\n /** Whether the sidebar is expanded (controlled). */\n open?: boolean\n /** Called when the sidebar expands or collapses. */\n onOpenChange?: (open: boolean) => void\n /**\n * With `collapsible=\"icon\"`, shows a floating preview of the collapsed sidebar on hover or focus.\n * @default false\n */\n expandOnHover?: boolean\n /**\n * Delay in ms before the hover preview opens.\n * @default 150\n */\n hoverExpandOpenDelay?: number\n /**\n * Delay in ms before the hover preview closes.\n * @default 300\n */\n hoverExpandCloseDelay?: number\n}\n\nexport type SidebarProps = React.ComponentProps<'div'> & {\n /**\n * Edge of the screen the sidebar sits on.\n * @default 'left'\n */\n side?: 'left' | 'right'\n /**\n * `floating` adds a gap and shadow; `inset` pairs with `SidebarInset` for an inset main area.\n * @default 'sidebar'\n */\n variant?: 'sidebar' | 'floating' | 'inset'\n /**\n * `offcanvas` slides the sidebar out, `icon` shrinks it to icons, `none` keeps it open.\n * @default 'offcanvas'\n */\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}\n\nexport type SidebarTriggerProps = React.ComponentProps<typeof Button>\n\nexport type SidebarRailProps = React.ComponentProps<'button'>\n\nexport type SidebarInsetProps = React.ComponentProps<'main'>\n\nexport type SidebarInputProps = React.ComponentProps<typeof Input>\n\nexport type SidebarHeaderProps = React.ComponentProps<'div'>\n\nexport type SidebarFooterProps = React.ComponentProps<'div'>\n\nexport type SidebarSeparatorProps = React.ComponentProps<typeof Separator>\n\nexport type SidebarContentProps = React.ComponentProps<'div'>\n\nexport type SidebarGroupProps = React.ComponentProps<'div'>\n\nexport type SidebarGroupLabelProps = AsChildProps<'div'>\n\nexport type SidebarGroupActionProps = AsChildProps<'button'>\n\nexport type SidebarGroupContentProps = React.ComponentProps<'div'>\n\nexport type SidebarMenuProps = React.ComponentProps<'ul'>\n\nexport type SidebarMenuItemProps = React.ComponentProps<'li'>\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.')\n }\n\n return context\n}\n\nfunction isEditableContent(target: EventTarget | null) {\n return target instanceof Element && target.closest('[contenteditable]:not([contenteditable=\"false\"])') !== null\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n expandOnHover = false,\n hoverExpandOpenDelay = SIDEBAR_HOVER_EXPAND_OPEN_DELAY,\n hoverExpandCloseDelay = SIDEBAR_HOVER_EXPAND_CLOSE_DELAY,\n className,\n style,\n children,\n ...props\n}: SidebarProviderProps) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isHoverExpanded, setIsHoverExpanded] = React.useState(false)\n const hoverSuppressedRef = React.useRef(false)\n\n const dismissHoverPreview = React.useCallback(() => {\n hoverSuppressedRef.current = true\n setIsHoverExpanded(false)\n }, [])\n\n React.useEffect(() => {\n if (!expandOnHover) setIsHoverExpanded(false)\n }, [expandOnHover])\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value\n // Collapsing while hovered would otherwise fall straight back into the hover preview.\n if (open && !openState) dismissHoverPreview()\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n // biome-ignore lint/suspicious/noDocumentCookie: This package persists a simple UI preference cookie without framework-specific APIs.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open, dismissHoverPreview]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // Rich text editors use the same shortcut (bold), so leave it to them when they handle it or own the focus.\n if (event.defaultPrevented || isEditableContent(event.target)) return\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n expandOnHover,\n isHoverExpanded,\n setHoverExpanded: setIsHoverExpanded,\n hoverExpandOpenDelay,\n hoverExpandCloseDelay\n }),\n [\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n toggleSidebar,\n expandOnHover,\n isHoverExpanded,\n hoverExpandOpenDelay,\n hoverExpandCloseDelay\n ]\n )\n\n const hoverPreviewContextValue = React.useMemo<SidebarHoverPreviewContextProps>(\n () => ({ suppressedRef: hoverSuppressedRef, dismissHoverPreview }),\n [dismissHoverPreview]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <SidebarHoverPreviewContext.Provider value={hoverPreviewContextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper relative flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarHoverPreviewContext.Provider>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: SidebarProps) {\n const {\n isMobile,\n state,\n openMobile,\n setOpenMobile,\n expandOnHover,\n isHoverExpanded,\n setHoverExpanded,\n hoverExpandOpenDelay,\n hoverExpandCloseDelay\n } = useSidebar()\n\n const canHoverExpand = expandOnHover && collapsible === 'icon'\n const effectiveHoverExpanded = canHoverExpand && isHoverExpanded\n\n const pointerInsideRef = React.useRef(false)\n const focusInsideRef = React.useRef(false)\n const openTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const closeTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const pointerModalityRef = React.useRef(false)\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const hoverPreview = React.useContext(SidebarHoverPreviewContext)\n const suppressedRef = hoverPreview?.suppressedRef\n\n const scheduleHoverExpanded = React.useCallback(\n (immediate = false) => {\n if (openTimeoutRef.current) {\n clearTimeout(openTimeoutRef.current)\n openTimeoutRef.current = null\n }\n if (closeTimeoutRef.current) {\n clearTimeout(closeTimeoutRef.current)\n closeTimeoutRef.current = null\n }\n\n const shouldExpand = !suppressedRef?.current && (pointerInsideRef.current || focusInsideRef.current)\n\n if (immediate) {\n setHoverExpanded(shouldExpand)\n return\n }\n\n const timeoutRef = shouldExpand ? openTimeoutRef : closeTimeoutRef\n const delay = shouldExpand ? hoverExpandOpenDelay : hoverExpandCloseDelay\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null\n // Re-checked on fire: a toggle may have dismissed the preview after this was scheduled.\n setHoverExpanded(shouldExpand && !suppressedRef?.current)\n }, delay)\n },\n [setHoverExpanded, hoverExpandOpenDelay, hoverExpandCloseDelay, suppressedRef]\n )\n\n // Tracks whether the latest input came from a pointer or the keyboard, so focus moved by a click (or\n // returned by an overlay closed with a click) doesn't hold the preview open like keyboard focus does.\n React.useEffect(() => {\n if (!canHoverExpand) return\n const handlePointerDown = () => {\n pointerModalityRef.current = true\n }\n const handleKeyDown = () => {\n pointerModalityRef.current = false\n }\n document.addEventListener('pointerdown', handlePointerDown, true)\n document.addEventListener('keydown', handleKeyDown, true)\n return () => {\n document.removeEventListener('pointerdown', handlePointerDown, true)\n document.removeEventListener('keydown', handleKeyDown, true)\n }\n }, [canHoverExpand])\n\n // Hover is tracked with native DOM events rather than React's synthetic ones: React bubbles\n // enter/leave through portals, so hovering a portaled menu counted as hovering the sidebar, and when\n // that menu unmounted under the cursor no leave ever fired, leaving the preview stuck open.\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!canHoverExpand || isMobile || !sidebar) return\n // Crossing the sidebar boundary in either direction lifts a toggle's preview suppression.\n const handleMouseEnter = () => {\n pointerInsideRef.current = true\n if (suppressedRef) suppressedRef.current = false\n scheduleHoverExpanded()\n }\n const handleMouseLeave = () => {\n pointerInsideRef.current = false\n if (suppressedRef) suppressedRef.current = false\n scheduleHoverExpanded()\n }\n sidebar.addEventListener('mouseenter', handleMouseEnter)\n sidebar.addEventListener('mouseleave', handleMouseLeave)\n return () => {\n sidebar.removeEventListener('mouseenter', handleMouseEnter)\n sidebar.removeEventListener('mouseleave', handleMouseLeave)\n }\n }, [canHoverExpand, isMobile, scheduleHoverExpanded, suppressedRef])\n\n React.useEffect(() => {\n return () => {\n if (openTimeoutRef.current) clearTimeout(openTimeoutRef.current)\n if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current)\n setHoverExpanded(false)\n }\n }, [setHoverExpanded])\n\n // Switching to mobile never fires a mouse leave, so drop the preview there; otherwise the trigger would\n // treat the first tap as \"close the preview\" instead of opening the drawer.\n React.useEffect(() => {\n if (!isMobile) return\n if (openTimeoutRef.current) clearTimeout(openTimeoutRef.current)\n if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current)\n openTimeoutRef.current = null\n closeTimeoutRef.current = null\n pointerInsideRef.current = false\n focusInsideRef.current = false\n setHoverExpanded(false)\n }, [isMobile, setHoverExpanded])\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n if (!canHoverExpand) return\n // Only keyboard focus holds the preview open, so clicking an item doesn't pin it after the pointer\n // leaves. Text fields always hold it (the user is about to type), and so does focus that lands\n // outside the sidebar's DOM (a portaled menu or popover opened from inside it), so the preview\n // doesn't collapse under an open overlay.\n const target = event.target as HTMLElement\n focusInsideRef.current =\n !pointerModalityRef.current ||\n !event.currentTarget.contains(target) ||\n target.matches(SIDEBAR_TEXT_FIELD_SELECTOR)\n // Keyboard focus is a deliberate way back into the sidebar, so it also lifts a toggle's suppression.\n if (!pointerModalityRef.current && suppressedRef) suppressedRef.current = false\n scheduleHoverExpanded()\n }\n const handleBlur = (event: React.FocusEvent<HTMLDivElement>) => {\n if (!canHoverExpand) return\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n focusInsideRef.current = false\n scheduleHoverExpanded()\n }\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!canHoverExpand || event.key !== 'Escape' || !isHoverExpanded) return\n pointerInsideRef.current = false\n focusInsideRef.current = false\n scheduleHoverExpanded(true)\n ;(document.activeElement as HTMLElement | null)?.blur?.()\n }\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn('flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground', className)}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Drawer open={openMobile} onOpenChange={setOpenMobile} direction={side} size=\"sm\">\n <DrawerContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"h-full w-(--sidebar-width) rounded-none bg-sidebar p-0 text-sidebar-foreground\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE\n } as React.CSSProperties\n }\n {...props}\n >\n <DrawerHeader className=\"sr-only\">\n <DrawerTitle>Sidebar</DrawerTitle>\n <DrawerDescription>Displays the mobile sidebar.</DrawerDescription>\n </DrawerHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </DrawerContent>\n </Drawer>\n )\n }\n\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: Tracks pointer/focus presence for the expandOnHover preview; it exposes no interaction of its own, descendants keep their own semantics/roles.\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' && !effectiveHoverExpanded ? collapsible : ''}\n data-collapsible-raw={state === 'collapsed' ? collapsible : ''}\n data-hover-expanded={effectiveHoverExpanded ? 'true' : undefined}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n ref={sidebarRef}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible-raw=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible-raw=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible-raw=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n 'data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width)',\n 'data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width)',\n // Adjust the padding for floating and inset variants, and the fixed (animatable) offset that\n // centers collapsed menu buttons: (menu width - button width) / 2.\n variant === 'floating' || variant === 'inset'\n ? [\n 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]',\n '[--sidebar-menu-button-collapsed-offset:calc((var(--sidebar-width-icon)+2px-(--spacing(4))-2rem)/2)]'\n ]\n : [\n 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n '[--sidebar-menu-button-collapsed-offset:calc((var(--sidebar-width-icon)-(--spacing(4))-2rem)/2)]'\n ],\n variant !== 'floating' &&\n variant !== 'inset' &&\n 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n 'group-data-[hover-expanded=true]:shadow-lg group-data-[hover-expanded=true]:ring-1 group-data-[hover-expanded=true]:ring-foreground/10',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className={cn(\n 'flex size-full flex-col bg-sidebar',\n 'group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm',\n 'group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n )}\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({ className, onClick, asChild = false, children, ...props }: SidebarTriggerProps) {\n const { toggleSidebar, open, isHoverExpanded } = useSidebar()\n const hoverPreview = React.useContext(SidebarHoverPreviewContext)\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n color=\"zinc\"\n asChild={asChild}\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event)\n if (event.defaultPrevented) return\n // During the hover preview the sidebar looks open, so the trigger closes it (the rail pins it).\n if (isHoverExpanded && !open) {\n hoverPreview?.dismissHoverPreview()\n } else {\n toggleSidebar()\n }\n }}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n <IconLayoutSidebar />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </>\n )}\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: SidebarRailProps) {\n const { toggleSidebar, open, setOpen, isHoverExpanded } = useSidebar()\n\n const handleClick = () => {\n if (isHoverExpanded && !open) {\n setOpen(true)\n } else {\n toggleSidebar()\n }\n }\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={handleClick}\n title=\"Toggle Sidebar\"\n className={cn(\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n 'absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: SidebarInsetProps) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n 'relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({ className, ...props }: SidebarInputProps) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn('h-8 w-full bg-background shadow-none', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: SidebarHeaderProps) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: SidebarFooterProps) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({ className, ...props }: SidebarSeparatorProps) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={(state) => cn('w-auto bg-sidebar-border', resolveClassName(className, state))}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: SidebarContentProps) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: SidebarGroupProps) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col px-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({ className, ...props }: SidebarGroupLabelProps) {\n return useAsChild('div', {\n 'data-slot': 'sidebar-group-label',\n 'data-sidebar': 'group-label',\n className: cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n className\n ),\n ...props\n })\n}\n\nfunction SidebarGroupAction({ className, ...props }: SidebarGroupActionProps) {\n return useAsChild('button', {\n 'data-slot': 'sidebar-group-action',\n 'data-sidebar': 'group-action',\n className: cn(\n 'absolute top-1.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0',\n className\n ),\n ...props\n })\n}\n\nfunction SidebarGroupContent({ className, ...props }: SidebarGroupContentProps) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm mt-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: SidebarMenuProps) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-0', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: SidebarMenuItemProps) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button group/menu-button font-medium flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding,margin] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:ml-(--sidebar-menu-button-collapsed-offset) group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-popup-open:hover:bg-sidebar-accent data-popup-open:hover:text-sidebar-accent-foreground data-panel-open:hover:bg-sidebar-accent data-panel-open:hover:text-sidebar-accent-foreground data-active:[&_svg]:text-sidebar-primary data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]'\n },\n size: {\n md: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!'\n }\n },\n defaultVariants: {\n variant: 'default',\n size: 'md'\n }\n }\n)\n\nexport type SidebarMenuButtonProps = AsChildProps<'button'> & {\n /**\n * Marks the item as the current page.\n * @default false\n */\n isActive?: boolean\n /** Label (or tooltip content props) shown when the sidebar is collapsed to icons. */\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>\n\nexport type SidebarMenuActionProps = AsChildProps<'button'> & {\n /**\n * On desktop, hides the action until the menu item is hovered or focused.\n * @default false\n */\n showOnHover?: boolean\n}\n\nexport type SidebarMenuBadgeProps = React.ComponentProps<'div'>\n\nexport type SidebarMenuSkeletonProps = React.ComponentProps<'div'> & {\n /**\n * Adds an icon placeholder before the text.\n * @default false\n */\n showIcon?: boolean\n}\n\nexport type SidebarMenuSubProps = React.ComponentProps<'ul'>\n\nexport type SidebarMenuSubItemProps = React.ComponentProps<'li'>\n\nexport type SidebarMenuSubButtonProps = AsChildProps<'a'> & {\n /**\n * Text size of the sub-item.\n * @default 'md'\n */\n size?: 'sm' | 'md'\n /**\n * Marks the sub-item as the current page.\n * @default false\n */\n isActive?: boolean\n}\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'md',\n tooltip,\n className,\n ...props\n}: SidebarMenuButtonProps) {\n const { isMobile, state, isHoverExpanded } = useSidebar()\n\n const button = useAsChild('button', {\n asChild,\n 'data-slot': 'sidebar-menu-button',\n 'data-sidebar': 'menu-button',\n 'data-size': size,\n 'data-active': isActive,\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n ...props\n })\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip\n }\n }\n\n return (\n <Tooltip\n label={tooltip.children}\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile || isHoverExpanded}\n {...tooltip}\n >\n {button}\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({ className, showOnHover = false, ...props }: SidebarMenuActionProps) {\n return useAsChild('button', {\n 'data-slot': 'sidebar-menu-action',\n 'data-sidebar': 'menu-action',\n className: cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=md]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0',\n className\n ),\n ...props\n })\n}\n\nfunction SidebarMenuBadge({ className, ...props }: SidebarMenuBadgeProps) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=md]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction getSkeletonWidth(seed: string) {\n let hash = 0\n for (const char of seed) {\n hash = (hash * 31 + char.charCodeAt(0)) | 0\n }\n return `${(Math.abs(hash) % 40) + 50}%`\n}\n\nfunction SidebarMenuSkeleton({ className, showIcon = false, ...props }: SidebarMenuSkeletonProps) {\n // Width between 50 and 90%, derived from the id so the server and client render the same value.\n const id = React.useId()\n const width = React.useMemo(() => getSkeletonWidth(id), [id])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: SidebarMenuSubProps) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({ size = 'md', isActive = false, className, ...props }: SidebarMenuSubButtonProps) {\n return useAsChild('a', {\n 'data-slot': 'sidebar-menu-sub-button',\n 'data-sidebar': 'menu-sub-button',\n 'data-size': size,\n 'data-active': isActive,\n className: cn(\n 'flex h-7 min-w-0 -translate-x-px items-center font-medium gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground',\n className\n ),\n ...props\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar\n}\n"],"mappings":"4tBAgBA,MA0BME,EAAiBD,EAAM,cAA0C,IAAI,EAUrEE,EAA6BF,EAAM,cAAsD,IAAI,EA2EnG,SAAS,YAAa,CACpB,IAAMG,EAAUH,EAAM,WAAWC,CAAc,EAC/C,GAAI,CAACE,EACH,MAAU,MAAM,mDAAmD,EAGrE,OAAOA,CACT,CAEA,SAAS,kBAAkB,EAA4B,CACrD,OAAOC,aAAkB,SAAWA,EAAO,QAAQ,kDAAkD,IAAM,IAC7G,CAEA,SAAS,gBAAgB,CACvB,cAAc,GACd,KAAMC,EACN,aAAcC,EACd,gBAAgB,GAChB,uBAAuB,IACvB,wBAAwB,IACxB,YACA,QACA,WACA,GAAGC,GACoB,CACvB,IAAMC,EAAWC,EAAY,EACvB,CAACC,EAAYC,GAAiBX,EAAM,SAAS,EAAK,EAClD,CAACY,EAAiBC,GAAsBb,EAAM,SAAS,EAAK,EAC5Dc,EAAqBd,EAAM,OAAO,EAAK,EAEvCe,EAAsBf,EAAM,gBAAkB,CAClD,EAAmB,QAAU,GAC7Ba,EAAmB,EAAK,CAC1B,EAAG,CAAC,CAAC,EAELb,EAAM,cAAgB,CACfgB,GAAeH,EAAmB,EAAK,CAC9C,EAAG,CAACG,CAAa,CAAC,EAIlB,GAAM,CAACC,EAAOC,GAAYlB,EAAM,SAASmB,CAAW,EAC9CC,EAAOf,GAAYY,EACnBI,EAAUrB,EAAM,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1B,CACL,CAAA,CAEL,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAGA,GAAkC,CAC5E,MACE,kBAAC,KAAD,CACE,YAAU,wBACV,eAAa,gBACb,UAAWyB,EAAG,+BAAgCC,CAAS,EACvD,GAAI1B,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,OAAO,KAAM,WAAW,GAAO,YAAW,GAAGA,GAAoC,CAC/G,OAAO2D,EAAW,IAAK,CACrB,YAAa,0BACb,eAAgB,kBAChB,YAAaI,EACb,cAAeC,EACf,UAAWvC,EACT,wpBACAC,CACF,EACA,GAAG1B,CACL,CAAC,CACH"}
1
+ {"version":3,"file":"sidebar.js","names":["resolveClassName","React","SidebarContext","SidebarHoverPreviewContext","context","target","openProp","setOpenProp","props","isMobile","useIsMobile","openMobile","setOpenMobile","isHoverExpanded","setIsHoverExpanded","hoverSuppressedRef","dismissHoverPreview","expandOnHover","_open","_setOpen","defaultOpen","open","setOpen","openState","value","toggleSidebar","event","state","contextValue","hoverExpandOpenDelay","hoverExpandCloseDelay","hoverPreviewContextValue","style","cn","className","canHoverExpand","collapsible","effectiveHoverExpanded","pointerInsideRef","focusInsideRef","openTimeoutRef","closeTimeoutRef","pointerModalityRef","sidebarRef","suppressedRef","scheduleHoverExpanded","shouldExpand","immediate","setHoverExpanded","timeoutRef","sidebar","Drawer","side","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","variant","hoverPreview","Button","onClick","asChild","children","Fragment","IconLayoutSidebar","Input","Separator","useAsChild","sidebarMenuButtonVariants","cva","button","size","isActive","tooltip","Tooltip","showOnHover","hash","char","seed","id","width","showIcon","Skeleton"],"sources":["../../src/components/sidebar.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconLayoutSidebar } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { useIsMobile } from '../hooks/use-mobile'\nimport { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { Button } from './button'\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from './drawer'\nimport { Input } from './input'\nimport { Separator } from './separator'\nimport { Skeleton } from './skeleton'\nimport { Tooltip, type TooltipContent } from './tooltip'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '3rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\nconst SIDEBAR_HOVER_EXPAND_OPEN_DELAY = 150\nconst SIDEBAR_HOVER_EXPAND_CLOSE_DELAY = 300\nconst SIDEBAR_TEXT_FIELD_SELECTOR =\n 'textarea, select, [contenteditable]:not([contenteditable=\"false\"]), input:not([type=\"button\"], [type=\"checkbox\"], [type=\"radio\"], [type=\"reset\"], [type=\"submit\"])'\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n expandOnHover: boolean\n isHoverExpanded: boolean\n setHoverExpanded: (hoverExpanded: boolean) => void\n hoverExpandOpenDelay: number\n hoverExpandCloseDelay: number\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\n// Internal (not exposed through `useSidebar`): lets a toggle dismiss the hover preview and keep it\n// suppressed until the pointer crosses the sidebar boundary again, so it doesn't reopen right away\n// under a cursor that is still over the sidebar.\ntype SidebarHoverPreviewContextProps = {\n suppressedRef: React.RefObject<boolean>\n dismissHoverPreview: () => void\n}\n\nconst SidebarHoverPreviewContext = React.createContext<SidebarHoverPreviewContextProps | null>(null)\n\nexport type SidebarProviderProps = React.ComponentProps<'div'> & {\n /**\n * Whether the sidebar starts expanded (uncontrolled).\n * @default true\n */\n defaultOpen?: boolean\n /** Whether the sidebar is expanded (controlled). */\n open?: boolean\n /** Called when the sidebar expands or collapses. */\n onOpenChange?: (open: boolean) => void\n /**\n * With `collapsible=\"icon\"`, shows a floating preview of the collapsed sidebar on hover or focus.\n * @default false\n */\n expandOnHover?: boolean\n /**\n * Delay in ms before the hover preview opens.\n * @default 150\n */\n hoverExpandOpenDelay?: number\n /**\n * Delay in ms before the hover preview closes.\n * @default 300\n */\n hoverExpandCloseDelay?: number\n}\n\nexport type SidebarProps = React.ComponentProps<'div'> & {\n /**\n * Edge of the screen the sidebar sits on.\n * @default 'left'\n */\n side?: 'left' | 'right'\n /**\n * `floating` adds a gap and shadow; `inset` pairs with `SidebarInset` for an inset main area.\n * @default 'sidebar'\n */\n variant?: 'sidebar' | 'floating' | 'inset'\n /**\n * `offcanvas` slides the sidebar out, `icon` shrinks it to icons, `none` keeps it open.\n * @default 'offcanvas'\n */\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}\n\nexport type SidebarTriggerProps = React.ComponentProps<typeof Button>\n\nexport type SidebarRailProps = React.ComponentProps<'button'>\n\nexport type SidebarInsetProps = React.ComponentProps<'main'>\n\nexport type SidebarInputProps = React.ComponentProps<typeof Input>\n\nexport type SidebarHeaderProps = React.ComponentProps<'div'>\n\nexport type SidebarFooterProps = React.ComponentProps<'div'>\n\nexport type SidebarSeparatorProps = React.ComponentProps<typeof Separator>\n\nexport type SidebarContentProps = React.ComponentProps<'div'>\n\nexport type SidebarGroupProps = React.ComponentProps<'div'>\n\nexport type SidebarGroupLabelProps = AsChildProps<'div'>\n\nexport type SidebarGroupActionProps = AsChildProps<'button'>\n\nexport type SidebarGroupContentProps = React.ComponentProps<'div'>\n\nexport type SidebarMenuProps = React.ComponentProps<'ul'>\n\nexport type SidebarMenuItemProps = React.ComponentProps<'li'>\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.')\n }\n\n return context\n}\n\nfunction isEditableContent(target: EventTarget | null) {\n return target instanceof Element && target.closest('[contenteditable]:not([contenteditable=\"false\"])') !== null\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n expandOnHover = false,\n hoverExpandOpenDelay = SIDEBAR_HOVER_EXPAND_OPEN_DELAY,\n hoverExpandCloseDelay = SIDEBAR_HOVER_EXPAND_CLOSE_DELAY,\n className,\n style,\n children,\n ...props\n}: SidebarProviderProps) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isHoverExpanded, setIsHoverExpanded] = React.useState(false)\n const hoverSuppressedRef = React.useRef(false)\n\n const dismissHoverPreview = React.useCallback(() => {\n hoverSuppressedRef.current = true\n setIsHoverExpanded(false)\n }, [])\n\n React.useEffect(() => {\n if (!expandOnHover) setIsHoverExpanded(false)\n }, [expandOnHover])\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value\n // Collapsing while hovered would otherwise fall straight back into the hover preview.\n if (open && !openState) dismissHoverPreview()\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n // biome-ignore lint/suspicious/noDocumentCookie: This package persists a simple UI preference cookie without framework-specific APIs.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open, dismissHoverPreview]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // Rich text editors use the same shortcut (bold), so leave it to them when they handle it or own the focus.\n if (event.defaultPrevented || isEditableContent(event.target)) return\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n expandOnHover,\n isHoverExpanded,\n setHoverExpanded: setIsHoverExpanded,\n hoverExpandOpenDelay,\n hoverExpandCloseDelay\n }),\n [\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n toggleSidebar,\n expandOnHover,\n isHoverExpanded,\n hoverExpandOpenDelay,\n hoverExpandCloseDelay\n ]\n )\n\n const hoverPreviewContextValue = React.useMemo<SidebarHoverPreviewContextProps>(\n () => ({ suppressedRef: hoverSuppressedRef, dismissHoverPreview }),\n [dismissHoverPreview]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <SidebarHoverPreviewContext.Provider value={hoverPreviewContextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper relative flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarHoverPreviewContext.Provider>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: SidebarProps) {\n const {\n isMobile,\n state,\n openMobile,\n setOpenMobile,\n expandOnHover,\n isHoverExpanded,\n setHoverExpanded,\n hoverExpandOpenDelay,\n hoverExpandCloseDelay\n } = useSidebar()\n\n const canHoverExpand = expandOnHover && collapsible === 'icon'\n const effectiveHoverExpanded = canHoverExpand && isHoverExpanded\n\n const pointerInsideRef = React.useRef(false)\n const focusInsideRef = React.useRef(false)\n const openTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const closeTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const pointerModalityRef = React.useRef(false)\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const hoverPreview = React.useContext(SidebarHoverPreviewContext)\n const suppressedRef = hoverPreview?.suppressedRef\n\n const scheduleHoverExpanded = React.useCallback(\n (immediate = false) => {\n if (openTimeoutRef.current) {\n clearTimeout(openTimeoutRef.current)\n openTimeoutRef.current = null\n }\n if (closeTimeoutRef.current) {\n clearTimeout(closeTimeoutRef.current)\n closeTimeoutRef.current = null\n }\n\n const shouldExpand = !suppressedRef?.current && (pointerInsideRef.current || focusInsideRef.current)\n\n if (immediate) {\n setHoverExpanded(shouldExpand)\n return\n }\n\n const timeoutRef = shouldExpand ? openTimeoutRef : closeTimeoutRef\n const delay = shouldExpand ? hoverExpandOpenDelay : hoverExpandCloseDelay\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null\n // Re-checked on fire: a toggle may have dismissed the preview after this was scheduled.\n setHoverExpanded(shouldExpand && !suppressedRef?.current)\n }, delay)\n },\n [setHoverExpanded, hoverExpandOpenDelay, hoverExpandCloseDelay, suppressedRef]\n )\n\n // Tracks whether the latest input came from a pointer or the keyboard, so focus moved by a click (or\n // returned by an overlay closed with a click) doesn't hold the preview open like keyboard focus does.\n React.useEffect(() => {\n if (!canHoverExpand) return\n const handlePointerDown = () => {\n pointerModalityRef.current = true\n }\n const handleKeyDown = () => {\n pointerModalityRef.current = false\n }\n document.addEventListener('pointerdown', handlePointerDown, true)\n document.addEventListener('keydown', handleKeyDown, true)\n return () => {\n document.removeEventListener('pointerdown', handlePointerDown, true)\n document.removeEventListener('keydown', handleKeyDown, true)\n }\n }, [canHoverExpand])\n\n // Hover is tracked with native DOM events rather than React's synthetic ones: React bubbles\n // enter/leave through portals, so hovering a portaled menu counted as hovering the sidebar, and when\n // that menu unmounted under the cursor no leave ever fired, leaving the preview stuck open.\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!canHoverExpand || isMobile || !sidebar) return\n // Crossing the sidebar boundary in either direction lifts a toggle's preview suppression.\n const handleMouseEnter = () => {\n pointerInsideRef.current = true\n if (suppressedRef) suppressedRef.current = false\n scheduleHoverExpanded()\n }\n const handleMouseLeave = () => {\n pointerInsideRef.current = false\n if (suppressedRef) suppressedRef.current = false\n scheduleHoverExpanded()\n }\n sidebar.addEventListener('mouseenter', handleMouseEnter)\n sidebar.addEventListener('mouseleave', handleMouseLeave)\n return () => {\n sidebar.removeEventListener('mouseenter', handleMouseEnter)\n sidebar.removeEventListener('mouseleave', handleMouseLeave)\n }\n }, [canHoverExpand, isMobile, scheduleHoverExpanded, suppressedRef])\n\n React.useEffect(() => {\n return () => {\n if (openTimeoutRef.current) clearTimeout(openTimeoutRef.current)\n if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current)\n setHoverExpanded(false)\n }\n }, [setHoverExpanded])\n\n // Switching to mobile never fires a mouse leave, so drop the preview there; otherwise the trigger would\n // treat the first tap as \"close the preview\" instead of opening the drawer.\n React.useEffect(() => {\n if (!isMobile) return\n if (openTimeoutRef.current) clearTimeout(openTimeoutRef.current)\n if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current)\n openTimeoutRef.current = null\n closeTimeoutRef.current = null\n pointerInsideRef.current = false\n focusInsideRef.current = false\n setHoverExpanded(false)\n }, [isMobile, setHoverExpanded])\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n if (!canHoverExpand) return\n // Only keyboard focus holds the preview open, so clicking an item doesn't pin it after the pointer\n // leaves. Text fields always hold it (the user is about to type), and so does focus that lands\n // outside the sidebar's DOM (a portaled menu or popover opened from inside it), so the preview\n // doesn't collapse under an open overlay.\n const target = event.target as HTMLElement\n focusInsideRef.current =\n !pointerModalityRef.current ||\n !event.currentTarget.contains(target) ||\n target.matches(SIDEBAR_TEXT_FIELD_SELECTOR)\n // Keyboard focus is a deliberate way back into the sidebar, so it also lifts a toggle's suppression.\n if (!pointerModalityRef.current && suppressedRef) suppressedRef.current = false\n scheduleHoverExpanded()\n }\n const handleBlur = (event: React.FocusEvent<HTMLDivElement>) => {\n if (!canHoverExpand) return\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n focusInsideRef.current = false\n scheduleHoverExpanded()\n }\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!canHoverExpand || event.key !== 'Escape' || !isHoverExpanded) return\n pointerInsideRef.current = false\n focusInsideRef.current = false\n scheduleHoverExpanded(true)\n ;(document.activeElement as HTMLElement | null)?.blur?.()\n }\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn('flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground', className)}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Drawer open={openMobile} onOpenChange={setOpenMobile} direction={side} size=\"sm\">\n <DrawerContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"h-full w-(--sidebar-width) rounded-none bg-sidebar p-0 text-sidebar-foreground\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE\n } as React.CSSProperties\n }\n {...props}\n >\n <DrawerHeader className=\"sr-only\">\n <DrawerTitle>Sidebar</DrawerTitle>\n <DrawerDescription>Displays the mobile sidebar.</DrawerDescription>\n </DrawerHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </DrawerContent>\n </Drawer>\n )\n }\n\n return (\n // biome-ignore lint/a11y/noStaticElementInteractions: Tracks pointer/focus presence for the expandOnHover preview; it exposes no interaction of its own, descendants keep their own semantics/roles.\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' && !effectiveHoverExpanded ? collapsible : ''}\n data-collapsible-raw={state === 'collapsed' ? collapsible : ''}\n data-hover-expanded={effectiveHoverExpanded ? 'true' : undefined}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n ref={sidebarRef}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible-raw=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible-raw=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible-raw=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n 'data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width)',\n 'data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width)',\n // Adjust the padding for floating and inset variants, and the fixed (animatable) offset that\n // centers collapsed menu buttons: (menu width - button width) / 2.\n variant === 'floating' || variant === 'inset'\n ? [\n 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]',\n '[--sidebar-menu-button-collapsed-offset:calc((var(--sidebar-width-icon)+2px-(--spacing(4))-2rem)/2)]'\n ]\n : [\n 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n '[--sidebar-menu-button-collapsed-offset:calc((var(--sidebar-width-icon)-(--spacing(4))-2rem)/2)]'\n ],\n variant !== 'floating' &&\n variant !== 'inset' &&\n 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n 'group-data-[hover-expanded=true]:shadow-lg group-data-[hover-expanded=true]:ring-1 group-data-[hover-expanded=true]:ring-foreground/10',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className={cn(\n 'flex size-full flex-col bg-sidebar',\n 'group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm',\n 'group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n )}\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({ className, onClick, asChild = false, children, ...props }: SidebarTriggerProps) {\n const { toggleSidebar, open, isHoverExpanded } = useSidebar()\n const hoverPreview = React.useContext(SidebarHoverPreviewContext)\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n color=\"zinc\"\n asChild={asChild}\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event)\n if (event.defaultPrevented) return\n // During the hover preview the sidebar looks open, so the trigger closes it (the rail pins it).\n if (isHoverExpanded && !open) {\n hoverPreview?.dismissHoverPreview()\n } else {\n toggleSidebar()\n }\n }}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n <IconLayoutSidebar />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </>\n )}\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: SidebarRailProps) {\n const { toggleSidebar, open, setOpen, isHoverExpanded } = useSidebar()\n\n const handleClick = () => {\n if (isHoverExpanded && !open) {\n setOpen(true)\n } else {\n toggleSidebar()\n }\n }\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={handleClick}\n title=\"Toggle Sidebar\"\n className={cn(\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n 'absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: SidebarInsetProps) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n 'relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({ className, ...props }: SidebarInputProps) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn('h-8 w-full bg-background shadow-none', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: SidebarHeaderProps) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: SidebarFooterProps) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({ className, ...props }: SidebarSeparatorProps) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={(state) => cn('w-auto bg-sidebar-border', resolveClassName(className, state))}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: SidebarContentProps) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: SidebarGroupProps) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col px-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({ className, ...props }: SidebarGroupLabelProps) {\n return useAsChild('div', {\n 'data-slot': 'sidebar-group-label',\n 'data-sidebar': 'group-label',\n className: cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n className\n ),\n ...props\n })\n}\n\nfunction SidebarGroupAction({ className, ...props }: SidebarGroupActionProps) {\n return useAsChild('button', {\n 'data-slot': 'sidebar-group-action',\n 'data-sidebar': 'group-action',\n className: cn(\n 'absolute top-1.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0',\n className\n ),\n ...props\n })\n}\n\nfunction SidebarGroupContent({ className, ...props }: SidebarGroupContentProps) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm mt-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: SidebarMenuProps) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-0', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: SidebarMenuItemProps) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button group/menu-button font-medium flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding,margin] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:ml-(--sidebar-menu-button-collapsed-offset) group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-popup-open:hover:bg-sidebar-accent data-popup-open:hover:text-sidebar-accent-foreground data-panel-open:hover:bg-sidebar-accent data-panel-open:hover:text-sidebar-accent-foreground data-active:[&_svg]:text-sidebar-primary data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]'\n },\n size: {\n md: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!'\n }\n },\n defaultVariants: {\n variant: 'default',\n size: 'md'\n }\n }\n)\n\nexport type SidebarMenuButtonProps = AsChildProps<'button'> & {\n /**\n * Marks the item as the current page.\n * @default false\n */\n isActive?: boolean\n /** Label (or tooltip content props) shown when the sidebar is collapsed to icons. */\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>\n\nexport type SidebarMenuActionProps = AsChildProps<'button'> & {\n /**\n * On desktop, hides the action until the menu item is hovered or focused.\n * @default false\n */\n showOnHover?: boolean\n}\n\nexport type SidebarMenuBadgeProps = React.ComponentProps<'div'>\n\nexport type SidebarMenuSkeletonProps = React.ComponentProps<'div'> & {\n /**\n * Adds an icon placeholder before the text.\n * @default false\n */\n showIcon?: boolean\n}\n\nexport type SidebarMenuSubProps = React.ComponentProps<'ul'>\n\nexport type SidebarMenuSubItemProps = React.ComponentProps<'li'>\n\nexport type SidebarMenuSubButtonProps = AsChildProps<'a'> & {\n /**\n * Text size of the sub-item.\n * @default 'md'\n */\n size?: 'sm' | 'md'\n /**\n * Marks the sub-item as the current page.\n * @default false\n */\n isActive?: boolean\n}\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'md',\n tooltip,\n className,\n ...props\n}: SidebarMenuButtonProps) {\n const { isMobile, state, isHoverExpanded } = useSidebar()\n\n const button = useAsChild('button', {\n asChild,\n 'data-slot': 'sidebar-menu-button',\n 'data-sidebar': 'menu-button',\n 'data-size': size,\n 'data-active': isActive,\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n ...props\n })\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip\n }\n }\n\n return (\n <Tooltip\n label={tooltip.children}\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile || isHoverExpanded}\n {...tooltip}\n >\n {button}\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({ className, showOnHover = false, ...props }: SidebarMenuActionProps) {\n return useAsChild('button', {\n 'data-slot': 'sidebar-menu-action',\n 'data-sidebar': 'menu-action',\n className: cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=md]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0',\n className\n ),\n ...props\n })\n}\n\nfunction SidebarMenuBadge({ className, ...props }: SidebarMenuBadgeProps) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=md]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction getSkeletonWidth(seed: string) {\n let hash = 0\n for (const char of seed) {\n hash = (hash * 31 + char.charCodeAt(0)) | 0\n }\n return `${(Math.abs(hash) % 40) + 50}%`\n}\n\nfunction SidebarMenuSkeleton({ className, showIcon = false, ...props }: SidebarMenuSkeletonProps) {\n // Width between 50 and 90%, derived from the id so the server and client render the same value.\n const id = React.useId()\n const width = React.useMemo(() => getSkeletonWidth(id), [id])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: SidebarMenuSubProps) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({ size = 'md', isActive = false, className, ...props }: SidebarMenuSubButtonProps) {\n return useAsChild('a', {\n 'data-slot': 'sidebar-menu-sub-button',\n 'data-sidebar': 'menu-sub-button',\n 'data-size': size,\n 'data-active': isActive,\n className: cn(\n 'flex h-7 min-w-0 -translate-x-px items-center font-medium gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground',\n className\n ),\n ...props\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar\n}\n"],"mappings":"A,4tBAgBA,MA0BME,EAAiBD,EAAM,cAA0C,IAAI,EAUrEE,EAA6BF,EAAM,cAAsD,IAAI,EA2EnG,SAAS,YAAa,CACpB,IAAMG,EAAUH,EAAM,WAAWC,CAAc,EAC/C,GAAI,CAACE,EACH,MAAU,MAAM,mDAAmD,EAGrE,OAAOA,CACT,CAEA,SAAS,kBAAkB,EAA4B,CACrD,OAAOC,aAAkB,SAAWA,EAAO,QAAQ,kDAAkD,IAAM,IAC7G,CAEA,SAAS,gBAAgB,CACvB,cAAc,GACd,KAAMC,EACN,aAAcC,EACd,gBAAgB,GAChB,uBAAuB,IACvB,wBAAwB,IACxB,YACA,QACA,WACA,GAAGC,GACoB,CACvB,IAAMC,EAAWC,EAAY,EACvB,CAACC,EAAYC,GAAiBX,EAAM,SAAS,EAAK,EAClD,CAACY,EAAiBC,GAAsBb,EAAM,SAAS,EAAK,EAC5Dc,EAAqBd,EAAM,OAAO,EAAK,EAEvCe,EAAsBf,EAAM,gBAAkB,CAClD,EAAmB,QAAU,GAC7Ba,EAAmB,EAAK,CAC1B,EAAG,CAAC,CAAC,EAELb,EAAM,cAAgB,CACfgB,GAAeH,EAAmB,EAAK,CAC9C,EAAG,CAACG,CAAa,CAAC,EAIlB,GAAM,CAACC,EAAOC,GAAYlB,EAAM,SAASmB,CAAW,EAC9CC,EAAOf,GAAYY,EACnBI,EAAUrB,EAAM,YACnB,GAAmD,CAClD,IAAMsB,EAAY,OAAOC,GAAU,WAAaA,EAAMH,CAAI,EAAIG,EAE1DH,GAAQ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BAAC,KAAD,CACE,YAAU,wBACV,eAAa,gBACb,UAAWyB,EAAG,+BAAgCC,CAAS,EACvD,GAAI1B,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,OAAO,KAAM,WAAW,GAAO,YAAW,GAAGA,GAAoC,CAC/G,OAAO2D,EAAW,IAAK,CACrB,YAAa,0BACb,eAAgB,kBAChB,YAAaI,EACb,cAAeC,EACf,UAAWvC,EACT,wpBACAC,CACF,EACA,GAAG1B,CACL,CAAC,CACH,C"}
@@ -1,6 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
- //#region src/components/simple-grid.d.ts
4
3
  type SimpleGridSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
4
  export type SimpleGridProps = React.ComponentProps<'div'> & {
6
5
  /**
@@ -16,6 +15,5 @@ export type SimpleGridProps = React.ComponentProps<'div'> & {
16
15
  columnGap?: SimpleGridSpacing;
17
16
  };
18
17
  declare function SimpleGrid({ className, cols, gap, rowGap, columnGap, style, ...props }: SimpleGridProps): React.JSX.Element;
19
- //#endregion
20
18
  export { SimpleGrid };
21
19
  //# sourceMappingURL=simple-grid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"simple-grid.js","names":["spacingScale","spacing","props","cn","className","cols","gap","rowGap","columnGap","style"],"sources":["../../src/components/simple-grid.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\ntype SimpleGridSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst spacingScale: Record<SimpleGridSpacing, number> = {\n xs: 1,\n sm: 2,\n md: 4,\n lg: 6,\n xl: 8\n}\n\nfunction toSpacingValue(spacing: SimpleGridSpacing) {\n return `calc(var(--spacing) * ${spacingScale[spacing]})`\n}\n\nexport type SimpleGridProps = React.ComponentProps<'div'> & {\n /**\n * Number of equal columns.\n * @default 1\n */\n cols?: number\n /** Space between rows and columns. */\n gap?: SimpleGridSpacing\n /** Space between rows. Overrides `gap`. */\n rowGap?: SimpleGridSpacing\n /** Space between columns. Overrides `gap`. */\n columnGap?: SimpleGridSpacing\n}\n\nfunction SimpleGrid({ className, cols = 1, gap, rowGap, columnGap, style, ...props }: SimpleGridProps) {\n return (\n <div\n data-slot=\"simple-grid\"\n className={cn(\n 'grid min-w-0',\n 'grid-cols-[repeat(var(--simple-grid-cols),minmax(0,1fr))]',\n 'gap-(--simple-grid-gap) gap-y-(--simple-grid-row-gap) gap-x-(--simple-grid-column-gap)',\n className\n )}\n style={\n {\n '--simple-grid-cols': cols,\n '--simple-grid-gap': gap ? toSpacingValue(gap) : '0px',\n '--simple-grid-row-gap': rowGap ? toSpacingValue(rowGap) : 'var(--simple-grid-gap)',\n '--simple-grid-column-gap': columnGap ? toSpacingValue(columnGap) : 'var(--simple-grid-gap)',\n ...style\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { SimpleGrid }\n"],"mappings":"qHAMA,MAAMA,EAAkD,CACtD,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,CACN,EAEA,SAAS,eAAe,EAA4B,CAClD,MAAO,yBAAyBA,EAAaC,GAAS,EACxD,CAgBA,SAAS,WAAW,CAAE,YAAW,OAAO,EAAG,MAAK,SAAQ,YAAW,QAAO,GAAGC,GAA0B,CACrG,MACE,kBAAC,MAAD,CACE,YAAU,cACV,UAAWC,EACT,eACA,4DACA,yFACAC,CACF,EACA,MACE,CACE,qBAAsBC,EACtB,oBAAqBC,EAAM,eAAeA,CAAG,EAAI,MACjD,wBAAyBC,EAAS,eAAeA,CAAM,EAAI,yBAC3D,2BAA4BC,EAAY,eAAeA,CAAS,EAAI,yBACpE,GAAGC,CACL,EAEF,GAAIP,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"simple-grid.js","names":["spacingScale","spacing","props","cn","className","cols","gap","rowGap","columnGap","style"],"sources":["../../src/components/simple-grid.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\ntype SimpleGridSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst spacingScale: Record<SimpleGridSpacing, number> = {\n xs: 1,\n sm: 2,\n md: 4,\n lg: 6,\n xl: 8\n}\n\nfunction toSpacingValue(spacing: SimpleGridSpacing) {\n return `calc(var(--spacing) * ${spacingScale[spacing]})`\n}\n\nexport type SimpleGridProps = React.ComponentProps<'div'> & {\n /**\n * Number of equal columns.\n * @default 1\n */\n cols?: number\n /** Space between rows and columns. */\n gap?: SimpleGridSpacing\n /** Space between rows. Overrides `gap`. */\n rowGap?: SimpleGridSpacing\n /** Space between columns. Overrides `gap`. */\n columnGap?: SimpleGridSpacing\n}\n\nfunction SimpleGrid({ className, cols = 1, gap, rowGap, columnGap, style, ...props }: SimpleGridProps) {\n return (\n <div\n data-slot=\"simple-grid\"\n className={cn(\n 'grid min-w-0',\n 'grid-cols-[repeat(var(--simple-grid-cols),minmax(0,1fr))]',\n 'gap-(--simple-grid-gap) gap-y-(--simple-grid-row-gap) gap-x-(--simple-grid-column-gap)',\n className\n )}\n style={\n {\n '--simple-grid-cols': cols,\n '--simple-grid-gap': gap ? toSpacingValue(gap) : '0px',\n '--simple-grid-row-gap': rowGap ? toSpacingValue(rowGap) : 'var(--simple-grid-gap)',\n '--simple-grid-column-gap': columnGap ? toSpacingValue(columnGap) : 'var(--simple-grid-gap)',\n ...style\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { SimpleGrid }\n"],"mappings":"A,qHAMA,MAAMA,EAAkD,CACtD,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,CACN,EAEA,SAAS,eAAe,EAA4B,CAClD,MAAO,yBAAyBA,EAAaC,GAAS,EACxD,CAgBA,SAAS,WAAW,CAAE,YAAW,OAAO,EAAG,MAAK,SAAQ,YAAW,QAAO,GAAGC,GAA0B,CACrG,MACE,kBAAC,MAAD,CACE,YAAU,cACV,UAAWC,EACT,eACA,4DACA,yFACAC,CACF,EACA,MACE,CACE,qBAAsBC,EACtB,oBAAqBC,EAAM,eAAeA,CAAG,EAAI,MACjD,wBAAyBC,EAAS,eAAeA,CAAM,EAAI,yBAC3D,2BAA4BC,EAAY,eAAeA,CAAS,EAAI,yBACpE,GAAGC,CACL,EAEF,GAAIP,CACL,CAAA,CAEL,C"}
@@ -1,6 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
- //#region src/components/skeleton.d.ts
4
3
  export type SkeletonProps = React.ComponentProps<'div'> & {
5
4
  /**
6
5
  * Shows the placeholder; when `false`, the children are shown.
@@ -9,6 +8,5 @@ export type SkeletonProps = React.ComponentProps<'div'> & {
9
8
  visible?: boolean;
10
9
  };
11
10
  declare function Skeleton({ className, children, visible, ...props }: SkeletonProps): React.JSX.Element;
12
- //#endregion
13
11
  export { Skeleton };
14
12
  //# sourceMappingURL=skeleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","names":["props","children","cn","className","visible"],"sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type SkeletonProps = React.ComponentProps<'div'> & {\n /**\n * Shows the placeholder; when `false`, the children are shown.\n * @default true\n */\n visible?: boolean\n}\n\nfunction Skeleton({ className, children, visible = true, ...props }: SkeletonProps) {\n if (children === undefined || children === null) {\n return <div data-slot=\"skeleton\" className={cn('bg-muted rounded-md animate-pulse', className)} {...props} />\n }\n\n return (\n <div\n data-slot=\"skeleton\"\n aria-busy={visible || undefined}\n className={cn('relative rounded-md', className)}\n {...props}\n >\n <div data-slot=\"skeleton-content\" className={cn(visible && 'invisible')} aria-hidden={visible || undefined}>\n {children}\n </div>\n {visible && (\n <div\n data-slot=\"skeleton-overlay\"\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 rounded-[inherit] bg-muted animate-pulse\"\n />\n )}\n </div>\n )\n}\n\nexport { Skeleton }\n"],"mappings":"+HAYA,SAAS,SAAS,CAAE,YAAW,WAAU,UAAU,GAAM,GAAGA,GAAwB,CAKlF,OAJIC,GAAuC,KAClC,kBAAC,MAAD,CAAK,YAAU,WAAW,UAAWC,EAAG,oCAAqCC,CAAS,EAAG,GAAIH,CAAQ,CAAA,EAI5G,kBAAC,MAAD,CACE,YAAU,WACV,YAAWI,GAAW,IAAA,GACtB,UAAWF,EAAG,sBAAuBC,CAAS,EAC9C,GAAIH,EAJN,SAAA,CAME,kBAAC,MAAD,CAAK,YAAU,mBAAmB,UAAWE,EAAGE,GAAW,WAAW,EAAG,cAAaA,GAAW,IAAA,GAC9F,UACE,CAAA,EACJA,GACC,kBAAC,MAAD,CACE,YAAU,mBACV,cAAY,OACZ,UAAU,+EACX,CAAA,CAEA,GAET"}
1
+ {"version":3,"file":"skeleton.js","names":["props","children","cn","className","visible"],"sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type SkeletonProps = React.ComponentProps<'div'> & {\n /**\n * Shows the placeholder; when `false`, the children are shown.\n * @default true\n */\n visible?: boolean\n}\n\nfunction Skeleton({ className, children, visible = true, ...props }: SkeletonProps) {\n if (children === undefined || children === null) {\n return <div data-slot=\"skeleton\" className={cn('bg-muted rounded-md animate-pulse', className)} {...props} />\n }\n\n return (\n <div\n data-slot=\"skeleton\"\n aria-busy={visible || undefined}\n className={cn('relative rounded-md', className)}\n {...props}\n >\n <div data-slot=\"skeleton-content\" className={cn(visible && 'invisible')} aria-hidden={visible || undefined}>\n {children}\n </div>\n {visible && (\n <div\n data-slot=\"skeleton-overlay\"\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 rounded-[inherit] bg-muted animate-pulse\"\n />\n )}\n </div>\n )\n}\n\nexport { Skeleton }\n"],"mappings":"A,+HAYA,SAAS,SAAS,CAAE,YAAW,WAAU,UAAU,GAAM,GAAGA,GAAwB,CAKlF,OAJIC,GAAuC,KAClC,kBAAC,MAAD,CAAK,YAAU,WAAW,UAAWC,EAAG,oCAAqCC,CAAS,EAAG,GAAIH,CAAQ,CAAA,EAI5G,kBAAC,MAAD,CACE,YAAU,WACV,YAAWI,GAAW,IAAA,GACtB,UAAWF,EAAG,sBAAuBC,CAAS,EAC9C,GAAIH,EAJN,SAAA,CAME,kBAAC,MAAD,CAAK,YAAU,mBAAmB,UAAWE,EAAGE,GAAW,WAAW,EAAG,cAAaA,GAAW,IAAA,GAC9F,UACE,CAAA,EACJA,GACC,kBAAC,MAAD,CACE,YAAU,mBACV,cAAY,OACZ,UAAU,+EACX,CAAA,CAEA,C,EAET,C"}
@@ -1,9 +1,7 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
3
  import { Slider as Slider$1 } from "@base-ui/react/slider";
4
- //#region src/components/slider.d.ts
5
4
  export type SliderProps = Omit<React.ComponentProps<typeof Slider$1.Root>, 'render'>;
6
5
  declare function Slider({ className, defaultValue, id, value, min, max, ...props }: SliderProps): React.JSX.Element;
7
- //#endregion
8
6
  export { Slider };
9
7
  //# sourceMappingURL=slider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","names":["SliderPrimitive","Slider$1","props","fieldControlId","useFieldControlId","id","fieldLabelId","useFieldLabelId","currentValue","value","defaultValue","thumbCount","cn","resolveClassName","className","state","index"],"sources":["../../src/components/slider.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Slider as SliderPrimitive } from '@base-ui/react/slider'\n\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { useFieldControlId, useFieldLabelId } from './field'\n\nexport type SliderProps = Omit<React.ComponentProps<typeof SliderPrimitive.Root>, 'render'>\n\nfunction Slider({ className, defaultValue, id, value, min = 0, max = 100, ...props }: SliderProps) {\n const fieldControlId = useFieldControlId(id)\n const fieldLabelId = useFieldLabelId()\n // One thumb per value: a single number (or no value, which defaults to `min`) is a one-thumb slider.\n const currentValue = value ?? defaultValue\n const thumbCount = Array.isArray(currentValue) ? currentValue.length : 1\n\n return (\n <SliderPrimitive.Root\n id={fieldControlId}\n aria-labelledby={fieldLabelId}\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n thumbAlignment=\"edge\"\n className={(state) => cn('data-horizontal:w-full data-vertical:h-full', resolveClassName(className, state))}\n {...props}\n >\n <SliderPrimitive.Control\n data-slot=\"slider-control\"\n className={cn(\n 'relative flex w-full touch-none items-center select-none data-disabled:opacity-50',\n 'data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col'\n )}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n 'relative grow overflow-hidden rounded-full bg-muted select-none',\n 'data-horizontal:h-1 data-horizontal:w-full',\n 'data-vertical:h-full data-vertical:w-1'\n )}\n >\n <SliderPrimitive.Indicator\n data-slot=\"slider-range\"\n className=\"bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: thumbCount }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={String(index)}\n index={index}\n className={cn(\n 'relative block size-3 shrink-0 rounded-full border border-ring bg-white dark:bg-primary ring-ring/50',\n 'transition-[color,box-shadow] select-none after:absolute after:-inset-2',\n 'hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 has-focus-visible:ring-3',\n 'data-disabled:pointer-events-none data-disabled:opacity-50'\n )}\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"],"mappings":"mSAUA,SAAS,OAAO,CAAE,YAAW,eAAc,KAAI,QAAO,MAAM,EAAG,MAAM,IAAK,GAAGE,GAAsB,CACjG,IAAMC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAeC,EAAgB,EAE/BC,EAAeC,GAASC,EACxBC,EAAa,MAAM,QAAQH,CAAY,EAAIA,EAAa,OAAS,EAEvE,MACE,kBAACR,EAAgB,KAAjB,CACE,GAAIG,EACJ,kBAAiBG,EACjB,YAAU,SACI,eACP,QACF,MACA,MACL,eAAe,OACf,UAAY,GAAUM,EAAG,8CAA+CC,EAAiBC,EAAWC,CAAK,CAAC,EAC1G,GAAIb,EAEJ,SAAA,kBAACF,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAWY,EACT,oFACA,yFACF,EALF,SAAA,CAOE,kBAACZ,EAAgB,MAAjB,CACE,YAAU,eACV,UAAWY,EACT,kEACA,6CACA,wCACF,EAEA,SAAA,kBAACZ,EAAgB,UAAjB,CACE,YAAU,eACV,UAAU,oEACX,CAAA,CACoB,CAAA,EACtB,MAAM,KAAK,CAAE,OAAQW,CAAW,GAAI,EAAG,IACtC,kBAACX,EAAgB,MAAjB,CACE,YAAU,eAEH,QACP,UAAWY,EACT,uGACA,0EACA,wGACA,4DACF,CACD,EARM,OAAOI,CAAK,CAQlB,CACF,CACsB,GACL,CAAA,CAE1B"}
1
+ {"version":3,"file":"slider.js","names":["SliderPrimitive","Slider$1","props","fieldControlId","useFieldControlId","id","fieldLabelId","useFieldLabelId","currentValue","value","defaultValue","thumbCount","cn","resolveClassName","className","state","index"],"sources":["../../src/components/slider.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Slider as SliderPrimitive } from '@base-ui/react/slider'\n\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\nimport { useFieldControlId, useFieldLabelId } from './field'\n\nexport type SliderProps = Omit<React.ComponentProps<typeof SliderPrimitive.Root>, 'render'>\n\nfunction Slider({ className, defaultValue, id, value, min = 0, max = 100, ...props }: SliderProps) {\n const fieldControlId = useFieldControlId(id)\n const fieldLabelId = useFieldLabelId()\n // One thumb per value: a single number (or no value, which defaults to `min`) is a one-thumb slider.\n const currentValue = value ?? defaultValue\n const thumbCount = Array.isArray(currentValue) ? currentValue.length : 1\n\n return (\n <SliderPrimitive.Root\n id={fieldControlId}\n aria-labelledby={fieldLabelId}\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n thumbAlignment=\"edge\"\n className={(state) => cn('data-horizontal:w-full data-vertical:h-full', resolveClassName(className, state))}\n {...props}\n >\n <SliderPrimitive.Control\n data-slot=\"slider-control\"\n className={cn(\n 'relative flex w-full touch-none items-center select-none data-disabled:opacity-50',\n 'data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col'\n )}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n 'relative grow overflow-hidden rounded-full bg-muted select-none',\n 'data-horizontal:h-1 data-horizontal:w-full',\n 'data-vertical:h-full data-vertical:w-1'\n )}\n >\n <SliderPrimitive.Indicator\n data-slot=\"slider-range\"\n className=\"bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: thumbCount }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={String(index)}\n index={index}\n className={cn(\n 'relative block size-3 shrink-0 rounded-full border border-ring bg-white dark:bg-primary ring-ring/50',\n 'transition-[color,box-shadow] select-none after:absolute after:-inset-2',\n 'hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 has-focus-visible:ring-3',\n 'data-disabled:pointer-events-none data-disabled:opacity-50'\n )}\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"],"mappings":"A,mSAUA,SAAS,OAAO,CAAE,YAAW,eAAc,KAAI,QAAO,MAAM,EAAG,MAAM,IAAK,GAAGE,GAAsB,CACjG,IAAMC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAeC,EAAgB,EAE/BC,EAAeC,GAASC,EACxBC,EAAa,MAAM,QAAQH,CAAY,EAAIA,EAAa,OAAS,EAEvE,MACE,kBAACR,EAAgB,KAAjB,CACE,GAAIG,EACJ,kBAAiBG,EACjB,YAAU,SACI,eACP,QACF,MACA,MACL,eAAe,OACf,UAAY,GAAUM,EAAG,8CAA+CC,EAAiBC,EAAWC,CAAK,CAAC,EAC1G,GAAIb,EAEJ,SAAA,kBAACF,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAWY,EACT,oFACA,yFACF,EALF,SAAA,CAOE,kBAACZ,EAAgB,MAAjB,CACE,YAAU,eACV,UAAWY,EACT,kEACA,6CACA,wCACF,EAEA,SAAA,kBAACZ,EAAgB,UAAjB,CACE,YAAU,eACV,UAAU,oEACX,CAAA,CACoB,CAAA,EACtB,MAAM,KAAK,CAAE,OAAQW,CAAW,GAAI,EAAG,IACtC,kBAACX,EAAgB,MAAjB,CACE,YAAU,eAEH,QACP,UAAWY,EACT,uGACA,0EACA,wGACA,4DACF,CACD,EARM,OAAOI,CAAK,CAQlB,CACF,CACsB,C,EACL,CAAA,CAE1B,C"}
@@ -1,8 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { ToasterProps as ToasterProps$1, toast } from "sonner";
3
- //#region src/components/sonner.d.ts
4
3
  export type ToasterProps = ToasterProps$1;
5
4
  declare const Toaster: (props: ToasterProps) => import("react").JSX.Element;
6
- //#endregion
7
5
  export { Toaster, toast };
8
6
  //# sourceMappingURL=sonner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sonner.js","names":["Sonner","Toaster$1","useTheme","IconCircleCheck","IconInfoCircle","IconAlertTriangle","IconAlertOctagon","IconLoader","props","toast"],"sources":["../../src/components/sonner.tsx"],"sourcesContent":["import type { CSSProperties } from 'react'\n\nimport { IconAlertOctagon, IconAlertTriangle, IconCircleCheck, IconInfoCircle, IconLoader } from '@tabler/icons-react'\nimport { useTheme } from 'next-themes'\nimport { Toaster as Sonner, type ToasterProps as SonnerToasterProps, toast } from 'sonner'\n\nexport type ToasterProps = SonnerToasterProps\n\nconst Toaster = (props: ToasterProps) => {\n const { theme = 'system' } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className=\"toaster group\"\n richColors\n icons={{\n success: <IconCircleCheck className=\"size-4\" />,\n info: <IconInfoCircle className=\"size-4\" />,\n warning: <IconAlertTriangle className=\"size-4\" />,\n error: <IconAlertOctagon className=\"size-4\" />,\n loading: <IconLoader className=\"size-4 animate-spin\" />\n }}\n style={\n {\n '--normal-bg': 'var(--popover)',\n '--normal-text': 'var(--popover-foreground)',\n '--normal-border': 'var(--border)',\n '--border-radius': 'var(--radius)'\n } as CSSProperties\n }\n toastOptions={{\n classNames: {\n toast: 'cn-toast'\n }\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster, toast }\n"],"mappings":"0SAQA,MAAM,QAAW,GAAwB,CACvC,GAAM,CAAE,QAAQ,UAAaE,EAAS,EAEtC,MACE,kBAACF,EAAD,CACS,QACP,UAAU,gBACV,WAAA,GACA,MAAO,CACL,QAAS,kBAACG,EAAD,CAAiB,UAAU,QAAU,CAAA,EAC9C,KAAM,kBAACC,EAAD,CAAgB,UAAU,QAAU,CAAA,EAC1C,QAAS,kBAACC,EAAD,CAAmB,UAAU,QAAU,CAAA,EAChD,MAAO,kBAACC,EAAD,CAAkB,UAAU,QAAU,CAAA,EAC7C,QAAS,kBAACC,EAAD,CAAY,UAAU,qBAAuB,CAAA,CACxD,EACA,MACE,CACE,cAAe,iBACf,gBAAiB,4BACjB,kBAAmB,gBACnB,kBAAmB,eACrB,EAEF,aAAc,CACZ,WAAY,CACV,MAAO,UACT,CACF,EACA,GAAIC,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"sonner.js","names":["Sonner","Toaster$1","useTheme","IconCircleCheck","IconInfoCircle","IconAlertTriangle","IconAlertOctagon","IconLoader","props","toast"],"sources":["../../src/components/sonner.tsx"],"sourcesContent":["import type { CSSProperties } from 'react'\n\nimport { IconAlertOctagon, IconAlertTriangle, IconCircleCheck, IconInfoCircle, IconLoader } from '@tabler/icons-react'\nimport { useTheme } from 'next-themes'\nimport { Toaster as Sonner, type ToasterProps as SonnerToasterProps, toast } from 'sonner'\n\nexport type ToasterProps = SonnerToasterProps\n\nconst Toaster = (props: ToasterProps) => {\n const { theme = 'system' } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className=\"toaster group\"\n richColors\n icons={{\n success: <IconCircleCheck className=\"size-4\" />,\n info: <IconInfoCircle className=\"size-4\" />,\n warning: <IconAlertTriangle className=\"size-4\" />,\n error: <IconAlertOctagon className=\"size-4\" />,\n loading: <IconLoader className=\"size-4 animate-spin\" />\n }}\n style={\n {\n '--normal-bg': 'var(--popover)',\n '--normal-text': 'var(--popover-foreground)',\n '--normal-border': 'var(--border)',\n '--border-radius': 'var(--radius)'\n } as CSSProperties\n }\n toastOptions={{\n classNames: {\n toast: 'cn-toast'\n }\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster, toast }\n"],"mappings":"A,0SAQA,MAAM,QAAW,GAAwB,CACvC,GAAM,CAAE,QAAQ,UAAaE,EAAS,EAEtC,MACE,kBAACF,EAAD,CACS,QACP,UAAU,gBACV,WAAA,GACA,MAAO,CACL,QAAS,kBAACG,EAAD,CAAiB,UAAU,QAAU,CAAA,EAC9C,KAAM,kBAACC,EAAD,CAAgB,UAAU,QAAU,CAAA,EAC1C,QAAS,kBAACC,EAAD,CAAmB,UAAU,QAAU,CAAA,EAChD,MAAO,kBAACC,EAAD,CAAkB,UAAU,QAAU,CAAA,EAC7C,QAAS,kBAACC,EAAD,CAAY,UAAU,qBAAuB,CAAA,CACxD,EACA,MACE,CACE,cAAe,iBACf,gBAAiB,4BACjB,kBAAmB,gBACnB,kBAAmB,eACrB,EAEF,aAAc,CACZ,WAAY,CACV,MAAO,UACT,CACF,EACA,GAAIC,CACL,CAAA,CAEL,E"}
@@ -1,12 +1,10 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
- //#region src/components/spinner.d.ts
5
4
  declare const spinnerVariants: (props?: ({
6
5
  size?: "lg" | "md" | "sm" | null | undefined;
7
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
7
  export type SpinnerProps = React.ComponentProps<'svg'> & VariantProps<typeof spinnerVariants>;
9
8
  declare function Spinner({ className, size, ...props }: SpinnerProps): React.JSX.Element;
10
- //#endregion
11
9
  export { Spinner, spinnerVariants };
12
10
  //# sourceMappingURL=spinner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","names":["spinnerVariants","cva","props","IconLoader","size","cn","className"],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconLoader } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst spinnerVariants = cva('animate-spin', {\n variants: {\n size: {\n sm: 'size-3',\n md: 'size-4',\n lg: 'size-5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type SpinnerProps = React.ComponentProps<'svg'> & VariantProps<typeof spinnerVariants>\n\nfunction Spinner({ className, size = 'md', ...props }: SpinnerProps) {\n return (\n <IconLoader\n role=\"status\"\n aria-label=\"Loading\"\n data-slot=\"spinner\"\n data-size={size}\n className={cn(spinnerVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nexport { Spinner, spinnerVariants }\n"],"mappings":"qNAOA,MAAMA,EAAkBC,EAAI,eAAgB,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,SACJ,GAAI,QACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAID,SAAS,QAAQ,CAAE,YAAW,OAAO,KAAM,GAAGC,GAAuB,CACnE,MACE,kBAACC,EAAD,CACE,KAAK,SACL,aAAW,UACX,YAAU,UACV,YAAWC,EACX,UAAWC,EAAGL,EAAgB,CAAE,MAAK,CAAC,EAAGM,CAAS,EAClD,GAAIJ,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"spinner.js","names":["spinnerVariants","cva","props","IconLoader","size","cn","className"],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconLoader } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst spinnerVariants = cva('animate-spin', {\n variants: {\n size: {\n sm: 'size-3',\n md: 'size-4',\n lg: 'size-5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type SpinnerProps = React.ComponentProps<'svg'> & VariantProps<typeof spinnerVariants>\n\nfunction Spinner({ className, size = 'md', ...props }: SpinnerProps) {\n return (\n <IconLoader\n role=\"status\"\n aria-label=\"Loading\"\n data-slot=\"spinner\"\n data-size={size}\n className={cn(spinnerVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nexport { Spinner, spinnerVariants }\n"],"mappings":"A,qNAOA,MAAMA,EAAkBC,EAAI,eAAgB,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,SACJ,GAAI,QACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAID,SAAS,QAAQ,CAAE,YAAW,OAAO,KAAM,GAAGC,GAAuB,CACnE,MACE,kBAACC,EAAD,CACE,KAAK,SACL,aAAW,UACX,YAAU,UACV,YAAWC,EACX,UAAWC,EAAGL,EAAgB,CAAE,MAAK,CAAC,EAAGM,CAAS,EAClD,GAAIJ,CACL,CAAA,CAEL,C"}
@@ -1,7 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
3
  import { VariantProps } from "class-variance-authority";
4
- //#region src/components/stack.d.ts
5
4
  declare const stackVariants: (props?: ({
6
5
  align?: "baseline" | "center" | "end" | "start" | "stretch" | null | undefined;
7
6
  justify?: "around" | "between" | "center" | "end" | "evenly" | "start" | null | undefined;
@@ -9,6 +8,5 @@ declare const stackVariants: (props?: ({
9
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
9
  export type StackProps = React.ComponentProps<'div'> & VariantProps<typeof stackVariants>;
11
10
  declare function Stack({ className, align, justify, gap, ...props }: StackProps): React.JSX.Element;
12
- //#endregion
13
11
  export { Stack, stackVariants };
14
12
  //# sourceMappingURL=stack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack.js","names":["stackVariants","cva","props","align","justify","gap","cn","className"],"sources":["../../src/components/stack.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst stackVariants = cva('flex flex-col', {\n variants: {\n align: {\n start: 'items-start',\n end: 'items-end',\n center: 'items-center',\n baseline: 'items-baseline',\n stretch: 'items-stretch'\n },\n justify: {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly'\n },\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8'\n }\n },\n defaultVariants: {\n gap: 'md'\n }\n})\n\nexport type StackProps = React.ComponentProps<'div'> & VariantProps<typeof stackVariants>\n\nfunction Stack({ className, align, justify, gap = 'md', ...props }: StackProps) {\n return (\n <div\n data-slot=\"stack\"\n data-align={align}\n data-justify={justify}\n data-gap={gap}\n className={cn(stackVariants({ align, justify, gap }), className)}\n {...props}\n />\n )\n}\n\nexport { Stack, stackVariants }\n"],"mappings":"oKAMA,MAAMA,EAAgBC,EAAI,gBAAiB,CACzC,SAAU,CACR,MAAO,CACL,MAAO,cACP,IAAK,YACL,OAAQ,eACR,SAAU,iBACV,QAAS,eACX,EACA,QAAS,CACP,MAAO,gBACP,IAAK,cACL,OAAQ,iBACR,QAAS,kBACT,OAAQ,iBACR,OAAQ,gBACV,EACA,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,CACF,EACA,gBAAiB,CACf,IAAK,IACP,CACF,CAAC,EAID,SAAS,MAAM,CAAE,YAAW,QAAO,UAAS,MAAM,KAAM,GAAGC,GAAqB,CAC9E,MACE,kBAAC,MAAD,CACE,YAAU,QACV,aAAYC,EACZ,eAAcC,EACd,WAAUC,EACV,UAAWC,EAAGN,EAAc,CAAE,QAAO,UAAS,KAAI,CAAC,EAAGO,CAAS,EAC/D,GAAIL,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"stack.js","names":["stackVariants","cva","props","align","justify","gap","cn","className"],"sources":["../../src/components/stack.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst stackVariants = cva('flex flex-col', {\n variants: {\n align: {\n start: 'items-start',\n end: 'items-end',\n center: 'items-center',\n baseline: 'items-baseline',\n stretch: 'items-stretch'\n },\n justify: {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly'\n },\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8'\n }\n },\n defaultVariants: {\n gap: 'md'\n }\n})\n\nexport type StackProps = React.ComponentProps<'div'> & VariantProps<typeof stackVariants>\n\nfunction Stack({ className, align, justify, gap = 'md', ...props }: StackProps) {\n return (\n <div\n data-slot=\"stack\"\n data-align={align}\n data-justify={justify}\n data-gap={gap}\n className={cn(stackVariants({ align, justify, gap }), className)}\n {...props}\n />\n )\n}\n\nexport { Stack, stackVariants }\n"],"mappings":"A,oKAMA,MAAMA,EAAgBC,EAAI,gBAAiB,CACzC,SAAU,CACR,MAAO,CACL,MAAO,cACP,IAAK,YACL,OAAQ,eACR,SAAU,iBACV,QAAS,eACX,EACA,QAAS,CACP,MAAO,gBACP,IAAK,cACL,OAAQ,iBACR,QAAS,kBACT,OAAQ,iBACR,OAAQ,gBACV,EACA,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,CACF,EACA,gBAAiB,CACf,IAAK,IACP,CACF,CAAC,EAID,SAAS,MAAM,CAAE,YAAW,QAAO,UAAS,MAAM,KAAM,GAAGC,GAAqB,CAC9E,MACE,kBAAC,MAAD,CACE,YAAU,QACV,aAAYC,EACZ,eAAcC,EACd,WAAUC,EACV,UAAWC,EAAGN,EAAc,CAAE,QAAO,UAAS,KAAI,CAAC,EAAGO,CAAS,EAC/D,GAAIL,CACL,CAAA,CAEL,C"}
@@ -1,7 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
2
+ import { n as AsChildProps } from "../as-child-T9W73ZYU.js";
3
3
  import { ReactElement } from "react";
4
- //#region src/components/stepper.d.ts
5
4
  type StepperOrientation = 'horizontal' | 'vertical';
6
5
  type StepState = 'active' | 'completed' | 'inactive' | 'loading';
7
6
  type StepIndicators = {
@@ -87,6 +86,5 @@ export type StepperContentProps = React.ComponentProps<'div'> & {
87
86
  forceMount?: boolean;
88
87
  };
89
88
  declare function StepperContent({ value, forceMount, children, className, ...props }: StepperContentProps): import("react").JSX.Element | null;
90
- //#endregion
91
89
  export { Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperNav, StepperPanel, StepperSeparator, StepperTitle, StepperTrigger, useStepItem, useStepper };
92
90
  //# sourceMappingURL=stepper.d.ts.map