@dynamic-labs-sdk/droplet 1.50.0 → 1.52.0

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 (106) hide show
  1. package/README.md +0 -1
  2. package/dist/components/copy-button/copy-button.d.ts +3 -1
  3. package/dist/components/copy-button/copy-button.d.ts.map +1 -1
  4. package/dist/components/copy-button/copy-button.stories.d.ts +1 -1
  5. package/dist/components/toggle-card/toggle-card.d.ts +10 -0
  6. package/dist/components/toggle-card/toggle-card.d.ts.map +1 -1
  7. package/dist/components/toggle-card/toggle-card.stories.d.ts +5 -0
  8. package/dist/components/toggle-card/toggle-card.stories.d.ts.map +1 -1
  9. package/dist/components/toggle-row/toggle-row.d.ts +22 -1
  10. package/dist/components/toggle-row/toggle-row.d.ts.map +1 -1
  11. package/dist/components/toggle-row/toggle-row.stories.d.ts +10 -6
  12. package/dist/components/toggle-row/toggle-row.stories.d.ts.map +1 -1
  13. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  14. package/dist/components/ui/combobox/combobox.d.ts +54 -12
  15. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  16. package/dist/components/ui/combobox/combobox.stories.d.ts +12 -1
  17. package/dist/components/ui/combobox/combobox.stories.d.ts.map +1 -1
  18. package/dist/components/ui/field/field-control-context.d.ts +20 -0
  19. package/dist/components/ui/field/field-control-context.d.ts.map +1 -0
  20. package/dist/components/ui/field/field.d.ts +24 -4
  21. package/dist/components/ui/field/field.d.ts.map +1 -1
  22. package/dist/components/ui/field/field.stories.d.ts +26 -6
  23. package/dist/components/ui/field/field.stories.d.ts.map +1 -1
  24. package/dist/components/ui/field/use-field-feedback.d.ts +25 -0
  25. package/dist/components/ui/field/use-field-feedback.d.ts.map +1 -0
  26. package/dist/components/ui/label/label.d.ts +15 -0
  27. package/dist/components/ui/label/label.d.ts.map +1 -1
  28. package/dist/components/ui/select/select.d.ts.map +1 -1
  29. package/dist/components/ui/select/select.stories.d.ts.map +1 -1
  30. package/dist/components/ui/table/table.d.ts +7 -1
  31. package/dist/components/ui/table/table.d.ts.map +1 -1
  32. package/dist/components/ui/well/index.d.ts +1 -1
  33. package/dist/components/ui/well/index.d.ts.map +1 -1
  34. package/dist/components/ui/well/well-reveal.stories.d.ts.map +1 -1
  35. package/dist/components/ui/well/well.d.ts +18 -3
  36. package/dist/components/ui/well/well.d.ts.map +1 -1
  37. package/dist/components/ui/well/well.stories.d.ts +1 -9
  38. package/dist/components/ui/well/well.stories.d.ts.map +1 -1
  39. package/dist/index.cjs +995 -407
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.ts +1 -2
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.esm.js +796 -205
  44. package/dist/index.esm.js.map +1 -1
  45. package/package.json +1 -6
  46. package/src/styles/globals.css +11 -15
  47. package/dist/components/migration/banner/banner.d.ts +0 -24
  48. package/dist/components/migration/banner/banner.d.ts.map +0 -1
  49. package/dist/components/migration/banner/banner.stories.d.ts +0 -39
  50. package/dist/components/migration/banner/banner.stories.d.ts.map +0 -1
  51. package/dist/components/migration/banner/index.d.ts +0 -2
  52. package/dist/components/migration/banner/index.d.ts.map +0 -1
  53. package/dist/components/migration/double-section/double-section.d.ts +0 -29
  54. package/dist/components/migration/double-section/double-section.d.ts.map +0 -1
  55. package/dist/components/migration/double-section/double-section.stories.d.ts +0 -32
  56. package/dist/components/migration/double-section/double-section.stories.d.ts.map +0 -1
  57. package/dist/components/migration/double-section/index.d.ts +0 -2
  58. package/dist/components/migration/double-section/index.d.ts.map +0 -1
  59. package/dist/components/migration/field/field.d.ts +0 -19
  60. package/dist/components/migration/field/field.d.ts.map +0 -1
  61. package/dist/components/migration/field/field.stories.d.ts +0 -43
  62. package/dist/components/migration/field/field.stories.d.ts.map +0 -1
  63. package/dist/components/migration/field/index.d.ts +0 -2
  64. package/dist/components/migration/field/index.d.ts.map +0 -1
  65. package/dist/components/migration/index.d.ts +0 -16
  66. package/dist/components/migration/index.d.ts.map +0 -1
  67. package/dist/components/migration/settings-section-v2/index.d.ts +0 -2
  68. package/dist/components/migration/settings-section-v2/index.d.ts.map +0 -1
  69. package/dist/components/migration/settings-section-v2/settings-section-v2.d.ts +0 -45
  70. package/dist/components/migration/settings-section-v2/settings-section-v2.d.ts.map +0 -1
  71. package/dist/components/migration/settings-section-v2/settings-section-v2.stories.d.ts +0 -40
  72. package/dist/components/migration/settings-section-v2/settings-section-v2.stories.d.ts.map +0 -1
  73. package/dist/components/migration/sub-section/index.d.ts +0 -2
  74. package/dist/components/migration/sub-section/index.d.ts.map +0 -1
  75. package/dist/components/migration/sub-section/sub-section.d.ts +0 -26
  76. package/dist/components/migration/sub-section/sub-section.d.ts.map +0 -1
  77. package/dist/components/migration/sub-section/sub-section.stories.d.ts +0 -33
  78. package/dist/components/migration/sub-section/sub-section.stories.d.ts.map +0 -1
  79. package/dist/components/migration/toggle-group/index.d.ts +0 -2
  80. package/dist/components/migration/toggle-group/index.d.ts.map +0 -1
  81. package/dist/components/migration/toggle-group/toggle-group.d.ts +0 -22
  82. package/dist/components/migration/toggle-group/toggle-group.d.ts.map +0 -1
  83. package/dist/components/migration/toggle-group/toggle-group.stories.d.ts +0 -30
  84. package/dist/components/migration/toggle-group/toggle-group.stories.d.ts.map +0 -1
  85. package/dist/components/patterns/config-tab-with-pill/config-tab-with-pill.stories.d.ts +0 -17
  86. package/dist/components/patterns/config-tab-with-pill/config-tab-with-pill.stories.d.ts.map +0 -1
  87. package/dist/components/patterns/cors-list/cors-list.stories.d.ts +0 -17
  88. package/dist/components/patterns/cors-list/cors-list.stories.d.ts.map +0 -1
  89. package/dist/components/patterns/rounded-row-list/rounded-row-list.stories.d.ts +0 -17
  90. package/dist/components/patterns/rounded-row-list/rounded-row-list.stories.d.ts.map +0 -1
  91. package/dist/components/status-badge/index.d.ts +0 -2
  92. package/dist/components/status-badge/index.d.ts.map +0 -1
  93. package/dist/components/status-badge/status-badge.d.ts +0 -10
  94. package/dist/components/status-badge/status-badge.d.ts.map +0 -1
  95. package/dist/components/status-badge/status-badge.stories.d.ts +0 -24
  96. package/dist/components/status-badge/status-badge.stories.d.ts.map +0 -1
  97. package/dist/components/ui/flush-card-detach/flush-card-detach.stories.d.ts +0 -17
  98. package/dist/components/ui/flush-card-detach/flush-card-detach.stories.d.ts.map +0 -1
  99. package/dist/migration.cjs +0 -328
  100. package/dist/migration.cjs.map +0 -1
  101. package/dist/migration.esm.js +0 -322
  102. package/dist/migration.esm.js.map +0 -1
  103. package/dist/toggle-row-BBTk7_bT.cjs +0 -408
  104. package/dist/toggle-row-BBTk7_bT.cjs.map +0 -1
  105. package/dist/toggle-row-PqelNVXI.esm.js +0 -360
  106. package/dist/toggle-row-PqelNVXI.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","names":["spring","edge: TrayEdge","trayChild: ReactNode","Root","Trigger","Content","spring","Icon","CollapsibleTrigger: FC<CollapsibleTriggerProps>","Root","Trigger","Portal","Overlay","Content","Title","Description","CommandPrimitive","Root","Trigger","Portal","Content","Item","CheckIcon","RadioGroup","Label","Separator","ChevronRightIcon","Field: FC<FieldProps>","describedByParts: string[]","Root","Group","Trigger","Icon","Portal","Content","Label","Item","ItemIndicator","Separator","Root","Sonner","firstColumn: HTMLTableCellElement | undefined","createColumnHelper: typeof createTanStackColumnHelper","createTanStackColumnHelper","Icon","RESIZE_STEP: Partial<Record<string, number>>","DefaultEmptyIcon: EmptyStateProps['icon']","updateFilters: OnChangeFn<DataTableFilterState>","handleClientSortingChange: OnChangeFn<SortingState>","sortingState: TableFeatureState<SortingState>","paginationState: TableFeatureState<PaginationState>","next: number","contextValue: ToggleGroupContextValue","Root","Trigger","Portal","Content","aliases: Record<string, string>","iconTransition: Transition","labelTransition: Transition","spring","trendColor: Record<Trend, string>","Icon","statusConfig: Record<\n StatusType,\n {\n label: string;\n variant:\n | 'success'\n | 'inactive'\n | 'danger'\n | 'warning'\n | 'brand'\n | 'process';\n }\n>","value","ToggleCard: FC<ToggleCardProps>","AccordionContent","AccordionRoot","AccordionItem","AccordionHeader","AccordionTrigger","LINE_VARIANTS: Variants","LINE_VARIANTS","DEFAULT_TRANSITION: Transition","DEFAULT_TRANSITION","SPRING_TRANSITION: Transition","DOLLAR_MAIN_VARIANTS: Variants","DOLLAR_SECONDARY_VARIANTS: Variants","PATH_VARIANTS: Variants","PATH_VARIANTS","DEFAULT_TRANSITION: Transition","PATH_VARIANTS: Variants","DEFAULT_TRANSITION","PATH_VARIANTS","PATH_VARIANTS: Variants","PATH_VARIANTS","SVG_VARIANTS: Variants","SVG_TRANSITION: Transition","DEFAULT_TRANSITION: Transition","PATH_VARIANTS: Variants","DEFAULT_TRANSITION","PATH_VARIANTS","DEFAULT_TRANSITION: Transition","PATH_VARIANTS: Variants","PATH_VARIANTS","PATH_VARIANTS: Variants","PATH_VARIANTS","PATH_VARIANTS: Variants","PATH_VARIANTS","LINE_VARIANTS: Variants","PATH_VARIANTS: Variants"],"sources":["../src/components/unsaved-changes-bar/unsaved-changes-bar.tsx","../src/components/ui/accordion/accordion.tsx","../src/components/ui/tray/resolveTrayLayout.tsx","../src/components/ui/tray/renderTrayLayout.tsx","../src/components/ui/alert-dialog/alert-dialog.tsx","../src/components/ui/avatar/avatar.tsx","../src/components/ui/alert/alert.tsx","../src/components/ui/badge/badge.tsx","../src/components/ui/breadcrumb/breadcrumb.tsx","../src/components/ui/card/card.tsx","../src/components/ui/check-icon/check-icon.tsx","../src/components/ui/checkbox/checkbox.tsx","../src/components/ui/collapsible/collapsible.tsx","../src/components/ui/dialog/dialog.tsx","../src/components/ui/command/command.tsx","../src/components/ui/popover/popover.tsx","../src/components/ui/combobox/combobox.tsx","../src/components/ui/dropdown-menu/dropdown-menu.tsx","../src/components/ui/well/well.tsx","../src/components/ui/flush-card-stack/flush-card-stack.tsx","../src/components/icon-config/icon-config.tsx","../src/components/ui/icon/icon.tsx","../src/components/ui/field/field.tsx","../src/components/ui/kbd/kbd.tsx","../src/components/ui/progress/progress.tsx","../src/components/ui/radio-group/radio-group.tsx","../src/components/ui/pagination/pagination.tsx","../src/components/ui/scroll-area/scroll-area.tsx","../src/components/ui/search-input/search-input.tsx","../src/components/ui/select/select.tsx","../src/components/ui/selectable-card/selectable-card.tsx","../src/components/ui/separator/separator.tsx","../src/components/ui/slider/slider.tsx","../src/components/ui/sheet/sheet.tsx","../src/components/ui/skeleton/skeleton.tsx","../src/components/ui/sonner/sonner.tsx","../src/components/ui/stepper/stepper.tsx","../src/components/ui/table/table.tsx","../src/components/ui/data-table/create-column-helper.ts","../src/components/ui/data-table/data-table-context.ts","../src/components/ui/data-table/data-table.tsx","../src/components/ui/data-table/get-column-label.ts","../src/components/ui/data-table/data-table-column-filter.tsx","../src/components/ui/data-table/data-table-active-filters.tsx","../src/components/ui/data-table/data-table-column-visibility.tsx","../src/components/empty-state/empty-state.tsx","../src/components/ui/data-table/data-table-placeholder-rows.tsx","../src/components/ui/data-table/expand-chevron.tsx","../src/components/ui/data-table/get-pinned-cell-props.ts","../src/components/ui/data-table/selection-column.tsx","../src/components/ui/data-table/data-table-rows.tsx","../src/components/ui/data-table/data-table-content.tsx","../src/components/ui/data-table/data-table-pagination.tsx","../src/components/ui/data-table/data-table-search.tsx","../src/components/ui/data-table/use-data-table.ts","../src/components/ui/tabs/tabs.tsx","../src/components/ui/toggle-group/toggle-group.tsx","../src/components/ui/textarea/textarea.tsx","../src/components/ui/tooltip/tooltip.tsx","../src/components/asset-icon/asset-icon.tsx","../src/components/copy-button/copy-button.tsx","../src/components/code-block/code-block.tsx","../src/components/danger-zone/danger-zone.tsx","../src/components/domain-list/domain-list.tsx","../src/components/info-banner/info-banner.tsx","../src/components/loading-skeleton/loading-skeleton.tsx","../src/components/metric-card/metric-card.tsx","../src/components/ask-ai-sheet/ask-ai-sheet.tsx","../src/components/page-actions/page-actions.tsx","../src/components/page-header/page-header.tsx","../src/components/product-page-layout/product-page-layout.tsx","../src/components/settings-section/settings-section.tsx","../src/components/status-badge/status-badge.tsx","../src/components/tab-navigation/tab-navigation.tsx","../src/components/toggle-card/toggle-card.tsx","../src/components/icons/animated-icon/animated-icon.tsx","../src/components/icons/arrow-up-right/arrow-up-right.tsx","../src/components/icons/chart-bar-increasing/chart-bar-increasing.tsx","../src/components/icons/chevron-down/chevron-down.tsx","../src/components/icons/chevron-right/chevron-right.tsx","../src/components/icons/copy/copy.tsx","../src/components/icons/copy-check/copy-check.tsx","../src/components/icons/dollar-sign/dollar-sign.tsx","../src/components/icons/download/download.tsx","../src/components/icons/fingerprint/fingerprint.tsx","../src/components/icons/home/home.tsx","../src/components/icons/key/key.tsx","../src/components/icons/layout-panel-top/layout-panel-top.tsx","../src/components/icons/link/link.tsx","../src/components/icons/mcp-tools/mcp-tools.tsx","../src/components/icons/moon/moon.tsx","../src/components/icons/panel-left-close/panel-left-close.tsx","../src/components/icons/panel-left-open/panel-left-open.tsx","../src/components/icons/plus/plus.tsx","../src/components/icons/refresh-cw/refresh-cw.tsx","../src/components/icons/search/search.tsx","../src/components/icons/settings/settings.tsx","../src/components/icons/shield-check/shield-check.tsx","../src/components/icons/sun/sun.tsx","../src/components/icons/terminal/terminal.tsx","../src/components/icons/users/users.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport type { Dispatch, ReactElement, SetStateAction } from 'react';\n\nimport { Button } from '../ui/button';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\nconst BLUR_STEPS = 6;\nconst BLUR_STRENGTH = 32;\n\n// Stable identity keys for the fixed-length blur stack — Sonar flags\n// index-derived keys, and these are computed once at module load.\nconst BLUR_STEP_IDS = Array.from({ length: BLUR_STEPS }, () =>\n crypto.randomUUID()\n);\n\nconst ProgressiveBlur = (): ReactElement => {\n const factor = 0.5;\n const base = Math.pow(BLUR_STRENGTH / factor, 1 / (BLUR_STEPS - 1));\n\n const getBlur = (i: number) => factor * Math.pow(base, BLUR_STEPS - i - 1);\n\n return (\n <div\n className=\"fixed -bottom-10 left-1/2 -translate-x-1/2 pointer-events-none z-40\"\n style={{ height: '160px', width: '900px' }}\n >\n {BLUR_STEP_IDS.map((id, i) => {\n const blur = getBlur(i);\n const spread = 20 + ((BLUR_STEPS - i) / BLUR_STEPS) * 30;\n const mask = `radial-gradient(ellipse ${spread}% ${spread}% at 50% 60%, rgba(0,0,0,1), rgba(0,0,0,0))`;\n return (\n <div\n key={id}\n className=\"absolute inset-0\"\n style={{\n backdropFilter: `blur(${blur}px)`,\n mask,\n WebkitBackdropFilter: `blur(${blur}px)`,\n WebkitMask: mask,\n }}\n />\n );\n })}\n <div\n className=\"absolute inset-0\"\n style={{\n background:\n 'radial-gradient(ellipse 40% 50% at 50% 60%, var(--background), transparent)',\n }}\n />\n </div>\n );\n};\n\ntype BarState = 'unsaved' | 'saved';\n\nconst popTransition = { ...spring, duration: 0.25 };\n\nconst StatusIcon = ({ state }: { state: BarState }): ReactElement => {\n return (\n <div className=\"relative size-[18px] shrink-0\">\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.div\n key={state}\n initial={{ filter: 'blur(4px)', opacity: 0, scale: 0.25 }}\n animate={{ filter: 'blur(0px)', opacity: 1, scale: 1 }}\n exit={{ filter: 'blur(4px)', opacity: 0, scale: 0.25 }}\n transition={popTransition}\n className=\"absolute inset-0 will-change-[opacity,transform,filter]\"\n >\n {state === 'unsaved' && (\n <span className=\"text-zinc-400 dark:text-zinc-400\">\n <HugeiconsIcon icon={InformationCircleIcon} size={18} />\n </span>\n )}\n {state === 'saved' && (\n <span className=\"text-emerald-400 dark:text-emerald-600\">\n <HugeiconsIcon icon={CheckmarkCircle02Icon} size={18} />\n </span>\n )}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n\nconst StatusText = ({ state }: { state: BarState }): ReactElement => {\n const text = state === 'unsaved' ? 'Unsaved changes' : 'Changes saved';\n\n return (\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.span\n key={text}\n initial={{ filter: 'blur(4px)', opacity: 0, scale: 0.95 }}\n animate={{ filter: 'blur(0px)', opacity: 1, scale: 1 }}\n exit={{ filter: 'blur(4px)', opacity: 0, scale: 0.95 }}\n transition={popTransition}\n className=\"text-[13px] font-medium text-white dark:text-zinc-800 whitespace-nowrap will-change-[opacity,transform,filter]\"\n >\n {text}\n </motion.span>\n </AnimatePresence>\n );\n};\n\nexport interface UnsavedChangesBarProps {\n hasChanges: boolean;\n onReset: () => void;\n onSave: () => void;\n /**\n * When true, hide the bar even if there are unsaved changes.\n * Use when a config modal (auto-opened from a toggle) owns its own Save button —\n * keeps save affordance in one place. See feedback_save_pattern_auto_modal.md.\n */\n suppressed?: boolean;\n}\n\nexport const UnsavedChangesBar = ({\n hasChanges,\n onSave,\n onReset,\n suppressed = false,\n}: UnsavedChangesBarProps): ReactElement => {\n const prefersReduced = useReducedMotion();\n const [barState, setBarState] = useState<BarState>('unsaved');\n const [visible, setVisible] = useState(false);\n const shouldRender = visible && !suppressed;\n\n const dismissTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleSave = () => {\n onSave();\n setBarState('saved');\n dismissTimer.current = setTimeout(() => {\n setVisible(false);\n setBarState('unsaved');\n }, 1800);\n };\n\n useEffect(() => {\n if (hasChanges) {\n // If reappearing while dismiss is pending, cancel the dismiss\n if (dismissTimer.current) {\n clearTimeout(dismissTimer.current);\n dismissTimer.current = null;\n }\n setVisible(true);\n setBarState('unsaved');\n } else if (!dismissTimer.current) {\n // Only hide immediately if we're not in a post-save dismiss flow\n setVisible(false);\n }\n }, [hasChanges]);\n\n return (\n <>\n <AnimatePresence>\n {shouldRender && (\n <motion.div\n key=\"blur\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={spring}\n >\n <ProgressiveBlur />\n </motion.div>\n )}\n </AnimatePresence>\n <div className=\"fixed bottom-10 left-1/2 -translate-x-1/2 z-50\">\n <AnimatePresence>\n {shouldRender && (\n <motion.div\n initial={\n prefersReduced\n ? { opacity: 0 }\n : { opacity: 0, scale: 0.95, y: 20 }\n }\n animate={\n prefersReduced ? { opacity: 1 } : { opacity: 1, scale: 1, y: 0 }\n }\n exit={\n prefersReduced\n ? { opacity: 0 }\n : { opacity: 0, scale: 0.95, y: 20 }\n }\n transition={spring}\n style={{ willChange: 'opacity, transform' }}\n className=\"flex items-center gap-1.5 rounded-xl bg-zinc-900 dark:bg-[oklch(0.940_0.008_231)] shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_24px_-4px_rgba(0,0,0,0.25),0_20px_50px_-8px_rgba(0,0,0,0.20)] dark:shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_20px_-4px_rgba(0,0,0,0.10),0_20px_50px_-8px_rgba(0,0,0,0.08)] pl-3 pr-1.5 py-1.5\"\n >\n <StatusIcon state={barState} />\n <StatusText state={barState} />\n\n <motion.div\n animate={{ opacity: barState === 'unsaved' ? 1 : 0 }}\n transition={popTransition}\n className=\"flex items-center gap-1.5 ml-0.5\"\n style={{\n pointerEvents: barState === 'unsaved' ? 'auto' : 'none',\n }}\n >\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"rounded-md text-zinc-400 hover:text-white hover:bg-white/10 dark:text-zinc-500 dark:hover:text-zinc-800 dark:hover:bg-black/[0.06] shrink-0 touch-manipulation\"\n onClick={onReset}\n >\n Reset\n </Button>\n <Button\n size=\"sm\"\n className=\"rounded-md shrink-0 touch-manipulation\"\n onClick={handleSave}\n >\n Save changes\n </Button>\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n </>\n );\n};\n\n// localStorage-backed store — survives page refresh and browser restart\nconst sessionStore = {\n // eslint-disable-next-line custom-rules/require-single-object-param\n get(key: string): { savedValues: unknown; values: unknown } | undefined {\n if (globalThis.window === undefined) return undefined;\n try {\n const stored = localStorage.getItem(`dashboard-${key}`);\n return stored ? JSON.parse(stored) : undefined;\n } catch {\n return undefined;\n }\n },\n // eslint-disable-next-line custom-rules/require-single-object-param\n set(key: string, value: { savedValues: unknown; values: unknown }) {\n if (globalThis.window === undefined) return;\n try {\n localStorage.setItem(`dashboard-${key}`, JSON.stringify(value));\n } catch {\n /* quota exceeded, ignore */\n }\n },\n};\n\ntype UnsavedChanges<T extends Record<string, unknown>> = {\n commit: (partial?: Partial<T>) => T;\n hasChanges: boolean;\n reset: () => void;\n save: () => void;\n setValues: Dispatch<SetStateAction<T>>;\n updateValue: <K extends keyof T>(key: K, value: T[K]) => void;\n values: T;\n};\n\n// Hook to track changes\n// Pass a unique `key` to persist values across client-side navigation.\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const useUnsavedChanges = <T extends Record<string, unknown>>(\n initialValues: T,\n storeKey?: string\n): UnsavedChanges<T> => {\n const cached = storeKey\n ? (sessionStore.get(storeKey) as { savedValues: T; values: T } | undefined)\n : undefined;\n\n const [values, setValues] = useState<T>(cached?.values ?? initialValues);\n const [savedValues, setSavedValues] = useState<T>(\n cached?.savedValues ?? initialValues\n );\n\n // Sync to session store on every change\n useEffect(() => {\n if (storeKey) {\n sessionStore.set(storeKey, { savedValues, values });\n }\n }, [storeKey, values, savedValues]);\n\n const hasChanges = useMemo(() => {\n return JSON.stringify(values) !== JSON.stringify(savedValues);\n }, [values, savedValues]);\n\n // eslint-disable-next-line custom-rules/require-single-object-param\n const updateValue = <K extends keyof T>(key: K, value: T[K]) => {\n setValues((prev) => ({ ...prev, [key]: value }));\n };\n\n const save = () => {\n setSavedValues(values);\n };\n\n const reset = () => {\n setValues(savedValues);\n };\n\n const commit = (partial?: Partial<T>): T => {\n const next = partial ? { ...values, ...partial } : values;\n setValues(next);\n setSavedValues(next);\n return next;\n };\n\n return {\n commit,\n hasChanges,\n reset,\n save,\n setValues,\n updateValue,\n values,\n };\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { ArrowRight01Icon } from '@hugeicons/core-free-icons';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\n\nimport { cn } from '../../../lib/utils';\n\nconst Accordion = ({\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Root>): ReactElement => (\n <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n);\n\nconst AccordionItem = ({\n className,\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Item>): ReactElement => {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\n 'border-b border-[var(--border-divider)] last:border-b-0',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AccordionTrigger = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Trigger>): ReactElement => {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'focus-visible:ring-ring/50 flex flex-1 items-center justify-between gap-4 rounded-md px-1 py-4 text-left text-sm font-medium touch-manipulation transition-[color,background-color,opacity] duration-150 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 cursor-pointer',\n className\n )}\n {...props}\n >\n {children}\n <HugeiconsIcon\n icon={ArrowRight01Icon}\n size={16}\n className=\"text-muted-foreground/60 pointer-events-none shrink-0 transition-transform duration-200 ease-out motion-reduce:transition-none [*[data-state=open]>&]:rotate-90\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n};\n\nconst AccordionContent = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Content>): ReactElement => {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down motion-reduce:animate-none overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn('px-1 pt-0 pb-4', className)}>{children}</div>\n </AccordionPrimitive.Content>\n );\n};\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n","import {\n Children,\n type ReactElement,\n type ReactNode,\n isValidElement,\n} from 'react';\n\n/** Which chrome edge carries the muted tray, or `none` for a flat container. */\nexport type TrayEdge = 'header' | 'footer' | 'none';\n\n/** Consumer-facing override; `auto` applies the footer-priority convention. */\nexport type TrayPreference = 'auto' | TrayEdge;\n\nexport type ResolveTrayLayoutParams = {\n /** The container's children (header / body / footer slots in any order). */\n children: ReactNode;\n /** Identifies the footer slot element. */\n isFooter: (el: ReactElement) => boolean;\n /** Identifies the header slot element (e.g. `(el) => el.type === DialogHeader`). */\n isHeader: (el: ReactElement) => boolean;\n /** Override the auto convention. Defaults to `auto`. */\n tray?: TrayPreference;\n};\n\nexport type ResolvedTrayLayout = {\n /** The resolved tray edge after applying the convention/override. */\n edge: TrayEdge;\n /** Children that belong to the raised white shelf (everything except the tray slot). */\n shelf: ReactNode[];\n /** The slot rendered on the muted tray, or `undefined` when `edge === 'none'`. */\n trayChild: ReactNode;\n};\n\n/**\n * Resolves the droplet \"tray\" layout for a container (Dialog/Card/Sheet/AlertDialog).\n *\n * Convention (footer-priority): a container gets exactly one muted tray — the\n * **footer** when actions are present, otherwise the **header** (e.g. Table/CodeBlock).\n * The non-tray slots form the raised white shelf. Pass an explicit `tray` to override.\n *\n * Returns the partitioned pieces so each container can assemble its own shell +\n * shelf markup with the shared `--tray-*` tokens.\n */\nexport const resolveTrayLayout = ({\n children,\n isHeader,\n isFooter,\n tray = 'auto',\n}: ResolveTrayLayoutParams): ResolvedTrayLayout => {\n const elements = Children.toArray(children).filter(isValidElement) as ReactElement[];\n const header = elements.find(isHeader);\n const footer = elements.find(isFooter);\n\n let edge: TrayEdge;\n\n if (tray === 'auto') {\n if (footer) {\n edge = 'footer';\n } else if (header) {\n edge = 'header';\n } else {\n edge = 'none';\n }\n } else {\n edge = tray;\n }\n\n let trayChild: ReactNode = undefined;\n\n if (edge === 'footer') {\n trayChild = footer;\n } else if (edge === 'header') {\n trayChild = header;\n }\n\n const shelf = Children.toArray(children).filter((child) => {\n if (!isValidElement(child)) return true;\n if (edge === 'footer' && isFooter(child)) return false;\n if (edge === 'header' && isHeader(child)) return false;\n return true;\n });\n\n return { edge, shelf, trayChild };\n};\n","import { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport {\n type TrayEdge,\n type TrayPreference,\n resolveTrayLayout,\n} from './resolveTrayLayout';\n\nexport type RenderTrayLayoutParams = {\n /** The container's children (header / body / footer slots in any order). */\n children: ReactNode;\n /** Identifies the footer slot element. */\n isFooter: (el: ReactElement) => boolean;\n /** Identifies the header slot element (e.g. `(el) => el.type === DialogHeader`). */\n isHeader: (el: ReactElement) => boolean;\n /** Extra classes merged onto the white shelf wrapper. */\n shelfClassName?: string;\n /** Override the footer-priority convention. Defaults to `auto`. */\n tray?: TrayPreference;\n};\n\nexport type RenderedTrayLayout = {\n /** The inner JSX (tray slot + wrapped shelf), ready to render inside the shell. */\n content: ReactNode;\n /** The resolved tray edge — spread onto the container root as `data-tray`. */\n edge: TrayEdge;\n /** Layout/surface classes for the container shell — merge onto the container root. */\n shellClassName: string;\n};\n\n/**\n * Builds the shared droplet \"tray\" markup for a container (Dialog/Card/AlertDialog/…).\n *\n * Centralizes BOTH the convention (via {@link resolveTrayLayout}) and the render —\n * the muted shell classes + the raised white shelf wrapper + the tray-slot\n * placement — so every container (and new ones like Table/CodeBlock) shares one\n * implementation and can't drift. Each container keeps its own root element\n * (portal, animations, `shadow-elevated` vs `shadow-card`) and just merges\n * `shellClassName` + renders `content`.\n *\n * Note: this composes the tray treatment; it does **not** make any container\n * depend on `Card`. Containers stay independent primitives sharing a treatment.\n */\nexport const renderTrayLayout = ({\n children,\n isHeader,\n isFooter,\n tray = 'auto',\n shelfClassName,\n}: RenderTrayLayoutParams): RenderedTrayLayout => {\n const { edge, shelf, trayChild } = resolveTrayLayout({\n children,\n isFooter,\n isHeader,\n tray,\n });\n\n // Flat container — no shell, no shelf; render children as-is.\n if (edge === 'none') {\n return { content: children, edge, shellClassName: 'bg-card' };\n }\n\n // Muted shell: insets the shelf on top+sides (footer tray) or bottom+sides\n // (header tray), leaving the tray edge flush.\n const shellClassName = cn(\n 'flex flex-col bg-[var(--tray-chrome)] px-[var(--tray-inset)]',\n edge === 'footer' ? 'pt-[var(--tray-inset)]' : 'pb-[var(--tray-inset)]',\n );\n\n const content = (\n <>\n {edge === 'header' && trayChild}\n <div\n data-slot='tray-shelf'\n className={cn(\n // flex-1 so short content in equal-height grids fills white (no void).\n 'flex flex-1 flex-col overflow-hidden bg-card rounded-[var(--tray-shelf-radius)] shadow-[var(--tray-shelf-shadow)]',\n shelfClassName,\n )}\n >\n {shelf}\n </div>\n {edge === 'footer' && trayChild}\n </>\n );\n\n return { content, edge, shellClassName };\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport {\n Action,\n Cancel,\n Content,\n Description,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n} from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button';\nimport { type TrayPreference } from '../tray/resolveTrayLayout';\nimport { renderTrayLayout } from '../tray/renderTrayLayout';\n\nconst AlertDialog = Root;\nconst AlertDialogTrigger = Trigger;\nconst AlertDialogPortal = Portal;\n\nconst AlertDialogOverlay = ({\n className,\n ...props\n}: ComponentProps<typeof Overlay>): ReactElement => (\n <Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogContent = ({\n className,\n size = 'default',\n tray = 'auto',\n children,\n ...props\n}: ComponentProps<typeof Content> & {\n size?: 'default' | 'sm';\n /** Tray edge. `auto` = footer-priority (actions → footer tray). */\n tray?: TrayPreference;\n}): ReactElement => {\n const { edge, shellClassName, content } = renderTrayLayout({\n children,\n isFooter: (el) => el.type === AlertDialogFooter,\n isHeader: (el) => el.type === AlertDialogHeader,\n tray,\n });\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n data-tray={edge}\n className={cn(\n 'overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-[var(--shadow-elevated)] duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none',\n shellClassName,\n className\n )}\n {...props}\n >\n {content}\n </Content>\n </AlertDialogPortal>\n );\n};\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 px-5 py-4 bg-card text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn('grid grid-cols-2 gap-2 px-5 py-4 bg-muted', className)}\n {...props}\n />\n);\n\nconst AlertDialogTitle = ({\n className,\n ...props\n}: ComponentProps<typeof Title>): ReactElement => (\n <Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n 'text-[17px] font-semibold text-balance sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogDescription = ({\n className,\n ...props\n}: ComponentProps<typeof Description>): ReactElement => (\n <Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-muted-foreground text-sm text-pretty', className)}\n {...props}\n />\n);\n\nconst AlertDialogMedia = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogAction = ({\n className,\n variant = 'destructive',\n size = 'default',\n ...props\n}: ComponentProps<typeof Action> &\n Pick<ComponentProps<typeof Button>, 'variant' | 'size'>): ReactElement => (\n <Button variant={variant} size={size} asChild>\n <Action\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n </Button>\n);\n\nconst AlertDialogCancel = ({\n className,\n variant = 'outline',\n size = 'default',\n ...props\n}: ComponentProps<typeof Cancel> &\n Pick<ComponentProps<typeof Button>, 'variant' | 'size'>): ReactElement => (\n <Button variant={variant} size={size} asChild>\n <Cancel\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n {...props}\n />\n </Button>\n);\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\n\nimport { cn } from '../../../lib/utils';\n\nconst Avatar = ({\n className,\n size = 'default',\n ...props\n}: ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: 'default' | 'sm' | 'lg';\n}): ReactElement => {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n className={cn(\n 'group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarImage = ({\n className,\n ...props\n}: ComponentProps<typeof AvatarPrimitive.Image>): ReactElement => {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\n 'aspect-square size-full outline-1 -outline-offset-1 outline-black/10',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarFallback = ({\n className,\n ...props\n}: ComponentProps<typeof AvatarPrimitive.Fallback>): ReactElement => {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarBadge = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n 'bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none',\n 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',\n 'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2',\n 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarGroup = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n '*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarGroupCount = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n 'bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3',\n className\n )}\n {...props}\n />\n );\n};\n\nexport {\n Avatar,\n AvatarImage,\n AvatarFallback,\n AvatarBadge,\n AvatarGroup,\n AvatarGroupCount,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useState } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { motion, useReducedMotion } from 'motion/react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Alert01Icon,\n AlertCircleIcon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\n\nimport { cn } from '../../../lib/utils';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\nconst alertVariants = cva(\n 'flex gap-3 rounded-xl border px-3.5 py-3 text-sm transition-[color,background-color,border-color] duration-150 motion-reduce:transition-none',\n {\n defaultVariants: {\n variant: 'neutral',\n },\n variants: {\n variant: {\n danger:\n 'bg-[var(--danger-light)] text-[var(--text-danger)] border-[var(--border-danger)]/30',\n info: 'bg-[var(--brand-light)] text-[var(--text-link)] border-[var(--border-selected)]/30',\n neutral:\n 'bg-secondary text-secondary-foreground border-[var(--border-default)]',\n success:\n 'bg-[var(--success-light)] text-[var(--text-success)] border-[var(--border-success)]/30',\n warning:\n 'bg-[var(--warning-light)] text-[var(--text-warning)] border-[var(--border-warning)]/30',\n },\n },\n }\n);\n\n/** Maps each semantic variant to its Hugeicons icon. */\nconst variantIcons = {\n danger: AlertCircleIcon,\n info: InformationCircleIcon,\n neutral: InformationCircleIcon,\n success: CheckmarkCircle02Icon,\n warning: Alert01Icon,\n} as const;\n\n/** Semantic variant names for the inline Alert component. */\ntype AlertVariant = 'neutral' | 'info' | 'success' | 'warning' | 'danger';\n\n/** Props accepted by the Alert component. */\ntype AlertProps = ComponentProps<'div'> &\n VariantProps<typeof alertVariants> & {\n /** Body content of the alert. */\n children: ReactNode;\n /**\n * When true, a dismiss button is shown. The alert removes itself from the\n * DOM on dismissal (controlled via local state).\n */\n dismissible?: boolean;\n /** Called after the user dismisses the alert. */\n onDismiss?: () => void;\n /** Optional short heading rendered above the body. */\n title?: string;\n };\n\n/**\n * An inline semantic callout for contextual feedback.\n *\n * Variants mirror the Badge semantic system: `neutral` (default) | `info` |\n * `success` | `warning` | `danger`. Each variant carries a matching background\n * tint, border, and leading icon drawn from the design-token set.\n *\n * - `danger` and `warning` use `role=\"alert\"` (assertive); others use\n * `role=\"status\"` (polite) to avoid interrupting screen-reader flow.\n * - Use `dismissible` + `onDismiss` for user-closeable callouts.\n *\n * @example\n * <Alert variant=\"warning\" title=\"Quota almost reached\">\n * You have used 90% of your monthly API calls.\n * </Alert>\n */\nconst Alert = ({\n variant = 'neutral',\n title,\n children,\n dismissible = false,\n onDismiss,\n className,\n ...props\n}: AlertProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n const shouldReduceMotion = useReducedMotion();\n\n if (dismissed) return null;\n\n const Icon = variantIcons[variant as AlertVariant];\n\n // danger and warning need assertive role so screen readers announce immediately\n const role =\n variant === 'danger' || variant === 'warning' ? 'alert' : 'status';\n\n return (\n <div\n role={role}\n data-slot=\"alert\"\n data-variant={variant}\n className={cn(alertVariants({ variant }), className)}\n {...props}\n >\n {/* Leading icon — shrinks to a fixed size to stay aligned with the first line of text */}\n <span className=\"shrink-0 mt-0.5 opacity-80\">\n <HugeiconsIcon icon={Icon} size={16} />\n </span>\n\n <div className=\"flex-1 min-w-0\">\n {title && (\n <p className=\"font-medium leading-snug mb-0.5 text-pretty\">{title}</p>\n )}\n <div className=\"leading-relaxed text-pretty\">{children}</div>\n </div>\n\n {dismissible && (\n <motion.button\n type=\"button\"\n aria-label=\"Dismiss\"\n whileTap={shouldReduceMotion ? undefined : { scale: 0.96 }}\n transition={spring}\n onClick={() => {\n setDismissed(true);\n onDismiss?.();\n }}\n className=\"relative before:absolute before:-inset-[13px] before:content-[''] shrink-0 mt-0.5 rounded-sm p-0.5 opacity-60 hover:opacity-100 transition-[opacity] duration-150 ease-out motion-reduce:transition-none touch-manipulation cursor-pointer\"\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </motion.button>\n )}\n </div>\n );\n};\n\nexport { Alert };\nexport type { AlertProps, AlertVariant };\n","import { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-[5px] border border-transparent px-1.5 py-0.5 text-xs font-medium tabular-nums w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 [&>svg]:[stroke-width:2.5] gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow,background-color] duration-150 motion-reduce:transition-none overflow-hidden',\n {\n defaultVariants: {\n variant: 'neutral',\n },\n variants: {\n variant: {\n brand:\n 'bg-[var(--brand-light)] text-[var(--brand-accented)] dark:text-[oklch(0.650_0.085_256)] border-[var(--brand-default)]/20 dark:border-[oklch(0.450_0.070_256)]/30 [a&]:hover:bg-[var(--brand-light)]/80',\n danger:\n 'bg-[var(--danger-light)] text-[var(--text-danger)] border-[var(--border-danger)]/20 [a&]:hover:bg-[var(--danger-light)]/80',\n dashed:\n 'border-dashed border-[var(--border-default)] text-muted-foreground bg-transparent',\n 'dashed-brand':\n 'border-dashed border-[var(--brand-default)] text-[var(--brand-accented)] bg-transparent',\n default: 'bg-primary text-primary-foreground [a&]:hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n 'gradient-brand':\n 'bg-gradient-to-r from-[var(--brand-default)] to-[var(--process-default)] text-white border-transparent',\n 'gradient-premium':\n 'bg-gradient-to-r from-amber-500 to-orange-400 text-white border-transparent',\n inactive:\n 'bg-[var(--inactive-light)] text-muted-foreground border-[var(--border-inactive)]/40 [a&]:hover:bg-[var(--inactive-light)]/80',\n link: 'text-primary underline-offset-4 hover:underline [a&]:hover:underline',\n neutral:\n 'bg-secondary text-secondary-foreground border-border [a&]:hover:bg-secondary/90',\n outline:\n 'border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n process:\n 'bg-[var(--process-light)] text-[var(--text-process)] border-[var(--border-process)]/20 [a&]:hover:bg-[var(--process-light)]/80',\n secondary:\n 'bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',\n success:\n 'bg-[var(--success-light)] text-[var(--text-success)] border-[var(--border-success)]/20 [a&]:hover:bg-[var(--success-light)]/80',\n warning:\n 'bg-[var(--warning-light)] text-[var(--text-warning)] border-[var(--border-warning)]/20 [a&]:hover:bg-[var(--warning-light)]/80',\n },\n },\n }\n);\n\n/**\n * A small status/label badge.\n *\n * Semantic variants (preferred): `neutral` (grey — the default), `brand`, `success`,\n * `warning`, `danger`, `process`, `inactive`. Pick the variant by meaning.\n *\n * The shadcn-style variants (`default`, `secondary`, `outline`, `ghost`, `link`,\n * `destructive`, `dashed`, `dashed-brand`, `gradient-brand`, `gradient-premium`) are\n * kept as deprecated aliases for backwards compatibility — prefer the semantic ones.\n */\nconst Badge = ({\n className,\n variant = 'neutral',\n asChild = false,\n ...props\n}: ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }): ReactElement => {\n const Comp = asChild ? Slot : 'span';\n\n return (\n <Comp\n data-slot=\"badge\"\n data-variant={variant}\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n};\n\nexport { Badge, badgeVariants };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport {\n ArrowRight01Icon,\n MoreHorizontalIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\n/**\n * Root nav wrapper for a breadcrumb trail.\n * Renders a semantic `<nav>` with `aria-label=\"breadcrumb\"` so assistive\n * technologies identify it as the site breadcrumb landmark.\n */\nconst Breadcrumb = ({\n className,\n ...props\n}: ComponentProps<'nav'>): ReactElement => (\n <nav\n data-slot=\"breadcrumb\"\n aria-label=\"breadcrumb\"\n className={cn('', className)}\n {...props}\n />\n);\n\n/**\n * Ordered list that holds `BreadcrumbItem` children.\n * Flex-wraps so long trails reflow gracefully on narrow viewports.\n */\nconst BreadcrumbList = ({\n className,\n ...props\n}: ComponentProps<'ol'>): ReactElement => (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n 'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',\n className\n )}\n {...props}\n />\n);\n\n/**\n * A single step in the breadcrumb trail.\n * Renders as an `<li>` with inline-flex layout so icon separators stay\n * vertically centered next to link text.\n */\nconst BreadcrumbItem = ({\n className,\n ...props\n}: ComponentProps<'li'>): ReactElement => (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn('inline-flex items-center gap-1.5', className)}\n {...props}\n />\n);\n\ntype BreadcrumbLinkProps = ComponentProps<'a'> & {\n /**\n * When true, the component merges its props onto its direct child element\n * rather than rendering an `<a>` tag itself.\n * Use this to pass a framework router `<Link>` component (e.g. Next.js, React Router).\n */\n asChild?: boolean;\n};\n\n/**\n * A navigable breadcrumb step.\n *\n * Supports `asChild` (Radix Slot) so consumers can swap in a router `<Link>`:\n * ```tsx\n * <BreadcrumbLink asChild>\n * <Link href='/settings'>Settings</Link>\n * </BreadcrumbLink>\n * ```\n *\n * Inherits `text-muted-foreground` from `BreadcrumbList` and upgrades to\n * `text-foreground` on hover with an `ease-out` transition.\n */\nconst BreadcrumbLink = ({\n asChild = false,\n className,\n children,\n ...props\n}: BreadcrumbLinkProps): ReactElement => {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"breadcrumb-link\"\n className={cn(\n 'transition-colors duration-150 ease-out hover:text-foreground motion-reduce:transition-none',\n className\n )}\n {...props}\n >\n {children}\n </Comp>\n );\n};\n\n/**\n * The current page indicator — the last (non-navigable) step in the trail.\n *\n * Renders as a `<span>` with `aria-current=\"page\"` so screen readers announce\n * it as the current location. Not styled as a link; uses `text-foreground` to\n * visually distinguish it from the ancestor links.\n */\nconst BreadcrumbPage = ({\n className,\n children,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n className={cn('font-normal text-foreground', className)}\n {...props}\n >\n {children}\n </span>\n);\n\ntype BreadcrumbSeparatorProps = ComponentProps<'li'> & {\n /**\n * Custom separator content.\n * Defaults to a `ChevronRight` (`ArrowRight01`) Hugeicon when omitted.\n */\n children?: ReactNode;\n};\n\n/**\n * Visual divider between breadcrumb steps.\n *\n * Hidden from assistive technologies via `aria-hidden`.\n * Accepts custom `children` to replace the default chevron with any icon or character.\n */\nconst BreadcrumbSeparator = ({\n className,\n children,\n ...props\n}: BreadcrumbSeparatorProps): ReactElement => (\n <li\n data-slot=\"breadcrumb-separator\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? (\n <HugeiconsIcon\n icon={ArrowRight01Icon}\n size={14}\n className=\"text-muted-foreground/60\"\n aria-hidden=\"true\"\n />\n )}\n </li>\n);\n\n/**\n * Collapsed-steps indicator for long breadcrumb trails.\n *\n * Renders a `MoreHorizontal` icon with a screen-reader-only \"More\" label.\n * Hidden from the accessibility tree via `aria-hidden` — the surrounding\n * visible crumbs provide sufficient context.\n */\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n aria-hidden=\"true\"\n className={cn('flex size-6 items-center justify-center', className)}\n {...props}\n >\n <HugeiconsIcon icon={MoreHorizontalIcon} size={14} aria-hidden=\"true\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\n\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n};\nexport type { BreadcrumbLinkProps, BreadcrumbSeparatorProps };\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { type TrayPreference } from '../tray/resolveTrayLayout';\nimport { renderTrayLayout } from '../tray/renderTrayLayout';\n\nconst Card = ({\n className,\n interactive = false,\n selected = false,\n tray = 'none',\n children,\n ...props\n}: ComponentProps<'div'> & {\n /** Hover-elevation + press feedback for clickable cards. */\n interactive?: boolean;\n /** Brand ring for the selected state (e.g. a chosen plan). */\n selected?: boolean;\n /**\n * Tray treatment. `none` (default) = flat card. `auto` = footer-priority\n * convention (footer → footer tray, else header tray). Or force `header`/`footer`.\n */\n tray?: TrayPreference;\n}): ReactElement => {\n const { edge, shellClassName, content } = renderTrayLayout({\n children,\n isFooter: (el) => el.type === CardFooter,\n isHeader: (el) => el.type === CardHeader,\n tray,\n });\n return (\n <div\n data-slot=\"card\"\n data-selected={selected || undefined}\n data-tray={edge}\n className={cn(\n 'text-card-foreground flex flex-col rounded-[16px] border-0 shadow-[var(--shadow-card)] overflow-hidden',\n shellClassName,\n interactive &&\n 'cursor-pointer transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none hover:shadow-[var(--shadow-elevated)] active:scale-[0.99]',\n selected && 'shadow-[0_0_0_2px_var(--action),var(--shadow-card)]',\n className\n )}\n {...props}\n >\n {content}\n </div>\n );\n};\n\nconst CardHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-header\"\n className={cn(\n '@container/card-header relative flex flex-col gap-0.5 px-4 py-3.5 bg-card border-b border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n);\n\nconst CardTitle = ({\n className,\n children,\n ...props\n}: ComponentProps<'h3'>): ReactElement => (\n <h3\n data-slot=\"card-title\"\n className={cn(\n 'text-base leading-none font-semibold text-balance',\n className\n )}\n {...props}\n >\n {children}\n </h3>\n);\n\nconst CardDescription = ({\n className,\n ...props\n}: ComponentProps<'p'>): ReactElement => (\n <p\n data-slot=\"card-description\"\n className={cn('text-muted-foreground text-sm text-pretty', className)}\n {...props}\n />\n);\n\nconst CardAction = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-action\"\n className={cn('absolute top-3.5 right-4', className)}\n {...props}\n />\n);\n\nconst CardContent = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-content\"\n className={cn('flex-1 px-4 py-3 bg-card', className)}\n {...props}\n />\n);\n\nconst CardFooter = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-footer\"\n className={cn(\n 'mt-auto flex items-center justify-end gap-2 px-4 py-3.5 border-t border-[var(--border-divider)] bg-muted',\n className\n )}\n {...props}\n />\n);\n\nexport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n};\n","import { type ReactElement, type SVGProps } from 'react';\n\nconst CheckIcon = ({\n size = 14,\n strokeWidth = 3,\n className,\n ...props\n}: {\n // Pass null to let the parent's CSS size the icon instead of an inline size.\n size?: number | null;\n strokeWidth?: number;\n} & Omit<SVGProps<SVGSVGElement>, 'strokeWidth'>): ReactElement => (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={size === null ? undefined : { height: size, width: size }}\n className={className}\n {...props}\n >\n <path d=\"M4 12L9 17L20 6\" pathLength={1} strokeWidth={strokeWidth} />\n </svg>\n);\n\nexport { CheckIcon };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\n\nimport { cn } from '../../../lib/utils';\n\nconst Checkbox = ({\n className,\n ...props\n}: ComponentProps<typeof CheckboxPrimitive.Root>): ReactElement => {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"group peer dark:bg-input/30 data-[state=checked]:bg-[var(--action)] data-[state=checked]:text-white dark:data-[state=checked]:bg-[var(--action)] data-[state=indeterminate]:bg-[var(--action)] data-[state=indeterminate]:text-white relative size-4 shrink-0 touch-manipulation rounded-[4px] border-0 shadow-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] hover:data-[state=unchecked]:shadow-[var(--shadow-control-hover)] dark:hover:data-[state=unchecked]:shadow-[var(--shadow-control-hover)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] data-[state=indeterminate]:shadow-[var(--shadow-control-checked)] dark:data-[state=indeterminate]:shadow-[var(--shadow-control-checked)] transition-[color,box-shadow,background-color] duration-200 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer after:absolute after:-inset-[14px] after:content-['']\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"relative grid place-content-center text-current size-full\"\n forceMount\n >\n {/* Minus for indeterminate */}\n <svg\n className=\"size-3.5 absolute inset-0 m-auto transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none opacity-0 scale-[0.25] blur-[4px] group-data-[state=indeterminate]:opacity-100 group-data-[state=indeterminate]:scale-100 group-data-[state=indeterminate]:blur-none\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M5 12L19 12\" pathLength={1} strokeWidth={3} />\n </svg>\n {/* Checkmark for checked */}\n <svg\n className=\"size-3.5 absolute inset-0 m-auto transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none opacity-0 scale-[0.25] blur-[4px] group-data-[state=checked]:opacity-100 group-data-[state=checked]:scale-100 group-data-[state=checked]:blur-none\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M4 12L9 17L20 6\" pathLength={1} strokeWidth={3} />\n </svg>\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n};\n\nexport { Checkbox };\n","'use client';\n\nimport {\n type ComponentProps,\n type FC,\n type ReactElement,\n type ReactNode,\n isValidElement,\n} from 'react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\n\nimport { cn } from '../../../lib/utils';\n\nconst Collapsible = ({\n ...props\n}: ComponentProps<typeof CollapsiblePrimitive.Root>): ReactElement => (\n <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n);\n\n/*\n * `active:scale-100` cancels the press-scale a Button brings when used as the trigger via\n * `asChild`. Button's `active:scale-[0.96]` is good feedback on a button-shaped control, but\n * a disclosure row is typically `w-full`, so scaling shrinks the whole header — the text\n * visibly jumps inward on every click. Height is already animating; scale on top reads as\n * the section flinching.\n */\nconst PRESS_SCALE_CANCEL_CLASS_NAME = 'active:scale-100';\n\nconst PRESS_SCALE_CLASS_NAME_PATTERN = /(^|[\\s:])active:scale-/;\n\n/*\n * A caller that asks for a press-scale — on the trigger or on its `asChild` child — gets it.\n * Emitting the cancel alongside it would leave the winner to stylesheet order for a plain\n * element child, since Radix's Slot concatenates a child's className instead of running it\n * through twMerge.\n */\nconst hasPressScale = (className: string | undefined): boolean =>\n className !== undefined && PRESS_SCALE_CLASS_NAME_PATTERN.test(className);\n\nconst hasChildPressScale = (children: ReactNode): boolean => {\n if (!isValidElement<{ className?: string }>(children)) {\n return false;\n }\n\n return hasPressScale(children.props.className);\n};\n\nexport type CollapsibleTriggerProps = ComponentProps<\n typeof CollapsiblePrimitive.CollapsibleTrigger\n>;\n\n/**\n * The clickable header that opens and closes a `Collapsible`.\n *\n * Pass `asChild` to render your own element. The trigger suppresses the press-scale a\n * `Button` child would otherwise bring, unless an `active:scale-*` is set explicitly on the\n * trigger or on that child.\n */\nconst CollapsibleTrigger: FC<CollapsibleTriggerProps> = ({\n className,\n children,\n ...props\n}) => {\n const keepsCallerPressScale =\n hasPressScale(className) || hasChildPressScale(children);\n\n let pressScaleClassName = PRESS_SCALE_CANCEL_CLASS_NAME;\n if (keepsCallerPressScale) {\n pressScaleClassName = '';\n }\n\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-trigger\"\n className={cn('touch-manipulation', pressScaleClassName, className)}\n {...props}\n >\n {children}\n </CollapsiblePrimitive.CollapsibleTrigger>\n );\n};\n\nconst CollapsibleContent = ({\n className,\n ...props\n}: ComponentProps<\n typeof CollapsiblePrimitive.CollapsibleContent\n>): ReactElement => (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n className={cn(\n 'overflow-hidden',\n 'data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up',\n 'motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n);\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport {\n Close,\n Content,\n Description,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n} from '@radix-ui/react-dialog';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Cancel01Icon } from '@hugeicons/core-free-icons';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button';\nimport { type TrayPreference } from '../tray/resolveTrayLayout';\nimport { renderTrayLayout } from '../tray/renderTrayLayout';\n\n/**\n * Modal dialog (popup) overlaying the page.\n *\n * Compose with `DialogTrigger`, `DialogContent`, `DialogHeader`, `DialogTitle`,\n * `DialogDescription`, `DialogBody`, `DialogFooter`, and `DialogClose`.\n */\nconst Dialog = Root;\nconst DialogTrigger = Trigger;\nconst DialogPortal = Portal;\nconst DialogClose = Close;\n\nconst DialogOverlay = ({\n className,\n ...props\n}: ComponentProps<typeof Overlay>): ReactElement => (\n <Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n);\n\nconst DialogContent = ({\n className,\n children,\n tray = 'auto',\n ...props\n}: ComponentProps<typeof Content> & {\n /** Tray edge. `auto` = footer-priority convention; override with `header`/`footer`/`none`. */\n tray?: TrayPreference;\n}): ReactElement => {\n const { edge, shellClassName, content } = renderTrayLayout({\n children,\n isFooter: (el) => el.type === DialogFooter,\n isHeader: (el) => el.type === DialogHeader,\n tray,\n });\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <Content\n data-slot=\"dialog-content\"\n data-tray={edge}\n className={cn(\n 'overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-[var(--shadow-elevated)] duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in outline-none sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none',\n shellClassName,\n className\n )}\n {...props}\n >\n {content}\n </Content>\n </DialogPortal>\n );\n};\n\n/**\n * The close button is pinned to the top-right corner, matching Sheet's `top-3 right-3`.\n * A fixed inset keeps it in the corner whatever the header's height, so a title plus a\n * wrapping description cannot push it down over the text.\n *\n * top-3 (12px) puts the 28px button's centre at 26px; the 17px leading-none title starts\n * after the header's 16px padding, so its centre is 24.5px. 1.5px low is imperceptible and\n * consistency with Sheet is worth more than the half-pixel.\n */\nconst CLOSE_BUTTON_CLASS_NAME =\n 'absolute top-3 right-3 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground opacity-70 transition-[opacity,background-color] duration-150 ease-out motion-reduce:transition-none hover:opacity-100 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus:outline-hidden cursor-pointer touch-manipulation before:absolute before:-inset-[8px] before:content-[\"\"]';\n\nconst DialogHeader = ({\n className,\n showCloseButton = true,\n children,\n ...props\n}: ComponentProps<'div'> & { showCloseButton?: boolean }): ReactElement => (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n // px 16 / py 16 — symmetric, per the Dialog tuner spec.\n 'relative flex flex-col gap-0.5 px-4 py-4 border-b border-[var(--border-hairline)] bg-card sm:text-left',\n // Reserve the close button's column so a long title or description wraps before it\n // rather than running underneath — the button is 28px wide at a 12px inset, so 48px\n // clears it with breathing room. twMerge lets this win over the px-4 above.\n showCloseButton && 'pr-12',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <Close\n data-slot=\"dialog-close\"\n className={CLOSE_BUTTON_CLASS_NAME}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n <span className=\"sr-only\">Close</span>\n </Close>\n )}\n </div>\n);\n\nconst DialogBody = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"dialog-body\"\n className={cn('px-4 py-[18px] bg-card', className)}\n {...props}\n />\n);\n\nconst DialogFooter = ({\n className,\n showCloseButton = false,\n children,\n ...props\n}: ComponentProps<'div'> & { showCloseButton?: boolean }): ReactElement => (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end px-3 py-3.5 border-t border-[var(--border-divider)] bg-muted',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <Close asChild>\n <Button variant=\"outline\">Close</Button>\n </Close>\n )}\n </div>\n);\n\nconst DialogTitle = ({\n className,\n ...props\n}: ComponentProps<typeof Title>): ReactElement => (\n <Title\n data-slot=\"dialog-title\"\n className={cn(\n 'text-[17px] leading-none font-semibold text-balance',\n className\n )}\n {...props}\n />\n);\n\nconst DialogDescription = ({\n className,\n ...props\n}: ComponentProps<typeof Description>): ReactElement => (\n <Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm text-pretty', className)}\n {...props}\n />\n);\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../dialog';\n\nconst Command = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive>): ReactElement => (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n);\n\nconst CommandDialog = ({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n ...props\n}: ComponentProps<typeof Dialog> & {\n className?: string;\n description?: string;\n title?: string;\n}): ReactElement => (\n <Dialog {...props}>\n <DialogContent className={cn('overflow-hidden p-0', className)}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n);\n\nconst CommandInput = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Input>): ReactElement => (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <HugeiconsIcon\n icon={Search01Icon}\n size={16}\n className=\"shrink-0 text-muted-foreground/70\"\n />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n);\n\nconst CommandList = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.List>): ReactElement => (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto p-1',\n className\n )}\n {...props}\n />\n);\n\nconst CommandEmpty = ({\n ...props\n}: ComponentProps<typeof CommandPrimitive.Empty>): ReactElement => (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n);\n\nconst CommandGroup = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Group>): ReactElement => (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n);\n\nconst CommandSeparator = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Separator>): ReactElement => (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n);\n\nconst CommandItem = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Item>): ReactElement => (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n);\n\nconst CommandShortcut = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n);\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '../../../lib/utils';\n\nconst Popover = ({\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Root>): ReactElement => (\n <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n);\n\nconst PopoverTrigger = ({\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Trigger>): ReactElement => (\n <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n);\n\nconst PopoverContent = ({\n className,\n align = 'center',\n sideOffset = 8,\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Content>): ReactElement => {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-xl border-0 p-4 shadow-[var(--shadow-elevated)] outline-hidden will-change-[opacity,transform] motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n};\n\nconst PopoverAnchor = ({\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Anchor>): ReactElement => (\n <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n);\n\nconst PopoverHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn('flex flex-col gap-1 text-sm', className)}\n {...props}\n />\n );\n};\n\nconst PopoverTitle = ({\n className,\n children,\n ...props\n}: ComponentProps<'h2'>): ReactElement => {\n return (\n <h2\n data-slot=\"popover-title\"\n className={cn('font-medium text-balance', className)}\n {...props}\n >\n {children}\n </h2>\n );\n};\n\nconst PopoverDescription = ({\n className,\n ...props\n}: ComponentProps<'p'>): ReactElement => {\n return (\n <p\n data-slot=\"popover-description\"\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n );\n};\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverHeader,\n PopoverTitle,\n PopoverDescription,\n};\n","'use client';\n\nimport { type ReactElement, useState } from 'react';\nimport { ArrowDown01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\nimport { CheckIcon } from '../check-icon';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n} from '../command';\nimport { Popover, PopoverContent, PopoverTrigger } from '../popover';\n\n/** A single selectable option rendered inside the Combobox dropdown. */\ntype ComboboxOption = {\n /** The human-readable label shown in the trigger and list. */\n label: string;\n /** The machine-readable value passed to `onValueChange`. */\n value: string;\n};\n\n/** Props for the controlled `Combobox` component. */\ntype ComboboxProps = {\n /** Additional class names forwarded to the trigger button. */\n className?: string;\n /** When true the trigger is rendered in a disabled state and the popover cannot open. */\n disabled?: boolean;\n /** Text shown when the search query matches no options. Defaults to \"No results.\" */\n emptyText?: string;\n /** Called with the newly selected option's value when the user picks an item. */\n onValueChange: (value: string) => void;\n /** The list of options to search and select from. */\n options: ComboboxOption[];\n /** Text shown in the trigger when no option is selected. Defaults to \"Select…\". */\n placeholder?: string;\n /** Placeholder text shown inside the search input. Defaults to \"Search…\". */\n searchPlaceholder?: string;\n /** The currently selected value. Pass `undefined` to show the placeholder. */\n value?: string;\n};\n\n/**\n * Searchable single-select Combobox.\n *\n * Composes `Popover`, `Button`, and `Command` from the droplet design system.\n * The trigger is a full-width `outline` Button with a rotating chevron that\n * signals open/closed state. Selecting an item closes the popover, fires\n * `onValueChange`, and shows a check mark next to the active selection.\n *\n * @example\n * ```tsx\n * const [chain, setChain] = useState('');\n * <Combobox\n * options={[{ value: 'eth', label: 'Ethereum' }, { value: 'sol', label: 'Solana' }]}\n * value={chain}\n * onValueChange={setChain}\n * placeholder=\"Select a chain\"\n * />\n * ```\n */\nconst Combobox = ({\n options,\n value,\n onValueChange,\n placeholder = 'Select…',\n searchPlaceholder = 'Search…',\n emptyText = 'No results.',\n className,\n disabled = false,\n}: ComboboxProps): ReactElement => {\n const [open, setOpen] = useState(false);\n\n const selectedLabel = options.find((opt) => opt.value === value)?.label;\n\n // eslint-disable-next-line custom-rules/require-single-object-param -- internal cmdk onSelect handler; receives a single string value, not a named-args object\n const handleSelect = (selectedValue: string) => {\n onValueChange(selectedValue);\n setOpen(false);\n };\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n {/*\n * Styled to be visually identical to SelectTrigger (a field, not a\n * button) so Combobox and Select read as the same kind of control.\n * `aria-haspopup=\"listbox\"` signals it opens a searchable list.\n */}\n <button\n type=\"button\"\n data-slot=\"combobox-trigger\"\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n disabled={disabled}\n className={cn(\n 'flex h-8 w-full touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-background px-3 text-[13px] whitespace-nowrap dark:bg-input/30',\n 'shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)]',\n 'transition-[color,box-shadow] duration-100 ease-out motion-reduce:transition-none',\n 'outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo)]',\n 'cursor-pointer disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n >\n <span\n className={cn(\n 'truncate',\n !selectedLabel && 'text-muted-foreground/60'\n )}\n >\n {selectedLabel ?? placeholder}\n </span>\n {/* Chevron rotates 180° on open — matches SelectTrigger exactly. */}\n <HugeiconsIcon\n icon={ArrowDown01Icon}\n size={16}\n className={cn(\n 'shrink-0 opacity-50 transition-transform duration-150 ease-out motion-reduce:transition-none',\n open && 'rotate-180'\n )}\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n align=\"start\"\n sideOffset={4}\n >\n <Command className=\"rounded-[inherit]\">\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyText}</CommandEmpty>\n {options.map((opt) => (\n <CommandItem\n key={opt.value}\n value={opt.value}\n // cmdk filters on `value` only unless keywords are given, so\n // labels like \"Nigeria\" stay unsearchable when the value is a\n // code like \"NG\".\n keywords={[opt.label]}\n onSelect={handleSelect}\n >\n {/*\n * The check icon occupies a fixed slot so all labels stay\n * horizontally aligned regardless of selection state.\n */}\n <CheckIcon\n className={cn(\n 'shrink-0',\n value === opt.value ? 'opacity-100' : 'opacity-0'\n )}\n />\n {opt.label}\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n};\n\nexport { Combobox };\nexport type { ComboboxOption, ComboboxProps };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef, HTMLAttributes, ReactElement } from 'react';\nimport { forwardRef } from 'react';\nimport {\n CheckboxItem,\n Content,\n Group,\n Item,\n ItemIndicator,\n Label,\n Portal,\n RadioGroup,\n RadioItem,\n Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n Trigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '../../../lib/utils';\n\nconst DropdownMenu = Root;\n\nconst DropdownMenuTrigger = Trigger;\n\nconst DropdownMenuGroup = Group;\n\nconst DropdownMenuSub = Sub;\n\nconst DropdownMenuContent = forwardRef<\n ComponentRef<typeof Content>,\n ComponentPropsWithoutRef<typeof Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <Portal>\n <Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-[var(--shadow-elevated)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n </Portal>\n));\nDropdownMenuContent.displayName = Content.displayName;\n\nconst DropdownMenuItem = forwardRef<\n ComponentRef<typeof Item>,\n ComponentPropsWithoutRef<typeof Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = Item.displayName;\n\nconst DropdownMenuCheckboxItem = forwardRef<\n ComponentRef<typeof CheckboxItem>,\n ComponentPropsWithoutRef<typeof CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ItemIndicator>\n <CheckIcon className=\"size-3.5\" />\n </ItemIndicator>\n </span>\n {children}\n </CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = RadioGroup;\n\nconst DropdownMenuRadioItem = forwardRef<\n ComponentRef<typeof RadioItem>,\n ComponentPropsWithoutRef<typeof RadioItem>\n>(({ className, children, ...props }, ref) => (\n <RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </ItemIndicator>\n </span>\n {children}\n </RadioItem>\n));\nDropdownMenuRadioItem.displayName = RadioItem.displayName;\n\nconst DropdownMenuLabel = forwardRef<\n ComponentRef<typeof Label>,\n ComponentPropsWithoutRef<typeof Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <Label\n ref={ref}\n data-slot=\"dropdown-menu-label\"\n className={cn(\n 'px-2 py-1.5 text-sm font-medium',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = Label.displayName;\n\nconst DropdownMenuSeparator = forwardRef<\n ComponentRef<typeof Separator>,\n ComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n <Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>): ReactElement => (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground',\n className\n )}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nconst DropdownMenuSubTrigger = forwardRef<\n ComponentRef<typeof SubTrigger>,\n ComponentPropsWithoutRef<typeof SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = SubTrigger.displayName;\n\nconst DropdownMenuSubContent = forwardRef<\n ComponentRef<typeof SubContent>,\n ComponentPropsWithoutRef<typeof SubContent>\n>(({ className, ...props }, ref) => (\n <SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst wellVariants = cva('rounded-xl flex flex-col', {\n defaultVariants: {\n gap: 'sm',\n spacing: 'default',\n variant: 'inset',\n },\n variants: {\n gap: {\n default: 'gap-4',\n lg: 'gap-5',\n none: '',\n // sm is the Well's canonical row rhythm — tokenized so pages can tune\n // it without `> * + *` margin overrides.\n sm: 'gap-[var(--well-row-gap,12px)]',\n },\n spacing: {\n default: 'p-4',\n lg: 'p-5',\n none: 'p-0',\n sm: 'p-3',\n },\n variant: {\n default: 'bg-muted/50',\n inset: 'bg-muted/50 border border-border',\n outline: 'border border-border',\n },\n },\n});\n\nconst Well = ({\n className,\n gap,\n spacing,\n variant,\n ...props\n}: ComponentProps<'div'> & VariantProps<typeof wellVariants>): ReactElement => (\n <div\n data-slot=\"well\"\n data-spacing={spacing ?? 'default'}\n className={cn(wellVariants({ gap, spacing, variant }), className)}\n {...props}\n />\n);\n\nconst WellReveal = ({\n children,\n className,\n open,\n}: {\n children: ReactNode;\n className?: string;\n open: boolean;\n}): ReactElement => (\n <div\n data-slot=\"well-reveal\"\n className=\"grid transition-[grid-template-rows] duration-[220ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none\"\n style={{ gridTemplateRows: open ? '1fr' : '0fr' }}\n aria-hidden={!open}\n // inert removes the content from the accessibility tree and tab order when collapsed\n inert={!open}\n >\n <div className=\"overflow-hidden\">\n <div\n className={cn(\n 'px-0.5 pb-0.5 [&>[data-slot=well]:not([data-spacing=none])]:p-[22px]',\n // Only direct Card reveals share its 16px corners and 2px inset.\n // Standalone or separately padded reveals keep the normal Well radius.\n '[[data-slot=card]>[data-slot=well-reveal]>div>&>[data-slot=well]]:rounded-2xl',\n className\n )}\n >\n {children}\n </div>\n </div>\n </div>\n);\n\nexport { Well, WellReveal, wellVariants };\n","'use client';\n\nimport { Children, Fragment, type ReactElement, type ReactNode, isValidElement } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\nimport { Card } from '../card';\nimport { WellReveal } from '../well';\n\n// The vertical gap (px) that opens at a seam when an item detaches. Kept here so\n// consumers never reproduce the spring/gap math the pattern used to require.\nconst DETACH_GAP_PX = 12;\n\n/**\n * One row of a {@link FlushCardStack}. Purely declarative — the parent stack\n * reads these props to compute every item's fuse/detach geometry and renders the\n * card, so an `Item` used outside a `FlushCardStack` renders nothing.\n */\nexport type FlushCardStackItemProps = {\n /** Optional reveal content (e.g. a `Well`). An item with none never detaches. */\n children?: ReactNode;\n /** Extra classes merged onto this item's card. */\n className?: string;\n /** Always-visible row content (e.g. a `ToggleRow`). */\n header: ReactNode;\n /**\n * Drives BOTH the inline reveal and the detach. When `true` and the item has\n * reveal content (`children`), the item floats free of its neighbours with a\n * spring gap; otherwise the toggle state has no effect on the layout.\n */\n open?: boolean;\n};\n\n/**\n * Declarative item marker for {@link FlushCardStack}. Renders nothing on its own;\n * the stack consumes its props.\n */\nconst FlushCardStackItem = (_props: FlushCardStackItemProps): null => null;\n\n/**\n * Props for {@link FlushCardStack}.\n */\nexport type FlushCardStackProps = {\n /** `FlushCardStack.Item` children. */\n children: ReactNode;\n /** Extra classes merged onto the stack wrapper. */\n className?: string;\n};\n\nconst isStackItem = (\n child: ReactNode\n): child is ReactElement<FlushCardStackItemProps> =>\n isValidElement(child) && child.type === FlushCardStackItem;\n\nconst hasReveal = (item: ReactElement<FlushCardStackItemProps>): boolean =>\n Boolean(item.props.children);\n\n// An item detaches (floats) only when it has reveal content AND is open. This is\n// the single rule that drives every seam: toggle state alone is never enough.\nconst detaches = (item: ReactElement<FlushCardStackItemProps>): boolean =>\n hasReveal(item) && Boolean(item.props.open);\n\n/**\n * A vertical stack of settings cards that fuse into one block by default and\n * detach with a spring gap when an item's reveal is opened.\n *\n * Composed from {@link Card} + {@link WellReveal} (+ `motion`); it encapsulates\n * the `-mt-px` / `rounded-[16px]` / gap math so consumers pass only per-item\n * `open` + content:\n *\n * ```tsx\n * <FlushCardStack>\n * <FlushCardStack.Item open={emailOn} header={<ToggleRow … />}>\n * <Well gap='sm'>{/* checkbox rows *\\/}</Well>\n * </FlushCardStack.Item>\n * <FlushCardStack.Item header={<ToggleRow … />} />\n * </FlushCardStack>\n * ```\n *\n * Rule: a seam (12px spring gap + facing edges rounding to `rounded-[16px]`)\n * opens between two cards when EITHER side is an open reveal item — so an open\n * middle item floats free on both sides, while an open first/last item produces a\n * single inner split. Items with no reveal, or closed reveals, always fuse.\n */\nconst FlushCardStack = ({\n children,\n className,\n}: FlushCardStackProps): ReactElement => {\n const prefersReducedMotion = useReducedMotion();\n const items = Children.toArray(children).filter(isStackItem);\n const lastIndex = items.length - 1;\n\n // Reduced motion snaps the gap open/closed instead of springing it.\n const gapTransition = prefersReducedMotion\n ? { duration: 0 }\n : { bounce: 0, duration: 0.4, type: 'spring' as const };\n\n return (\n <div data-slot=\"flush-card-stack\" className={className}>\n {items.map((item, index) => {\n const prev = items[index - 1];\n const next = items[index + 1];\n const isFirst = index === 0;\n const isLast = index === lastIndex;\n\n // A seam opens between two cards when either side is a floating item.\n const splitAbove = !isFirst && (detaches(item) || detaches(prev));\n const splitBelow = !isLast && (detaches(item) || detaches(next));\n\n const roundTop = isFirst || splitAbove;\n const roundBottom = isLast || splitBelow;\n\n // Render a gap below whenever a seam is *possible* here (either neighbour\n // can reveal), so opening animates the gap growing from 0 to 12px.\n const gapPossible = !isLast && (hasReveal(item) || hasReveal(next));\n\n return (\n <Fragment key={item.key ?? index}>\n <Card\n data-detached={detaches(item) || undefined}\n className={cn(\n 'gap-0 py-0 transition-[border-radius] duration-300',\n // Fused top: square the corner and pull up 1px so the shared\n // shadow ring isn't doubled. Post-seam tops stay rounded.\n !roundTop && 'rounded-t-none -mt-px',\n !roundBottom && 'rounded-b-none',\n item.props.className\n )}\n >\n <div className=\"px-5 py-4\">{item.props.header}</div>\n {hasReveal(item) && (\n <WellReveal open={Boolean(item.props.open)}>\n {item.props.children}\n </WellReveal>\n )}\n </Card>\n {gapPossible && (\n <motion.div\n aria-hidden\n data-slot=\"flush-card-gap\"\n data-open={splitBelow || undefined}\n initial={false}\n animate={{ height: splitBelow ? DETACH_GAP_PX : 0 }}\n transition={gapTransition}\n />\n )}\n </Fragment>\n );\n })}\n </div>\n );\n};\n\nFlushCardStack.Item = FlushCardStackItem;\n\nexport { FlushCardStack };\n","'use client';\n\nimport { type ReactElement, type ReactNode, createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\ninterface IconConfig {\n // undefined = icon's built-in default\n setStrokeWidth: (v: number | undefined) => void;\n strokeWidth: number | undefined;\n}\n\nconst IconConfigContext = createContext<IconConfig>({\n setStrokeWidth: () => {},\n strokeWidth: undefined,\n});\n\nexport const IconConfigProvider = ({\n children,\n}: {\n children: ReactNode;\n}): ReactElement => {\n const [strokeWidth, setStrokeWidth] = useState<number | undefined>(() => {\n if (globalThis.window === undefined) return undefined;\n const stored = localStorage.getItem('icon-stroke-width');\n if (stored === 'default') return undefined;\n const n = Number.parseFloat(stored ?? '');\n return Number.isNaN(n) ? undefined : n;\n });\n\n // Sync to CSS variable so all HugeiconsIcon instances respond (not just <Icon> wrapper)\n useEffect(() => {\n document.documentElement.style.setProperty(\n '--icon-stroke-width',\n String(strokeWidth ?? 1.75)\n );\n }, [strokeWidth]);\n\n const applyStrokeWidth = useCallback((v: number | undefined) => {\n setStrokeWidth(v);\n localStorage.setItem(\n 'icon-stroke-width',\n v === undefined ? 'default' : String(v)\n );\n }, []);\n\n // Memoize the context value so consumers don't re-render on every parent render.\n const value = useMemo(\n () => ({ setStrokeWidth: applyStrokeWidth, strokeWidth }),\n [applyStrokeWidth, strokeWidth]\n );\n\n return (\n <IconConfigContext.Provider value={value}>\n {children}\n </IconConfigContext.Provider>\n );\n};\n\nexport const useIconConfig = (): IconConfig => useContext(IconConfigContext);\n","'use client';\n\nimport type { ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport type { HugeiconsIconProps } from '@hugeicons/react';\n\nimport { useIconConfig } from '../../icon-config';\n\n/** Drop-in replacement for HugeiconsIcon — reads global strokeWidth from IconConfigContext */\nexport const Icon = (props: HugeiconsIconProps): ReactElement => {\n const { strokeWidth } = useIconConfig();\n return <HugeiconsIcon strokeWidth={strokeWidth ?? 1.75} {...props} />;\n};\n","'use client';\n\nimport { Children, type FC, type ReactNode, cloneElement, isValidElement, useId } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Label } from '../label';\n\ntype FieldProps = {\n /** The form control(s) to render inside the field wrapper. */\n children: ReactNode;\n /**\n * Extra class names merged onto the outer grid wrapper. The label, the\n * control(s), the description and the error stay direct children of that\n * wrapper, so column, flex and direct-child utilities apply to each of them.\n */\n className?: string;\n /** Secondary helper text rendered below the control. */\n description?: ReactNode;\n /**\n * Validation error message. When present, renders with `role=\"alert\"` and\n * `text-[var(--text-danger)]`, and injects `aria-invalid` onto a single\n * child element.\n */\n error?: ReactNode;\n /**\n * Override the auto-generated control id. Useful when the consumer already\n * manages a stable id. When omitted, a React-stable id is generated via\n * `useId()` and injected onto the single child element (if applicable).\n */\n htmlFor?: string;\n /** Visible label rendered above the control and linked via `htmlFor`. */\n label?: ReactNode;\n /**\n * When true, appends a red asterisk to the label to signal that the field\n * is required. Does not inject the `required` attribute on the control — set\n * that on the control itself.\n */\n required?: boolean;\n};\n\n/*\n The wider label-to-control spacing is a margin under the label rather than a gap on a\n label/control wrapper: every row stays a direct child of the field wrapper, so the layout\n utilities a caller passes through `className` still reach each of them. Only the label moves\n out — the description and error keep the row gap, since supplemental messages read as\n belonging to the control.\n*/\nconst LABEL_GAP_CLASS_NAME =\n 'mb-[calc(var(--spacing-label-gap)-var(--spacing-field-gap))]';\n\n/**\n * A generic labeled form-field wrapper.\n *\n * Wires a `<Label>`, an arbitrary form control, an optional description, and\n * an error message together with the correct `id`/`htmlFor`/`aria-describedby`\n * associations so callers don't have to hand-assemble these.\n *\n * When there is exactly one child element, `Field` uses `cloneElement` to\n * inject:\n * - `id` — links the label's `htmlFor` to the control\n * - `aria-describedby` — references the description and/or error paragraph ids\n * - `aria-invalid` — `true` when `error` is present\n *\n * @example\n * ```tsx\n * <Field label=\"Email\" description=\"We'll never share your email.\" required>\n * <Input type=\"email\" />\n * </Field>\n *\n * <Field label=\"Email\" error=\"Enter a valid email address.\">\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nconst Field: FC<FieldProps> = ({\n label,\n description,\n error,\n required,\n htmlFor,\n children,\n className,\n}) => {\n const generatedId = useId();\n const controlId = htmlFor ?? generatedId;\n\n const descriptionId = `${controlId}-description`;\n const errorId = `${controlId}-error`;\n\n // Build the aria-describedby value from whichever supplemental ids exist.\n const describedByParts: string[] = [];\n if (description) describedByParts.push(descriptionId);\n if (error) describedByParts.push(errorId);\n const ariaDescribedBy =\n describedByParts.length > 0 ? describedByParts.join(' ') : undefined;\n\n // Inject accessibility props onto the single child element when possible.\n // We only attempt cloneElement when there is exactly one React element child\n // to avoid ambiguous multi-control scenarios.\n const childArray = Children.toArray(children);\n const singleChild =\n childArray.length === 1 && isValidElement(childArray[0])\n ? childArray[0]\n : null;\n\n const enrichedChild = singleChild\n ? cloneElement(singleChild as React.ReactElement<Record<string, unknown>>, {\n 'aria-describedby':\n (singleChild.props as Record<string, unknown>)['aria-describedby'] ??\n ariaDescribedBy,\n id: (singleChild.props as Record<string, unknown>).id ?? controlId,\n // Only set aria-invalid when there is an error; avoids overwriting an\n // explicit aria-invalid={false} the consumer may have set deliberately.\n ...(error ? { 'aria-invalid': true } : {}),\n })\n : null;\n\n return (\n <div className={cn('grid gap-field-gap', className)}>\n {label && (\n <Label\n htmlFor={controlId}\n data-slot=\"field-label\"\n className={LABEL_GAP_CLASS_NAME}\n >\n {label}\n {required && (\n // The asterisk is presentational; the label text already\n // communicates the field is required via `required` on the control.\n <span aria-hidden className=\"ml-0.5 text-[var(--text-danger)]\">\n *\n </span>\n )}\n </Label>\n )}\n\n {/* Render the enriched single child or the original children as-is. */}\n {enrichedChild ?? children}\n\n {description && (\n <p id={descriptionId} className=\"text-sm text-muted-foreground\">\n {description}\n </p>\n )}\n\n {error && (\n <p\n id={errorId}\n role=\"alert\"\n className=\"text-sm text-[var(--text-danger)]\"\n >\n {error}\n </p>\n )}\n </div>\n );\n};\n\nField.displayName = 'Field';\n\nexport { Field };\nexport type { FieldProps };\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst Kbd = ({ className, ...props }: ComponentProps<'kbd'>): ReactElement => {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none',\n \"[&_svg:not([class*='size-'])]:size-3\",\n '[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10',\n className\n )}\n {...props}\n />\n );\n};\n\nconst KbdGroup = ({\n className,\n ...props\n}: ComponentProps<'kbd'>): ReactElement => {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn('inline-flex items-center gap-1', className)}\n {...props}\n />\n );\n};\n\nexport { Kbd, KbdGroup };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst progressVariants = cva(\n 'h-full w-full flex-1 transition-transform duration-500 ease-out motion-reduce:transition-none',\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n brand: 'bg-[var(--brand-default)]',\n danger: 'bg-[var(--danger-default)]',\n default: 'bg-primary',\n process: 'bg-[var(--process-default)]',\n success: 'bg-[var(--success-default)]',\n warning: 'bg-[var(--warning-default)]',\n },\n },\n }\n);\n\nexport type ProgressProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof progressVariants> & {\n indeterminate?: boolean;\n value?: number;\n };\n\nconst Progress = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className,\n indeterminate = false,\n value,\n variant,\n ...props\n}: ProgressProps & {\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}): ReactElement => {\n // Clamp to [0, 100] so out-of-range values never overflow the track.\n const clamped = Math.min(100, Math.max(0, value ?? 0));\n return (\n <div\n data-slot=\"progress\"\n className={cn(\n 'bg-primary/20 relative h-2 w-full overflow-hidden rounded-full',\n className\n )}\n {...props}\n >\n {/* Native semantic element drives screen-reader announcements; the styled\n bars below are visual only. */}\n <progress\n aria-label={ariaLabel ?? 'Progress'}\n aria-labelledby={ariaLabelledBy}\n className=\"sr-only\"\n max={100}\n value={indeterminate ? undefined : clamped}\n />\n <div\n data-slot=\"progress-indicator\"\n className={cn(\n progressVariants({ variant }),\n indeterminate &&\n 'animate-progress-indeterminate motion-reduce:animate-none'\n )}\n style={\n indeterminate\n ? undefined\n : { transform: `translateX(-${100 - clamped}%)` }\n }\n />\n </div>\n );\n};\n\nexport { Progress };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useId } from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\n\nimport { cn } from '../../../lib/utils';\nimport { Label } from '../label';\n\nconst RadioGroup = ({\n className,\n ...props\n}: ComponentProps<typeof RadioGroupPrimitive.Root>): ReactElement => {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n};\n\nconst RadioGroupItem = ({\n className,\n ...props\n}: ComponentProps<typeof RadioGroupPrimitive.Item>): ReactElement => {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"text-[var(--action)] dark:bg-input/30 relative aspect-square size-4 shrink-0 touch-manipulation rounded-full border border-[rgba(31,41,55,0.30)] dark:border-[rgba(255,255,255,0.20)] hover:data-[state=unchecked]:border-[rgba(31,41,55,0.45)] dark:hover:data-[state=unchecked]:border-[rgba(255,255,255,0.35)] data-[state=checked]:border-[var(--action)] shadow-[var(--shadow-radio)] dark:shadow-[var(--shadow-radio)] transition-[color,box-shadow,border-color] duration-100 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-[var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer after:absolute after:-inset-[14px] after:content-['']\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"group/indicator relative flex items-center justify-center\"\n forceMount\n >\n <span className=\"bg-[var(--action)] absolute top-1/2 left-1/2 size-2 rounded-full -translate-x-1/2 -translate-y-1/2 transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none group-data-[state=unchecked]/indicator:scale-0 group-data-[state=unchecked]/indicator:opacity-0\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n};\n\n/**\n * Alias for `RadioGroupItem` for use in labeled-row patterns.\n *\n * A radio is inherently part of a group — it must always live inside a\n * `RadioGroup`. For a standalone on/off toggle, prefer `Checkbox` or `Switch`.\n * `Radio` is the labeled-usage alias that signals \"I'm pairing this with a\n * `<Label>`\" rather than constructing raw item markup.\n */\nconst Radio = RadioGroupItem;\n\ntype RadioFieldProps = {\n /** Extra class names merged onto the outer wrapper element. */\n className?: string;\n /** Optional secondary line rendered below the label. */\n description?: ReactNode;\n /** Whether this field is non-interactive. */\n disabled?: boolean;\n /**\n * Override the generated element `id`. Useful when the parent already\n * manages a stable id. When omitted, a React-stable id is generated.\n */\n id?: string;\n /** Visible label text or element rendered next to the radio button. */\n label: ReactNode;\n /** The value this radio represents within its parent `RadioGroup`. */\n value: string;\n};\n\n/**\n * A convenience labeled-radio row for use inside a `RadioGroup`.\n *\n * Renders a `RadioGroupItem` paired with an associated `<Label>` (and an\n * optional description line) so callers don't have to wire up `id`/`htmlFor`\n * by hand. The `id` is stable across renders via `React.useId` unless\n * overridden.\n *\n * @example\n * ```tsx\n * <RadioGroup value={val} onValueChange={setVal}>\n * <RadioField value=\"a\" label=\"Option A\" description=\"First choice\" />\n * <RadioField value=\"b\" label=\"Option B\" />\n * </RadioGroup>\n * ```\n */\nconst RadioField = ({\n value,\n label,\n description,\n disabled,\n id: idProp,\n className,\n}: RadioFieldProps): ReactElement => {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n\n return (\n <div\n className={cn(\n 'flex items-start gap-3',\n disabled && 'opacity-50',\n className\n )}\n >\n <RadioGroupItem\n value={value}\n id={id}\n disabled={disabled}\n className=\"mt-0.5\"\n />\n <div className=\"grid gap-0.5\">\n <Label\n htmlFor={id}\n className={cn(\n 'cursor-pointer transition-colors duration-100 ease-out motion-reduce:transition-none',\n disabled && 'cursor-not-allowed'\n )}\n >\n {label}\n </Label>\n {description && (\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n </div>\n );\n};\n\nexport { RadioGroup, RadioGroupItem, Radio, RadioField };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport {\n ArrowLeft01Icon,\n ArrowRight01Icon,\n MoreHorizontalIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\nimport { Button, buttonVariants } from '../button/button';\n\n/** The 4px pagination gap permits 2px per link; retain the full vertical hit area. */\nconst PAGINATION_HIT_AREA = 'before:-inset-x-0.5';\n\n/**\n * Root nav wrapper for a pagination control set.\n * Renders a semantic `<nav>` with the ARIA `navigation` landmark.\n */\nconst Pagination = ({\n className,\n ...props\n}: ComponentProps<'nav'>): ReactElement => (\n <nav\n data-slot=\"pagination\"\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n);\n\n/**\n * Flex row that holds `PaginationItem` children.\n * Renders as a `<ul>` for correct list semantics inside the nav landmark.\n */\nconst PaginationContent = ({\n className,\n ...props\n}: ComponentProps<'ul'>): ReactElement => (\n <ul\n data-slot=\"pagination-content\"\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n);\n\n/**\n * A single `<li>` slot inside `PaginationContent`.\n * Acts as a structural wrapper — pair with `PaginationLink`, `PaginationPrevious`, or `PaginationNext`.\n */\nconst PaginationItem = ({\n className,\n ...props\n}: ComponentProps<'li'>): ReactElement => (\n <li data-slot=\"pagination-item\" className={cn('', className)} {...props} />\n);\n\ntype PaginationLinkProps = ComponentProps<'a'> & {\n /** When true, renders the link with the `outline` variant and sets `aria-current=\"page\"`. */\n isActive?: boolean;\n};\n\n/**\n * An individual page link.\n * Applies `buttonVariants` — `outline` when active, `ghost` when inactive — so focus rings,\n * `ease-out` transitions, and `motion-reduce` suppression are all inherited from Button's CVA base.\n */\nconst PaginationLink = ({\n className,\n isActive = false,\n children,\n ...props\n}: PaginationLinkProps): ReactElement => (\n <a\n data-slot=\"pagination-link\"\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n buttonVariants({\n size: 'icon-sm',\n variant: isActive ? 'outline' : 'ghost',\n }),\n PAGINATION_HIT_AREA,\n className\n )}\n {...props}\n >\n {children}\n </a>\n);\n\n/**\n * Previous-page control.\n * Disabled when the consumer passes `aria-disabled=\"true\"` or the native `disabled` attribute.\n * Keeps a 44px-tall target while fitting the horizontal expansion between adjacent links.\n */\nconst PaginationPrevious = ({\n className,\n children,\n ...props\n}: ComponentProps<'a'>): ReactElement => (\n <a\n data-slot=\"pagination-previous\"\n aria-label=\"Go to previous page\"\n className={cn(\n // Use `icon-sm` for the icon hit area; pair with an explicit label alongside for context\n buttonVariants({ size: 'icon-sm', variant: 'ghost' }),\n PAGINATION_HIT_AREA,\n 'gap-1 pl-2.5',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowLeft01Icon} size={14} aria-hidden=\"true\" />\n <span className=\"sr-only\">{children ?? 'Previous'}</span>\n </a>\n);\n\n/**\n * Next-page control.\n * Keeps a 44px-tall target while fitting the horizontal expansion between adjacent links.\n */\nconst PaginationNext = ({\n className,\n children,\n ...props\n}: ComponentProps<'a'>): ReactElement => (\n <a\n data-slot=\"pagination-next\"\n aria-label=\"Go to next page\"\n className={cn(\n buttonVariants({ size: 'icon-sm', variant: 'ghost' }),\n PAGINATION_HIT_AREA,\n 'gap-1 pr-2.5',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowRight01Icon} size={14} aria-hidden=\"true\" />\n <span className=\"sr-only\">{children ?? 'Next'}</span>\n </a>\n);\n\n/**\n * Ellipsis placeholder shown between non-contiguous page ranges.\n * Hidden from assistive technologies via `aria-hidden` — screen readers hear the surrounding page\n * numbers and can infer that pages are omitted.\n */\nconst PaginationEllipsis = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"pagination-ellipsis\"\n aria-hidden=\"true\"\n className={cn(\n 'flex size-7 items-center justify-center text-muted-foreground',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={MoreHorizontalIcon} size={14} />\n <span className=\"sr-only\">More pages</span>\n </span>\n);\n\n// ---------------------------------------------------------------------------\n// CursorPagination — convenience wrapper for cursor-based / infinite lists\n// ---------------------------------------------------------------------------\n\ntype CursorPaginationProps = {\n className?: string;\n /** Whether a next page exists; disables the next button when false. */\n hasNext: boolean;\n /** Whether a previous page exists; disables the previous button when false. */\n hasPrevious: boolean;\n /**\n * Optional content rendered before the navigation buttons.\n * Commonly used for a \"Page N of M\" or record-range label.\n */\n label?: ReactNode;\n /** Fired when the user requests the next page. */\n onNext: () => void;\n /** Fired when the user requests the previous page. */\n onPrevious: () => void;\n};\n\n/**\n * Pre-assembled cursor-based pagination bar.\n *\n * Renders an optional label, such as a record range, followed by previous and next arrow buttons, aligned to the end.\n * Each button is disabled automatically when there is no page in that direction.\n * Designed for dashboard tables and lists that use cursor/keyset pagination rather\n * than numbered pages — which is the dominant pattern in the Redcoast design system.\n *\n * @example\n * ```tsx\n * <CursorPagination\n * hasPrevious={!!cursor.before}\n * hasNext={!!cursor.after}\n * onPrevious={loadPrevious}\n * onNext={loadNext}\n * label={`${startIndex}–${endIndex} of ${total}`}\n * />\n * ```\n */\nconst CursorPagination = ({\n hasPrevious,\n hasNext,\n onPrevious,\n onNext,\n label,\n className,\n}: CursorPaginationProps): ReactElement => (\n <nav\n aria-label=\"Pagination\"\n data-slot=\"cursor-pagination\"\n className={cn('flex items-center justify-end gap-3', className)}\n >\n {label !== undefined && (\n // Tabular digits keep a range label from jiggling as the page changes.\n <span className=\"text-[13px] text-muted-foreground tabular-nums\">\n {label}\n </span>\n )}\n\n {/* 32px to match toolbar buttons; each 4px hit-area bleed meets the next in the 8px gap without overlapping. */}\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n className=\"size-8 before:-inset-1\"\n disabled={!hasPrevious}\n onClick={onPrevious}\n aria-label=\"Go to previous page\"\n >\n <HugeiconsIcon icon={ArrowLeft01Icon} size={16} aria-hidden=\"true\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n className=\"size-8 before:-inset-1\"\n disabled={!hasNext}\n onClick={onNext}\n aria-label=\"Go to next page\"\n >\n <HugeiconsIcon icon={ArrowRight01Icon} size={16} aria-hidden=\"true\" />\n </Button>\n </div>\n </nav>\n);\n\nexport {\n CursorPagination,\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\nexport type { CursorPaginationProps, PaginationLinkProps };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\n\nimport { cn } from '../../../lib/utils';\n\nconst ScrollArea = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof ScrollAreaPrimitive.Root>): ReactElement => {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] motion-reduce:transition-none outline-none focus-visible:ring-[3px]\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n};\n\nconst ScrollBar = ({\n className,\n orientation = 'vertical',\n ...props\n}: ComponentProps<\n typeof ScrollAreaPrimitive.ScrollAreaScrollbar\n>): ReactElement => {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none touch-manipulation p-px transition-[background-color] motion-reduce:transition-none select-none',\n orientation === 'vertical' &&\n 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' &&\n 'h-2.5 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"bg-border relative flex-1 rounded-full\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n};\n\nexport { ScrollArea, ScrollBar };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Search01Icon } from '@hugeicons/core-free-icons';\n\nimport { Kbd } from '../kbd';\nimport { cn } from '../../../lib/utils';\n\nconst SearchInput = ({\n className,\n placeholder = 'Search...',\n shortcut = '⌘K',\n onClick,\n ...props\n}: ComponentProps<'button'> & {\n placeholder?: string;\n shortcut?: string;\n}): ReactElement => {\n return (\n <button\n type=\"button\"\n data-slot=\"search-input\"\n className={cn(\n // Matches Input exactly: borderless, shadow-based field + halo focus.\n 'h-8 w-full touch-manipulation rounded-md border-0 bg-background dark:bg-input/30 shadow-[var(--shadow-input)]',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'transition-[color,box-shadow] duration-100 ease-out motion-reduce:transition-none',\n 'outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]',\n 'flex items-center gap-2 px-2',\n 'text-sm text-muted-foreground/60 cursor-pointer',\n className\n )}\n onClick={onClick}\n {...props}\n >\n <HugeiconsIcon\n icon={Search01Icon}\n size={16}\n className=\"shrink-0 text-muted-foreground/70\"\n />\n <span className=\"flex-1 text-left\">{placeholder}</span>\n {shortcut && <Kbd>{shortcut}</Kbd>}\n </button>\n );\n};\n\nexport { SearchInput };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport {\n ArrowDown01Icon,\n ArrowUp01Icon,\n Tick01Icon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Content,\n Group,\n Icon,\n Item,\n ItemIndicator,\n ItemText,\n Label,\n Portal,\n Root,\n ScrollDownButton,\n ScrollUpButton,\n Separator,\n Trigger,\n Value,\n Viewport,\n} from '@radix-ui/react-select';\n\nimport { cn } from '../../../lib/utils';\n\nconst Select = ({ ...props }: ComponentProps<typeof Root>): ReactElement => (\n <Root data-slot=\"select\" {...props} />\n);\n\nconst SelectGroup = ({\n ...props\n}: ComponentProps<typeof Group>): ReactElement => (\n <Group data-slot=\"select-group\" {...props} />\n);\n\nconst SelectValue = ({\n ...props\n}: ComponentProps<typeof Value>): ReactElement => (\n <Value data-slot=\"select-value\" {...props} />\n);\n\nconst SelectTrigger = ({\n className,\n size = 'default',\n children,\n ...props\n}: ComponentProps<typeof Trigger> & {\n size?: 'sm' | 'default';\n}): ReactElement => (\n <Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"data-[placeholder]:text-muted-foreground/60 [&_svg:not([class*='text-'])]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-transparent px-3 py-2 text-[13px] whitespace-nowrap shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)] transition-[color,box-shadow] duration-100 ease-out outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)] aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:text-[13px] data-[size=sm]:px-2.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[state=open]:[&>svg:last-of-type]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <Icon asChild>\n <HugeiconsIcon\n icon={ArrowDown01Icon}\n size={16}\n className=\"opacity-50 transition-transform duration-150 ease-out motion-reduce:transition-none\"\n />\n </Icon>\n </Trigger>\n);\n\nconst SelectContent = ({\n className,\n children,\n position = 'popper',\n align = 'start',\n ...props\n}: ComponentProps<typeof Content>): ReactElement => (\n <Portal>\n <Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground will-change-[opacity,transform] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border-0 shadow-[var(--shadow-elevated)]',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'\n )}\n >\n {children}\n </Viewport>\n <SelectScrollDownButton />\n </Content>\n </Portal>\n);\n\nconst SelectLabel = ({\n className,\n ...props\n}: ComponentProps<typeof Label>): ReactElement => (\n <Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n);\n\nconst SelectItem = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof Item>): ReactElement => (\n <Item\n data-slot=\"select-item\"\n className={cn(\n \"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:font-medium [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <ItemIndicator>\n <HugeiconsIcon icon={Tick01Icon} size={14} />\n </ItemIndicator>\n </span>\n <ItemText>{children}</ItemText>\n </Item>\n);\n\nconst SelectSeparator = ({\n className,\n ...props\n}: ComponentProps<typeof Separator>): ReactElement => (\n <Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n);\n\nconst SelectScrollUpButton = ({\n className,\n ...props\n}: ComponentProps<typeof ScrollUpButton>): ReactElement => (\n <ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowUp01Icon} size={16} aria-hidden={true} />\n </ScrollUpButton>\n);\n\nconst SelectScrollDownButton = ({\n className,\n ...props\n}: ComponentProps<typeof ScrollDownButton>): ReactElement => (\n <ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowDown01Icon} size={16} aria-hidden={true} />\n </ScrollDownButton>\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","'use client';\n\nimport { type ButtonHTMLAttributes, type ReactElement, type ReactNode } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { CheckIcon } from '../check-icon';\nimport { cn } from '../../../lib/utils';\n\ntype IconComponent = Parameters<typeof HugeiconsIcon>[0]['icon'];\n\ninterface SelectableCardProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {\n badge?: ReactNode;\n description: string;\n icon?: IconComponent;\n iconSize?: number;\n label: string;\n selected: boolean;\n}\n\nconst SelectableCard = ({\n badge,\n className,\n description,\n icon,\n iconSize = 20,\n label,\n selected,\n ...props\n}: SelectableCardProps): ReactElement => (\n <button\n data-slot=\"selectable-card\"\n data-selected={selected}\n className={cn(\n 'group/card relative flex flex-col items-start gap-2.5 p-4 rounded-xl text-left transition-[box-shadow,background-color,scale] duration-150 motion-reduce:transition-none touch-manipulation active:scale-[0.96] cursor-pointer w-full outline-none focus-visible:shadow-[0_0_0_1.5px_var(--action),0_0_0_4px_oklch(from_var(--action)_l_c_h_/_0.25)]',\n selected\n ? 'bg-[var(--action)]/5 shadow-[0_0_0_1.5px_var(--action)]'\n : 'shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.12)] hover:shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.20)]',\n className\n )}\n {...props}\n >\n {icon && (\n <HugeiconsIcon\n icon={icon}\n size={iconSize}\n className=\"text-[var(--action)]\"\n />\n )}\n <div className=\"w-full pr-7\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium text-balance\">{label}</p>\n {badge && <span className=\"shrink-0\">{badge}</span>}\n </div>\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n </div>\n <div className=\"absolute top-4 right-4\">\n <div\n className={cn(\n 'relative size-4 shrink-0 rounded-[4px] transition-[color,box-shadow,background-color] duration-200 ease-out motion-reduce:transition-none',\n selected\n ? 'bg-[var(--action)] text-white shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_oklch(1_0_0_/_0.07)_inset,0px_2px_3px_0px_oklch(0.278_0.03_256.85_/_0.20),0px_1px_1px_0px_oklch(0_0_0_/_0.24)]'\n : 'shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.20),0_1px_2px_0_oklch(0_0_0_/_0.06),0_0_1px_0_oklch(0_0_0_/_0.02)] group-hover/card:shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.30),0_1px_2px_0_oklch(0_0_0_/_0.06),0_0_1px_0_oklch(0_0_0_/_0.02)]'\n )}\n >\n <CheckIcon\n size={14}\n className={cn(\n 'absolute inset-0 m-auto text-current transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none',\n selected\n ? 'opacity-100 scale-100 blur-none'\n : 'opacity-0 scale-[0.25] blur-[4px]'\n )}\n />\n </div>\n </div>\n </button>\n);\n\nexport { SelectableCard };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-separator';\n\nimport { cn } from '../../../lib/utils';\n\nconst Separator = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root>\n>(\n (\n { className, orientation = 'horizontal', decorative = true, ...props },\n ref,\n ) => (\n <Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n ),\n);\nSeparator.displayName = Root.displayName;\n\nexport { Separator };\n","'use client';\n\nimport type { ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype SliderProps = {\n /** Additional class names forwarded to the wrapper element. */\n className?: string;\n /** When true, the slider is non-interactive and visually dimmed. */\n disabled?: boolean;\n /** Maximum value (inclusive). Defaults to 100. */\n max?: number;\n /** Minimum value (inclusive). Defaults to 0. */\n min?: number;\n /** Callback fired when the user moves the slider. */\n onValueChange: (value: number) => void;\n /** Granularity of each step. Defaults to 1. */\n step?: number;\n /** Current value of the slider. */\n value: number;\n};\n\n/**\n * Controlled range slider built on a native `<input type=\"range\">`.\n *\n * Zero-dependency — all styling is done with Tailwind arbitrary variants so\n * no Radix/Headless UI install is needed. The filled portion is rendered via an\n * inline CSS custom property so the gradient stays in sync with the value without\n * any JS animation loop.\n */\nconst Slider = ({\n value,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n className,\n}: SliderProps): ReactElement => {\n // Clamp so the gradient never overflows or goes negative.\n const clamped = Math.min(max, Math.max(min, value));\n\n // Express the filled portion as a percentage for the CSS gradient.\n const range = max - min;\n const fillPercent = range === 0 ? 0 : ((clamped - min) / range) * 100;\n\n return (\n <div\n data-slot=\"slider\"\n className={cn(\n 'relative flex w-full touch-manipulation items-center',\n className\n )}\n >\n <input\n type=\"range\"\n data-slot=\"slider-input\"\n min={min}\n max={max}\n step={step}\n value={clamped}\n disabled={disabled}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={clamped}\n onChange={(e) => onValueChange(Number(e.target.value))}\n className={cn(\n // Reset browser defaults so we can style from scratch.\n 'w-full appearance-none bg-transparent outline-none',\n // Cursor\n 'cursor-pointer disabled:cursor-not-allowed disabled:opacity-50',\n // --- WebKit track ---\n // The track is split into \"filled\" (left of thumb) and \"unfilled\" using a\n // linear-gradient that is driven by the --slider-fill CSS custom property\n // set via the inline style below.\n '[&::-webkit-slider-runnable-track]:h-1.5',\n '[&::-webkit-slider-runnable-track]:w-full',\n '[&::-webkit-slider-runnable-track]:rounded-full',\n '[&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--action)_var(--slider-fill,0%),var(--bg-accented)_var(--slider-fill,0%))]',\n '[&::-webkit-slider-runnable-track]:transition-[background-size] [&::-webkit-slider-runnable-track]:duration-150 [&::-webkit-slider-runnable-track]:ease-out',\n '[&::-webkit-slider-runnable-track]:motion-reduce:transition-none',\n // --- WebKit thumb ---\n '[&::-webkit-slider-thumb]:appearance-none',\n '[&::-webkit-slider-thumb]:size-4',\n '[&::-webkit-slider-thumb]:rounded-full',\n '[&::-webkit-slider-thumb]:bg-background',\n '[&::-webkit-slider-thumb]:border',\n '[&::-webkit-slider-thumb]:border-[var(--action)]',\n '[&::-webkit-slider-thumb]:shadow-[var(--shadow-control-thumb)]',\n // Vertically center the thumb on the track (track is 6px tall, thumb is 16px).\n '[&::-webkit-slider-thumb]:-mt-[5px]',\n // Smooth thumb travel\n '[&::-webkit-slider-thumb]:transition-[box-shadow] [&::-webkit-slider-thumb]:duration-150 [&::-webkit-slider-thumb]:ease-out',\n '[&::-webkit-slider-thumb]:motion-reduce:transition-none',\n // Focus-visible ring on the thumb (keyboard users)\n 'focus-visible:[&::-webkit-slider-thumb]:shadow-[0_0_0_3px_var(--ring-halo),var(--shadow-control-thumb)]',\n // --- Firefox track ---\n '[&::-moz-range-track]:h-1.5',\n '[&::-moz-range-track]:w-full',\n '[&::-moz-range-track]:rounded-full',\n '[&::-moz-range-track]:bg-[var(--bg-accented)]',\n // --- Firefox filled portion (uses the native progress pseudo-element) ---\n '[&::-moz-range-progress]:h-1.5',\n '[&::-moz-range-progress]:rounded-full',\n '[&::-moz-range-progress]:bg-[var(--action)]',\n // --- Firefox thumb ---\n '[&::-moz-range-thumb]:size-4',\n '[&::-moz-range-thumb]:rounded-full',\n '[&::-moz-range-thumb]:border',\n '[&::-moz-range-thumb]:border-[var(--action)]',\n '[&::-moz-range-thumb]:bg-background',\n '[&::-moz-range-thumb]:shadow-[var(--shadow-control-thumb)]',\n '[&::-moz-range-thumb]:transition-[box-shadow] [&::-moz-range-thumb]:duration-150 [&::-moz-range-thumb]:ease-out',\n '[&::-moz-range-thumb]:motion-reduce:transition-none',\n 'focus-visible:[&::-moz-range-thumb]:shadow-[0_0_0_3px_var(--ring-halo),var(--shadow-control-thumb)]'\n )}\n // The CSS custom property drives the WebKit gradient split point.\n // This avoids any JS animation loop — the browser re-paints directly.\n style={{ '--slider-fill': `${fillPercent}%` } as React.CSSProperties}\n />\n </div>\n );\n};\n\nexport { Slider };\nexport type { SliderProps };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Cancel01Icon } from '@hugeicons/core-free-icons';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\n\nimport { cn } from '../../../lib/utils';\n\nconst Sheet = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Root>): ReactElement => (\n <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n);\n\nconst SheetTrigger = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Trigger>): ReactElement => (\n <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n);\n\nconst SheetClose = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Close>): ReactElement => (\n <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n);\n\nconst SheetPortal = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Portal>): ReactElement => (\n <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n);\n\nconst SheetOverlay = ({\n className,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Overlay>): ReactElement => {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] will-change-[opacity] data-[state=closed]:duration-100 data-[state=open]:duration-150 [animation-timing-function:cubic-bezier(0.16,1,0.3,1)] motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n );\n};\n\nconst SheetContent = ({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n overlayClassName,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Content> & {\n overlayClassName?: string;\n showCloseButton?: boolean;\n side?: 'top' | 'right' | 'bottom' | 'left';\n}): ReactElement => {\n return (\n <SheetPortal>\n <SheetOverlay className={overlayClassName} />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 border-0 shadow-[var(--shadow-elevated)] [animation-timing-function:cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:duration-150 data-[state=open]:duration-200 will-change-[opacity,transform] motion-reduce:animate-none',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 sm:max-w-sm rounded-l-xl rounded-r-md',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 sm:max-w-sm rounded-r-xl rounded-l-md',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto rounded-b-md',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto rounded-t-md',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close className=\"absolute top-3 right-3 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground opacity-70 transition-[opacity,background-color] duration-150 ease-out motion-reduce:transition-none hover:opacity-100 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus:outline-hidden disabled:pointer-events-none cursor-pointer touch-manipulation before:absolute before:-inset-2 before:content-['']\">\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n};\n\nconst SheetHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\n 'flex flex-col gap-0.5 px-4 py-3.5 border-b border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst SheetFooter = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n 'mt-auto flex flex-col gap-2 px-4 py-3.5 border-t border-[var(--border-divider)] bg-muted',\n className\n )}\n {...props}\n />\n );\n};\n\nconst SheetTitle = ({\n className,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Title>): ReactElement => {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n};\n\nconst SheetDescription = ({\n className,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Description>): ReactElement => {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n};\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst Skeleton = ({\n className,\n ...props\n}: ComponentProps<'output'>): ReactElement => {\n return (\n <output\n aria-label=\"Loading\"\n data-slot=\"skeleton\"\n className={cn(\n 'block bg-accent animate-shimmer motion-reduce:animate-none rounded-md bg-[length:200%_100%] bg-gradient-to-r from-accent via-accent/50 to-accent dark:via-accent/70',\n className\n )}\n {...props}\n />\n );\n};\n\nexport { Skeleton };\n","'use client';\n\nimport { type CSSProperties, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Alert01Icon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport { useTheme } from 'next-themes';\nimport { Toaster as Sonner, type ToasterProps } from 'sonner';\n\nconst Toaster = ({ ...props }: ToasterProps): ReactElement => {\n const { theme = 'system' } = useTheme();\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className=\"toaster group\"\n icons={{\n error: <HugeiconsIcon icon={Cancel01Icon} size={16} />,\n info: <HugeiconsIcon icon={InformationCircleIcon} size={16} />,\n loading: (\n <svg className=\"size-4 animate-spin\" viewBox=\"0 0 24 24\" fill=\"none\">\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n ),\n success: <HugeiconsIcon icon={CheckmarkCircle02Icon} size={16} />,\n warning: <HugeiconsIcon icon={Alert01Icon} size={16} />,\n }}\n style={\n {\n '--border-radius': 'var(--radius)',\n '--normal-bg': 'var(--popover)',\n '--normal-border': 'var(--border)',\n '--normal-text': 'var(--popover-foreground)',\n } as CSSProperties\n }\n {...props}\n />\n );\n};\n\nexport { Toaster };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { CheckIcon } from '../check-icon/check-icon';\n\ntype StepperStep = {\n /** Optional supporting text rendered below the label. */\n description?: string;\n /** The visible label shown beneath the step indicator. */\n label: string;\n};\n\ntype StepperProps = {\n /** Additional class names forwarded to the root `<ol>`. */\n className?: string;\n /**\n * Zero-based index of the currently active step.\n * Steps with a lower index are treated as COMPLETED; higher as UPCOMING.\n */\n currentStep: number;\n /** Ordered list of steps to render. */\n steps: StepperStep[];\n} & Omit<ComponentProps<'ol'>, 'children'>;\n\n/**\n * Horizontal step indicator that renders an ordered sequence of steps with\n * connector lines between them.\n *\n * - **COMPLETED** (index < currentStep): filled action-coloured circle + white checkmark.\n * - **CURRENT** (index === currentStep): action-coloured border + step number; label is font-medium.\n * - **UPCOMING** (index > currentStep): muted border + step number.\n *\n * Connector lines between adjacent steps are action-coloured when the segment\n * is completed (both endpoints are ≤ currentStep) and divider-coloured otherwise.\n *\n * @example\n * <Stepper steps={[{ label: 'Account' }, { label: 'Details' }, { label: 'Review' }]} currentStep={1} />\n */\nconst Stepper = ({\n steps,\n currentStep,\n className,\n ...props\n}: StepperProps): ReactElement => (\n <ol\n aria-label=\"Progress\"\n className={cn('flex w-full items-start', className)}\n {...props}\n >\n {steps.map((step, index) => {\n const isCompleted = index < currentStep;\n const isCurrent = index === currentStep;\n // A segment is completed when both the step and the preceding step are done.\n const connectorCompleted = index > 0 && index <= currentStep;\n\n return (\n // Each list item is a flex row: [connector?] [indicator + text]\n <li\n key={step.label}\n className={cn(\n 'flex flex-1 items-start',\n // Remove flex-1 growth on the last step so the final item doesn't push right.\n index === steps.length - 1 && 'flex-none'\n )}\n aria-current={isCurrent ? 'step' : undefined}\n >\n {/* Connector line before this step (absent for the first step) */}\n {index > 0 && (\n <div\n aria-hidden=\"true\"\n className={cn(\n 'mt-3.5 h-px flex-1 transition-colors duration-300 ease-out motion-reduce:transition-none',\n connectorCompleted\n ? 'bg-[var(--action)]'\n : 'bg-[var(--border-divider)]'\n )}\n />\n )}\n\n {/* Step body: indicator circle + label/description */}\n <div className=\"flex flex-col items-center gap-1.5\">\n {/* Circular indicator */}\n <div\n aria-hidden=\"true\"\n className={cn(\n 'flex size-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-[background-color,border-color,color] duration-300 ease-out motion-reduce:transition-none select-none',\n isCompleted && 'bg-[var(--action)] text-white',\n isCurrent &&\n 'border-2 border-[var(--action)] text-[var(--action)]',\n !isCompleted &&\n !isCurrent &&\n 'border border-[var(--border-default)] text-muted-foreground'\n )}\n >\n {isCompleted ? (\n <CheckIcon size={13} strokeWidth={3} />\n ) : (\n String(index + 1)\n )}\n </div>\n\n {/* Step label */}\n <span\n className={cn(\n 'max-w-[6rem] text-center text-xs leading-tight transition-colors duration-300 ease-out motion-reduce:transition-none',\n isCurrent\n ? 'font-medium text-foreground'\n : 'text-muted-foreground'\n )}\n >\n {step.label}\n </span>\n\n {/* Optional description */}\n {step.description && (\n <span className=\"max-w-[6rem] text-center text-[10px] leading-tight text-muted-foreground\">\n {step.description}\n </span>\n )}\n </div>\n\n {/* Connector line after this step (absent for the last step) */}\n {index < steps.length - 1 && (\n <div\n aria-hidden=\"true\"\n className={cn(\n 'mt-3.5 h-px flex-1 transition-colors duration-300 ease-out motion-reduce:transition-none',\n // This connector is completed when the next step is already done.\n index + 1 <= currentStep\n ? 'bg-[var(--action)]'\n : 'bg-[var(--border-divider)]'\n )}\n />\n )}\n </li>\n );\n })}\n </ol>\n);\n\nexport { Stepper };\nexport type { StepperProps, StepperStep };\n","'use client';\n\nimport {\n type CSSProperties,\n type ComponentProps,\n type ReactElement,\n type Ref,\n type RefCallback,\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\n\nimport { cn } from '../../../lib/utils';\n\ntype TableProps = ComponentProps<'table'> & {\n /** Stretch to the height the parent gives it, with one scroller and a pinned header. The parent must be a flex column with a bounded height. */\n fill?: boolean;\n /** Customize the native scroll viewport, including an optional max-height. */\n scrollAreaProps?: Omit<\n ComponentProps<'div'>,\n 'children' | 'ref' | 'role' | 'tabIndex'\n >;\n /** Pin the first column at inline-start; cells spanning multiple columns stay unpinned. */\n stickyFirstColumn?: boolean;\n /** Receives the scroll viewport element, for code that follows its scrolling such as row virtualization. */\n viewportRef?: Ref<HTMLDivElement>;\n};\n\n/** Keep overlay tracks clear of the shelf's rounded corners. */\nconst SCROLLBAR_INSET = 8;\n/** A wider drag target lets the visible thumb stay visually quiet. */\nconst SCROLLBAR_HIT_AREA = 12;\n\n/** Point several refs, function or object, at the same element. */\nconst mergeRefs =\n <T,>(...refs: Array<Ref<T> | undefined>): RefCallback<T> =>\n (node) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n });\n };\n\n/** Collect a row group's leading cells, skipping rows covered by an earlier rowSpan. */\nconst collectSectionPinnedCells = ({\n pinnedCells,\n section,\n}: {\n pinnedCells: Set<HTMLTableCellElement>;\n section: HTMLTableSectionElement;\n}): void => {\n let occupiedRows = 0;\n for (const row of Array.from(section.rows)) {\n if (occupiedRows > 0) {\n occupiedRows -= 1;\n continue;\n }\n const cell = row.cells[0];\n if (!cell) continue;\n // A zero rowSpan occupies the rest of its row group, not zero rows.\n occupiedRows = cell.rowSpan === 0 ? section.rows.length : cell.rowSpan - 1;\n if (cell.colSpan === 1) pinnedCells.add(cell);\n }\n};\n\n/** Collect the leading cells that pin, skipping rows covered by an earlier rowSpan. */\nconst collectPinnedCells = (\n table: HTMLTableElement\n): Set<HTMLTableCellElement> => {\n const pinnedCells = new Set<HTMLTableCellElement>();\n // DOM child order differs from column order when an earlier cell spans rows.\n for (const section of [\n ...Array.from(table.tBodies),\n table.tHead,\n table.tFoot,\n ]) {\n if (section) collectSectionPinnedCells({ pinnedCells, section });\n }\n return pinnedCells;\n};\n\n/** Measure where the body begins in content coordinates; top captions shift it down. */\nconst measureShelfTop = ({\n scrollArea,\n table,\n}: {\n scrollArea: HTMLDivElement;\n table: HTMLTableElement | null;\n}): number => {\n const body = table?.tBodies[0];\n // Content coordinates include top captions and stay stable after native scrolling.\n return body\n ? body.getBoundingClientRect().top -\n scrollArea.getBoundingClientRect().top +\n scrollArea.scrollTop\n : 0;\n};\n\n/** Render a table in a stable tray with keyboard access only when content overflows. */\nconst Table = ({\n className,\n fill = false,\n scrollAreaProps = {},\n stickyFirstColumn = false,\n viewportRef,\n ...props\n}: TableProps): ReactElement => {\n const scrollAreaRef = useRef<HTMLDivElement>(null);\n // A stable callback keeps React from detaching and reattaching the viewport refs on every render.\n const setViewportRef = useMemo(\n () => mergeRefs(scrollAreaRef, viewportRef),\n [viewportRef]\n );\n const [overflow, setOverflow] = useState({\n horizontal: false,\n vertical: false,\n });\n const [isTouchPrimary, setIsTouchPrimary] = useState(false);\n const [direction, setDirection] = useState<'ltr' | 'rtl'>('ltr');\n const [headerHeight, setHeaderHeight] = useState(0);\n const [topCaptionHeight, setTopCaptionHeight] = useState(0);\n const [shelfTop, setShelfTop] = useState(0);\n const [firstColumnWidth, setFirstColumnWidth] = useState(0);\n const {\n className: scrollAreaClassName,\n style: scrollAreaStyle,\n 'aria-label': scrollAreaLabel = props['aria-label'] ?? 'Scrollable table',\n ...viewportProps\n } = scrollAreaProps;\n const isScrollable = overflow.horizontal || overflow.vertical;\n const useNativeScrollbars =\n isTouchPrimary || typeof ResizeObserver === 'undefined';\n\n useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;\n const pointerQuery = window.matchMedia('(pointer: coarse)');\n const updatePointer = () => setIsTouchPrimary(pointerQuery.matches);\n updatePointer();\n if (typeof pointerQuery.addEventListener === 'function') {\n pointerQuery.addEventListener('change', updatePointer);\n return () => pointerQuery.removeEventListener('change', updatePointer);\n }\n // Safari < 14 only supports the legacy addListener/removeListener API\n pointerQuery.addListener(updatePointer); // NOSONAR\n return () => pointerQuery.removeListener(updatePointer); // NOSONAR\n }, []);\n\n useEffect(() => {\n const scrollArea = scrollAreaRef.current;\n if (!scrollArea) return;\n\n const table = scrollArea.querySelector('table');\n let pinnedCells = new Set<HTMLTableCellElement>();\n let firstColumn: HTMLTableCellElement | undefined;\n const updatePinnedEdge = () => {\n // A CSS value keeps this high-frequency feedback out of React renders.\n scrollArea.parentElement?.style.setProperty(\n '--table-pinned-edge-visible',\n stickyFirstColumn &&\n firstColumn &&\n scrollArea.scrollWidth > scrollArea.clientWidth &&\n Math.abs(scrollArea.scrollLeft) > 0\n ? '1'\n : '0'\n );\n };\n const updatePinnedCells = () => {\n const nextPinnedCells =\n stickyFirstColumn && table\n ? collectPinnedCells(table)\n : new Set<HTMLTableCellElement>();\n pinnedCells.forEach((cell) => {\n if (!nextPinnedCells.has(cell)) delete cell.dataset.tablePinned;\n });\n nextPinnedCells.forEach((cell) => {\n if (!pinnedCells.has(cell)) cell.dataset.tablePinned = 'true';\n });\n pinnedCells = nextPinnedCells;\n const nextFirstColumn = pinnedCells.values().next().value;\n if (firstColumn !== nextFirstColumn) {\n if (firstColumn) observer?.unobserve(firstColumn);\n if (nextFirstColumn) observer?.observe(nextFirstColumn);\n firstColumn = nextFirstColumn;\n }\n };\n const updateLayout = () => {\n updatePinnedCells();\n // Radix drag math follows the same DOM-inherited direction as the table.\n setDirection(\n getComputedStyle(scrollArea).direction === 'rtl' ? 'rtl' : 'ltr'\n );\n setOverflow({\n horizontal: scrollArea.scrollWidth > scrollArea.clientWidth,\n vertical: scrollArea.scrollHeight > scrollArea.clientHeight,\n });\n setHeaderHeight(table?.tHead?.offsetHeight ?? 0);\n // Native focus scrolling must reveal content beyond the pinned column.\n setFirstColumnWidth(firstColumn?.offsetWidth ?? 0);\n const caption = table?.caption;\n setTopCaptionHeight(\n caption && getComputedStyle(caption).captionSide === 'top'\n ? caption.offsetHeight\n : 0\n );\n setShelfTop(measureShelfTop({ scrollArea, table }));\n updatePinnedEdge();\n };\n // Captions and row groups can resize without changing the total table height.\n const observer =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(updateLayout);\n const contentObserver = new MutationObserver(updateLayout);\n observer?.observe(scrollArea);\n if (table) {\n observer?.observe(table);\n Array.from(table.children).forEach((child) => observer?.observe(child));\n if (stickyFirstColumn) {\n // Child components can load or regroup rows without rerendering Table.\n contentObserver.observe(table, {\n attributeFilter: ['colspan', 'rowspan'],\n attributes: true,\n childList: true,\n subtree: true,\n });\n }\n }\n // Preserve keyboard overflow detection in environments without ResizeObserver.\n window.addEventListener('resize', updateLayout);\n scrollArea.addEventListener('scroll', updatePinnedEdge, { passive: true });\n updateLayout();\n return () => {\n window.removeEventListener('resize', updateLayout);\n scrollArea.removeEventListener('scroll', updatePinnedEdge);\n observer?.disconnect();\n contentObserver.disconnect();\n pinnedCells.forEach((cell) => delete cell.dataset.tablePinned);\n };\n // scrollAreaProps.dir reaches the viewport without rerunning Table, so it is a dep.\n }, [\n props.children,\n props.dir,\n scrollAreaProps.dir,\n isTouchPrimary,\n stickyFirstColumn,\n ]);\n\n return (\n <ScrollAreaPrimitive.Root asChild type=\"always\" dir={direction}>\n <div\n data-slot=\"table-container\"\n data-tray=\"header\"\n data-fill={fill || undefined}\n // An absent dir must inherit from the DOM, not Radix's default LTR value.\n dir={props.dir}\n className={cn(\n // Clipping plus inline-size containment keeps a wide table from widening its host, so overflow stays detectable.\n 'group/table relative min-w-0 w-full overflow-hidden [container-type:inline-size] [--table-radius:16px] [--table-shelf-radius:calc(var(--table-radius)_-_var(--tray-inset))] rounded-[var(--table-radius)] bg-[var(--tray-chrome)] px-[var(--tray-inset)] pb-[var(--tray-inset)]',\n fill && 'flex min-h-0 flex-1 flex-col'\n )}\n >\n {/* The shelf belongs to the tray, not the moving rows. */}\n <div\n aria-hidden=\"true\"\n data-slot=\"table-shelf\"\n className=\"pointer-events-none absolute inset-x-[var(--tray-inset)] bottom-[var(--tray-inset)] rounded-[var(--table-shelf-radius)] bg-card\"\n style={{ top: shelfTop }}\n />\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={setViewportRef}\n data-slot=\"table-scroll-area\"\n data-caption-top={topCaptionHeight > 0}\n data-native-scrollbars={useNativeScrollbars}\n role={isScrollable ? 'region' : undefined}\n aria-label={isScrollable ? scrollAreaLabel : undefined}\n tabIndex={isScrollable ? 0 : undefined}\n style={\n {\n '--table-caption-height': `${topCaptionHeight}px`,\n // Native overflow keeps wheel, trackpad and keyboard scrolling on the viewport.\n overflowX: isScrollable ? 'auto' : 'visible',\n overflowY: isScrollable ? 'auto' : 'visible',\n scrollPaddingInlineStart: `${firstColumnWidth}px`,\n scrollPaddingTop: headerHeight + topCaptionHeight,\n ...scrollAreaStyle,\n } as CSSProperties\n }\n className={cn(\n 'relative min-w-0 overflow-auto overscroll-none rounded-[var(--table-shelf-radius)] data-[native-scrollbars=true]:[scrollbar-width:auto] data-[native-scrollbars=true]:[&::-webkit-scrollbar]:block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ring)]',\n fill && 'min-h-0 flex-1',\n scrollAreaClassName\n )}\n >\n <table\n data-slot=\"table\"\n data-sticky-first-column={stickyFirstColumn || undefined}\n className={cn(\n 'w-full caption-bottom border-separate border-spacing-0 text-sm',\n stickyFirstColumn && [\n '[&>*>tr>[data-table-pinned]]:sticky [&>*>tr>[data-table-pinned]]:start-0 [&>*>tr>[data-table-pinned]]:z-10',\n '[&>*>tr>[data-table-pinned]]:bg-card',\n '[&>thead>tr>[data-table-pinned]]:bg-[var(--tray-chrome)]',\n // An opaque base blocks passing text; the overlay still matches its row state.\n '[&>:is(tbody,tfoot)>tr>[data-table-pinned]]:bg-[linear-gradient(var(--table-row-overlay,transparent),var(--table-row-overlay,transparent))]',\n ],\n className\n )}\n {...props}\n />\n </ScrollAreaPrimitive.Viewport>\n {stickyFirstColumn && firstColumnWidth > 0 && overflow.horizontal && (\n <div\n aria-hidden=\"true\"\n data-slot=\"table-pinned-edge\"\n dir={direction}\n className=\"pointer-events-none absolute top-0 bottom-[var(--tray-inset)] z-30 w-px bg-[var(--border-divider)] forced-colors:bg-[CanvasText]\"\n style={{\n insetInlineStart: `calc(var(--tray-inset) + ${firstColumnWidth}px)`,\n opacity: 'var(--table-pinned-edge-visible,0)',\n }}\n />\n )}\n {/* Mask only the fixed shelf corners, so row hover fills cannot square them off. */}\n <div\n aria-hidden=\"true\"\n data-slot=\"table-shelf-edge\"\n className=\"pointer-events-none absolute inset-x-[var(--tray-inset)] bottom-[var(--tray-inset)] z-30 rounded-[var(--table-shelf-radius)] border border-[var(--border-divider)] shadow-[0_0_0_var(--table-radius)_var(--tray-chrome)] [clip-path:inset(0)]\"\n style={{ top: shelfTop }}\n />\n {/* Separate tracks sit above the corner mask and never run through the header. */}\n {!useNativeScrollbars &&\n (['vertical', 'horizontal'] as const).map(\n (orientation) =>\n overflow[orientation] && (\n <ScrollAreaPrimitive.Scrollbar\n key={orientation}\n aria-hidden=\"true\"\n data-slot=\"table-scrollbar\"\n dir={direction}\n orientation={orientation}\n className=\"group/scrollbar pointer-events-none z-40 flex touch-none select-none opacity-0 group-hover/table:pointer-events-auto group-hover/table:opacity-100 group-focus-within/table:pointer-events-auto group-focus-within/table:opacity-100\"\n style={\n orientation === 'vertical'\n ? {\n bottom: `calc(var(--tray-inset) + ${SCROLLBAR_INSET}px)`,\n insetInlineEnd: 'var(--tray-inset)',\n left: 'auto',\n right: 'auto',\n top: shelfTop + SCROLLBAR_INSET,\n width: SCROLLBAR_HIT_AREA,\n }\n : {\n bottom: 'var(--tray-inset)',\n height: SCROLLBAR_HIT_AREA,\n insetInlineEnd: `calc(var(--tray-inset) + ${\n overflow.vertical\n ? SCROLLBAR_INSET + SCROLLBAR_HIT_AREA\n : SCROLLBAR_INSET\n }px)`,\n insetInlineStart: `calc(var(--tray-inset) + ${SCROLLBAR_INSET}px)`,\n left: 'auto',\n right: 'auto',\n }\n }\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"table-scrollbar-thumb\"\n // Keep the hit area stable while only the visible 4px thumb widens on hover.\n style={\n orientation === 'vertical'\n ? { width: '100%' }\n : { height: '100%' }\n }\n // Alpha lets row colors show through without fading the content itself.\n className={cn(\n 'relative [--table-scrollbar-thumb:color-mix(in_oklab,var(--foreground)_25%,transparent)] [--table-scrollbar-thumb-hover:color-mix(in_oklab,var(--foreground)_35%,transparent)] before:pointer-events-none before:absolute before:rounded-full before:bg-[var(--table-scrollbar-thumb)] group-hover/scrollbar:before:bg-[var(--table-scrollbar-thumb-hover)] contrast-more:before:bg-[var(--border-strong)] contrast-more:group-hover/scrollbar:before:bg-[var(--border-strong)] forced-colors:before:bg-[CanvasText] forced-colors:group-hover/scrollbar:before:bg-[CanvasText]',\n orientation === 'vertical'\n ? 'before:inset-y-0 before:left-1/2 before:w-1 before:-translate-x-1/2 group-hover/scrollbar:before:w-1.5'\n : 'before:inset-x-0 before:top-1/2 before:h-1 before:-translate-y-1/2 group-hover/scrollbar:before:h-1.5'\n )}\n />\n </ScrollAreaPrimitive.Scrollbar>\n )\n )}\n </div>\n </ScrollAreaPrimitive.Root>\n );\n};\n\nconst TableHeader = ({\n className,\n ...props\n}: ComponentProps<'thead'>): ReactElement => {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\n 'sticky top-[var(--table-caption-height,0px)] z-20 bg-[var(--tray-chrome)] [&_tr]:border-0 [&_tr]:hover:bg-transparent',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableBody = ({\n className,\n ...props\n}: ComponentProps<'tbody'>): ReactElement => {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\n '[&>tr:not(:last-child)>*]:border-b [&>tr:not(:last-child)>*]:border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableFooter = ({\n className,\n ...props\n}: ComponentProps<'tfoot'>): ReactElement => {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n 'font-medium [&>tr>*]:border-t [&>tr>*]:border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n );\n};\n\n// forwardRef rather than a ref prop, so code that measures rows, such as row virtualization, gets the <tr> on React 18 as well as 19.\nconst TableRow = forwardRef<HTMLTableRowElement, ComponentProps<'tr'>>(\n ({ className, ...props }, ref): ReactElement => (\n <tr\n ref={ref}\n data-slot=\"table-row\"\n className={cn(\n 'hover:bg-[var(--overlay-hover)] data-[state=selected]:bg-[var(--table-row-selected)] data-[state=selected]:hover:bg-[var(--table-row-selected-hover)] border-b border-[var(--border-divider)]',\n // Hover is instant: sweeping across rows happens constantly, and pinned cells paint it through this variable, which can't fade in step with the row's own background.\n 'hover:[--table-row-overlay:var(--overlay-hover)] data-[state=selected]:[--table-row-overlay:var(--table-row-selected)] data-[state=selected]:hover:[--table-row-overlay:var(--table-row-selected-hover)]',\n className\n )}\n {...props}\n />\n )\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = ({\n className,\n scope,\n ...props\n}: ComponentProps<'th'>): ReactElement => {\n return (\n <th\n data-slot=\"table-head\"\n scope={scope ?? 'col'}\n className={cn(\n 'text-foreground/75 h-[38px] px-4 text-left align-middle text-xs font-medium whitespace-nowrap tabular-nums [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableCell = ({\n className,\n ...props\n}: ComponentProps<'td'>): ReactElement => {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'px-4 py-2.5 align-middle whitespace-nowrap tabular-nums [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableCaption = ({\n className,\n ...props\n}: ComponentProps<'caption'>): ReactElement => {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\n 'text-muted-foreground mt-4 text-sm [[data-caption-top=true]_&]:sticky [[data-caption-top=true]_&]:top-0 [[data-caption-top=true]_&]:z-20 [[data-caption-top=true]_&]:mt-0 [[data-caption-top=true]_&]:bg-[var(--tray-chrome)]',\n className\n )}\n {...props}\n />\n );\n};\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n};\n","import { createColumnHelper as createTanStackColumnHelper } from '@tanstack/react-table';\n\n/**\n * Creates a helper that builds typed column definitions for rows of type `TData`. Its `accessor`, `display` and `group` methods infer each column's value type.\n *\n * @example\n * ```tsx\n * const columnHelper = createColumnHelper<User>();\n *\n * const columns = [\n * columnHelper.accessor('name', { header: 'Name' }),\n * columnHelper.accessor('email', { header: 'Email' }),\n * ];\n * ```\n * @returns A column helper for rows of type `TData`.\n * @see ColumnDef\n * @see useDataTable\n */\nconst createColumnHelper: typeof createTanStackColumnHelper =\n createTanStackColumnHelper;\n\nexport { createColumnHelper };\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport type { DataTableInstance } from './use-data-table';\n\n// Parts render any row shape; the row type stays checked where the app calls useDataTable.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype DataTableContextValue = DataTableInstance<any> & { fill: boolean };\n\nconst DataTableContext = createContext<DataTableContextValue | null>(null);\n\n/**\n * Read the state of the nearest `DataTable`, for building custom table parts.\n * Throws when called outside a `DataTable`.\n */\nconst useDataTableContext = (): DataTableContextValue => {\n const context = useContext(DataTableContext);\n if (!context) {\n // eslint-disable-next-line no-restricted-syntax -- dev-time invariant guard; a \"used outside provider\" check doesn't warrant a domain BaseError class\n throw new Error('DataTable parts must be used inside a DataTable');\n }\n return context;\n};\n\nexport { DataTableContext, useDataTableContext };\nexport type { DataTableContextValue };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, useMemo } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { DataTableContext } from './data-table-context';\nimport type { DataTableInstance } from './use-data-table';\n\n/**\n * Props for {@link DataTable}: the `table` from `useDataTable`, an optional `fill` layout mode, and any `div` props.\n *\n * @example\n * ```tsx\n * const props: DataTableProps<User> = { table: dataTable, fill: true };\n * ```\n * @see DataTable\n * @see useDataTable\n */\ntype DataTableProps<TData> = ComponentProps<'div'> & {\n /** Stretch to the height the parent gives it, with a pinned header and one scrollbar. The parent must be a flex column with a bounded height. */\n fill?: boolean;\n /** The result of `useDataTable`. */\n table: DataTableInstance<TData>;\n};\n\n/**\n * Root of a data table. Holds the table state for `DataTableContent`, `DataTablePagination` and the other parts.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({ columns, data });\n *\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableColumnVisibility />\n * </DataTableToolbar>\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered data table root element.\n * @see useDataTable\n * @see DataTableContent\n * @see DataTableToolbar\n */\nconst DataTable = <TData,>({\n children,\n className,\n fill = false,\n table,\n ...props\n}: DataTableProps<TData>): ReactElement => {\n const contextValue = useMemo(() => ({ ...table, fill }), [table, fill]);\n\n return (\n <DataTableContext.Provider value={contextValue}>\n <div\n data-slot=\"data-table\"\n data-fill={fill || undefined}\n className={cn(\n 'flex min-w-0 flex-col gap-3',\n fill && 'min-h-0 flex-1',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </DataTableContext.Provider>\n );\n};\n\n/**\n * Row above the table for search, filters and actions.\n *\n * @example\n * ```tsx\n * <DataTableToolbar>\n * <Input placeholder=\"Search users\" />\n * <DataTableColumnVisibility />\n * </DataTableToolbar>\n * ```\n * @returns The rendered toolbar element.\n * @see DataTable\n * @see DataTableColumnVisibility\n */\nconst DataTableToolbar = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"data-table-toolbar\"\n className={cn('flex flex-wrap items-center gap-2', className)}\n {...props}\n />\n);\n\nexport { DataTable, DataTableToolbar };\nexport type { DataTableProps };\n","import type { Column } from '@tanstack/react-table';\n\n/**\n * Read a column the way users see it, so menus and handles name it: its `meta.label`, then a plain-text header, then its id.\n */\nconst getColumnLabel = <TData>(column: Column<TData, unknown>): string => {\n const { header, meta } = column.columnDef;\n const fallback = typeof header === 'string' ? header : column.id;\n // meta and its label are optional; a column without them falls back to its header or id.\n return meta?.label ?? fallback;\n};\n\nexport { getColumnLabel };\n","'use client';\n\nimport { FilterIcon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport type { Column, Table } from '@tanstack/react-table';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button/button';\nimport { Checkbox } from '../checkbox/checkbox';\nimport { Input } from '../input/input';\nimport { Label } from '../label/label';\nimport { Popover, PopoverContent, PopoverTrigger } from '../popover/popover';\nimport { useDataTableContext } from './data-table-context';\nimport { getColumnLabel } from './get-column-label';\n\nconst TEXT_FILTER_PLACEHOLDER = 'Contains';\nconst EMPTY_OPTIONS_TEXT = 'No values';\n\n/**\n * Turn cell values into checklist options. List-valued cells count as one value each in TanStack's facets, so their items are\n * spread out first: a tags column then offers each tag rather than each combination. Empty values offer nothing to check.\n */\nconst toOptions = ({ values }: { values: unknown[] }): string[] => {\n const items = values\n .flatMap((value): unknown[] => (Array.isArray(value) ? value : [value]))\n .filter((value) => value !== undefined && value !== null && value !== '')\n .map(String);\n return [...new Set(items)].sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));\n};\n\n/**\n * The values a `values` filter offers: the column's `filterOptions`, else the values in the data.\n * Client filtering reads TanStack's facets, which leave out the column's own filter so unchecked values stay offered.\n * Manual filtering has no facets, so it falls back to the values in the rows currently loaded.\n * Checked values stay listed even when other filters hide every row that holds them, so they can be unchecked.\n */\nconst getFilterOptions = <TData,>({\n column,\n selected,\n table,\n}: {\n column: Column<TData, unknown>;\n selected: string[];\n table: Table<TData>;\n}): string[] => {\n const filterOptions = column.columnDef.meta?.filterOptions;\n if (filterOptions) return filterOptions;\n const values = table.options.manualFiltering\n ? table.getCoreRowModel().flatRows.map((row) => row.getValue(column.id))\n : [...column.getFacetedUniqueValues().keys()];\n return toOptions({ values: [...values, ...selected] });\n};\n\n/** The checklist of a `values` filter. The checked values are the filter value; unchecking the last one removes the filter. */\nconst DataTableValuesFilter = <TData,>({\n column,\n filterValue,\n}: {\n column: Column<TData, unknown>;\n filterValue: unknown;\n}): ReactElement => {\n const { table } = useDataTableContext();\n const selected = Array.isArray(filterValue) ? filterValue.map(String) : [];\n const options = getFilterOptions({ column, selected, table });\n const toggle = ({ checked, option }: { checked: boolean; option: string }) => {\n const next = checked ? [...selected, option] : selected.filter((value) => value !== option);\n column.setFilterValue(next.length > 0 ? next : undefined);\n };\n\n if (options.length === 0) {\n return <p className=\"text-sm text-muted-foreground\">{EMPTY_OPTIONS_TEXT}</p>;\n }\n\n return (\n // The list scrolls, which clips anything drawn outside it; the padding leaves room for the checkbox ring and focus ring, and the negative margin keeps the alignment.\n <div data-slot=\"data-table-column-filter-options\" className=\"-m-1 flex max-h-60 flex-col gap-2 overflow-y-auto p-1\">\n {options.map((option) => (\n <Label key={option} className=\"flex items-center gap-2 text-sm font-normal\">\n <Checkbox\n checked={selected.includes(option)}\n onCheckedChange={(checked) => toggle({ checked: checked === true, option })}\n />\n {option}\n </Label>\n ))}\n </div>\n );\n};\n\n/**\n * Props for {@link DataTableColumnFilter}.\n *\n * @example\n * ```tsx\n * const props: DataTableColumnFilterProps<User> = { column: header.column };\n * ```\n * @see DataTableColumnFilter\n * @see DataTableActiveFilters\n */\ntype DataTableColumnFilterProps<TData> = {\n className?: string;\n /** The column to filter. It needs `meta.filter`, and `filtering` turned on in `useDataTable`. */\n column: Column<TData, unknown>;\n};\n\n/**\n * A filter button that opens a column's filter: a text field for `meta.filter: 'text'`, or a checklist for `meta.filter: 'values'`.\n * `DataTableContent` already adds it to each filterable header; render it yourself only in a header you build without `DataTableContent`.\n * The checklist offers `meta.filterOptions`, else the values in the data. With manual filtering and no `filterOptions`,\n * it can only offer the values in the rows currently loaded, so pass `filterOptions` when the server holds more.\n *\n * @example\n * ```tsx\n * const columns: ColumnDef<User>[] = [\n * { accessorKey: 'role', header: 'Role', meta: { filter: 'values' } },\n * ];\n *\n * // In a header row you render yourself:\n * <th>\n * Role\n * <DataTableColumnFilter column={header.column} />\n * </th>\n * ```\n * @returns The rendered filter button and its popover.\n * @see DataTableContent\n * @see DataTableActiveFilters\n * @see DataTableSearch\n */\nconst DataTableColumnFilter = <TData,>({\n className,\n column,\n}: DataTableColumnFilterProps<TData>): ReactElement => {\n const label = getColumnLabel(column);\n const isFiltered = column.getIsFiltered();\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n // The dot and colour are visual only, so the name carries the filtered state too.\n aria-label={isFiltered ? `Filter ${label}, filtered` : `Filter ${label}`}\n data-slot=\"data-table-column-filter\"\n data-filtered={isFiltered || undefined}\n size=\"icon-xs\"\n variant=\"ghost\"\n // A smaller hit area than the button's default keeps it off the sort button beside it.\n className={cn('ms-1 align-middle before:-inset-1 data-[filtered=true]:text-foreground', className)}\n >\n <HugeiconsIcon icon={FilterIcon} aria-hidden=\"true\" />\n {isFiltered && (\n <span aria-hidden=\"true\" className=\"absolute end-0.5 top-0.5 size-1.5 rounded-full bg-[var(--action)]\" />\n )}\n </Button>\n </PopoverTrigger>\n <DataTableColumnFilterContent column={column} />\n </Popover>\n );\n};\n\n/** The body of a column's filter popover, shared by the header filter button and the active-filter chips. */\nconst DataTableColumnFilterContent = <TData,>({\n column,\n}: {\n column: Column<TData, unknown>;\n}): ReactElement => {\n const label = getColumnLabel(column);\n const filterValue = column.getFilterValue();\n\n return (\n <PopoverContent aria-label={`Filter ${label}`} align=\"start\" className=\"flex w-56 flex-col gap-3 p-3\">\n {column.columnDef.meta?.filter === 'values' ? (\n <DataTableValuesFilter column={column} filterValue={filterValue} />\n ) : (\n <Input\n aria-label={`Filter ${label}`}\n placeholder={TEXT_FILTER_PLACEHOLDER}\n value={typeof filterValue === 'string' ? filterValue : ''}\n onChange={(event) => column.setFilterValue(event.target.value)}\n />\n )}\n {column.getIsFiltered() && (\n // The negative margin runs the divider edge to edge across the popover's padding.\n <div\n data-slot=\"data-table-column-filter-footer\"\n className=\"-mx-3 flex justify-end border-t border-[var(--border-divider)] px-3 pt-3\"\n >\n <Button size=\"sm\" variant=\"secondary\" onClick={() => column.setFilterValue(undefined)}>\n Clear\n </Button>\n </div>\n )}\n </PopoverContent>\n );\n};\n\nexport { DataTableColumnFilter, DataTableColumnFilterContent };\nexport type { DataTableColumnFilterProps };\n","'use client';\n\nimport { ArrowDown01Icon, Cancel01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport type { Column } from '@tanstack/react-table';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button/button';\nimport { Popover, PopoverTrigger } from '../popover/popover';\nimport { DataTableColumnFilterContent } from './data-table-column-filter';\nimport { useDataTableContext } from './data-table-context';\nimport { getColumnLabel } from './get-column-label';\n\n/** A `values` filter holds the checked values; a `text` filter holds the text. */\nconst toFilterValues = (value: unknown): string[] =>\n Array.isArray(value) ? value.map(String) : [String(value)];\n\n// Past this many values the chip shows a count for the rest, so a long selection doesn't stretch the toolbar.\nconst MAX_SHOWN_VALUES = 2;\n\n// The chip pads its controls by 4px, so their 4px corners sit concentric inside its 8px corners.\n// Only color and background transition, so hovering never shifts layout.\nconst CHIP_CONTROL =\n 'inline-flex h-6 items-center rounded-[4px] outline-none transition-[color,background-color] duration-150 ease-out hover:bg-[var(--overlay-hover)] focus-visible:ring-2 focus-visible:ring-[var(--ring)]';\n\n// A chip reads like Clerk's: remove first, then the column name, then the value, which reopens the column's filter.\nconst DataTableFilterChip = ({\n column,\n label,\n onRemove,\n removeLabel,\n values,\n}: {\n // Mixed column value types make any the only shared column type.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n column?: Column<any, unknown>;\n label: string;\n onRemove: () => void;\n removeLabel: string;\n values: string[];\n}): ReactElement => {\n const fullValue = values.join(', ');\n const hiddenCount = values.length - MAX_SHOWN_VALUES;\n const shownValue = (\n <>\n {values.slice(0, MAX_SHOWN_VALUES).join(', ')}\n {hiddenCount > 0 && <span className=\"ms-1 text-muted-foreground\">+{hiddenCount}</span>}\n </>\n );\n\n return (\n // Outlined like a secondary button, so active filters read as controls without a heavy fill.\n <span\n data-slot=\"data-table-filter-chip\"\n title={hiddenCount > 0 ? fullValue : undefined}\n className=\"inline-flex h-8 items-center rounded-md bg-white p-1 text-[13px] shadow-[var(--shadow-secondary)] dark:bg-input/30\"\n >\n <button\n type=\"button\"\n aria-label={removeLabel}\n onClick={onRemove}\n className={cn(CHIP_CONTROL, 'w-6 justify-center text-muted-foreground/70 hover:text-foreground')}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={12} strokeWidth={2} aria-hidden=\"true\" />\n </button>\n {/* The hidden colon keeps the name and value one phrase for screen readers. */}\n <span className=\"ps-1 pe-2 text-muted-foreground\">\n {label}\n <span className=\"sr-only\">: </span>\n </span>\n {/* A short tick separates name from value without splitting the chip in two. */}\n <span aria-hidden=\"true\" className=\"h-4 w-px bg-[var(--border-divider)]\" />\n {column ? (\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label={`Change ${label} filter: ${fullValue}`}\n className={cn(CHIP_CONTROL, 'ms-1 gap-1 ps-1.5 pe-1 font-medium text-[var(--action)]')}\n >\n {shownValue}\n <HugeiconsIcon icon={ArrowDown01Icon} size={14} aria-hidden=\"true\" className=\"opacity-60\" />\n </button>\n </PopoverTrigger>\n <DataTableColumnFilterContent column={column} />\n </Popover>\n ) : (\n <span className=\"ps-2 pe-1.5 font-medium text-[var(--action)]\">{shownValue}</span>\n )}\n </span>\n );\n};\n\n/**\n * Props for {@link DataTableActiveFilters}.\n *\n * @example\n * ```tsx\n * const props: DataTableActiveFiltersProps = { className: 'px-4' };\n * ```\n * @see DataTableActiveFilters\n * @see DataTableColumnFilter\n */\ntype DataTableActiveFiltersProps = {\n className?: string;\n};\n\n/**\n * One chip per active filter, each with a button that removes it, plus a button that clears them all.\n * The search text gets a chip too. Renders nothing while no filter is active.\n *\n * @example\n * ```tsx\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableSearch />\n * </DataTableToolbar>\n * <DataTableActiveFilters />\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered filter chips, or nothing when no filter is active.\n * @see DataTableColumnFilter\n * @see DataTableSearch\n * @see useDataTable\n */\nconst DataTableActiveFilters = ({\n className,\n}: DataTableActiveFiltersProps): ReactElement | null => {\n const { table } = useDataTableContext();\n const { columnFilters, globalFilter } = table.getState();\n // The global filter state is untyped in TanStack; useDataTable keeps it a string.\n const search = typeof globalFilter === 'string' ? globalFilter : '';\n if (columnFilters.length === 0 && search === '') return null;\n\n // Both halves change in one tick; useDataTable resolves each against the latest filter state, so neither undoes the other.\n const clearAll = () => {\n table.setColumnFilters([]);\n table.setGlobalFilter('');\n };\n\n return (\n // A fieldset is a native group, named by its label; min-w-0 drops its default min-content width so the chips can wrap.\n <fieldset\n aria-label=\"Active filters\"\n data-slot=\"data-table-active-filters\"\n className={cn('flex min-w-0 flex-wrap items-center gap-2', className)}\n >\n {search !== '' && (\n <DataTableFilterChip\n label=\"Search\"\n onRemove={() => table.setGlobalFilter('')}\n removeLabel=\"Remove search filter\"\n values={[search]}\n />\n )}\n {columnFilters.map(({ id, value }) => {\n // A filter can name a column the app has since removed; its id still identifies it.\n // getColumn logs an error for a missing id, so look the column up quietly.\n const column = table.getAllFlatColumns().find((candidate) => candidate.id === id);\n const label = column ? getColumnLabel(column) : id;\n return (\n <DataTableFilterChip\n key={id}\n // Only columns with a filter UI can reopen it from the chip.\n column={column?.columnDef.meta?.filter ? column : undefined}\n label={label}\n onRemove={() => table.setColumnFilters((old) => old.filter((filter) => filter.id !== id))}\n removeLabel={`Remove ${label} filter`}\n values={toFilterValues(value)}\n />\n );\n })}\n <Button className=\"text-muted-foreground hover:text-foreground\" variant=\"ghost\" onClick={clearAll}>\n Clear filters\n </Button>\n </fieldset>\n );\n};\n\nexport { DataTableActiveFilters };\nexport type { DataTableActiveFiltersProps };\n","'use client';\n\nimport { ArrowDown01Icon, LayoutThreeColumnIcon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type ReactElement } from 'react';\nimport { CheckboxItem } from '@radix-ui/react-dropdown-menu';\n\nimport { Button } from '../button/button';\nimport { Checkbox } from '../checkbox/checkbox';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from '../dropdown-menu/dropdown-menu';\nimport { useDataTableContext } from './data-table-context';\nimport { getColumnLabel } from './get-column-label';\n\n/**\n * Props for {@link DataTableColumnVisibility}.\n *\n * @example\n * ```tsx\n * const props: DataTableColumnVisibilityProps = { label: 'Fields' };\n * ```\n * @see DataTableColumnVisibility\n * @see useDataTable\n */\ntype DataTableColumnVisibilityProps = {\n className?: string;\n /** Menu trigger text. */\n label?: string;\n};\n\n/**\n * Lets people choose which columns are shown, from a menu with a checkbox per column.\n *\n * @example\n * ```tsx\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableColumnVisibility label=\"Columns\" />\n * </DataTableToolbar>\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered column picker menu.\n * @see DataTable\n * @see DataTableToolbar\n * @see useDataTable\n */\nconst DataTableColumnVisibility = ({\n className,\n label = 'Columns',\n}: DataTableColumnVisibilityProps): ReactElement => {\n const { table } = useDataTableContext();\n const columns = table\n .getAllLeafColumns()\n .filter((column) => column.getCanHide());\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n data-slot=\"data-table-column-visibility\"\n className={className}\n variant=\"outline\"\n >\n <HugeiconsIcon icon={LayoutThreeColumnIcon} aria-hidden=\"true\" />\n {label}\n <HugeiconsIcon icon={ArrowDown01Icon} aria-hidden=\"true\" />\n </Button>\n </DropdownMenuTrigger>\n {/* The button sits beside the search, so the menu opens along its start edge. */}\n <DropdownMenuContent align=\"start\">\n {columns.map((column) => {\n const visible = column.getIsVisible();\n return (\n // The shared checkbox item draws a bare check mark; this menu shows a droplet checkbox instead, so it builds its own item.\n <CheckboxItem\n key={column.id}\n data-slot=\"data-table-column-visibility-item\"\n className=\"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\"\n checked={visible}\n onCheckedChange={(checked) =>\n column.toggleVisibility(checked === true)\n }\n // Keep the menu open so several columns can be toggled in one go.\n onSelect={(event) => event.preventDefault()}\n >\n {/* Drawn only: the item is the menuitemcheckbox and takes the click, so the checkbox stays out of the tab order and the accessibility tree. */}\n {/* Not asChild: Checkbox renders its indicator as the root's children, which would replace a child passed here. */}\n <Checkbox\n checked={visible}\n tabIndex={-1}\n aria-hidden=\"true\"\n className=\"pointer-events-none\"\n />\n {getColumnLabel(column)}\n </CheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n\nexport { DataTableColumnVisibility };\nexport type { DataTableColumnVisibilityProps };\n","import { type ComponentType, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport type EmptyStateProps = {\n action?: ReactNode;\n className?: string;\n description?: string;\n icon: ComponentType<{ className?: string; size?: number }>;\n title: string;\n};\n\nexport const EmptyState = ({\n icon: Icon,\n title,\n description,\n action,\n className,\n}: EmptyStateProps): ReactElement => {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center py-16 px-8 text-center',\n className\n )}\n >\n <div className=\"flex size-12 items-center justify-center rounded-xl bg-muted mb-4\">\n <Icon className=\"size-6 text-muted-foreground\" />\n </div>\n <h3 className=\"text-sm font-semibold\">{title}</h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 max-w-sm\">\n {description}\n </p>\n )}\n {action && <div className=\"mt-4\">{action}</div>}\n </div>\n );\n};\n","import { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { EmptyState } from '../../empty-state/empty-state';\nimport type { EmptyStateProps } from '../../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { TableCell, TableRow } from '../table/table';\n\n/** Varied bar widths read as real content rather than one repeated block. */\nconst PLACEHOLDER_BARS = ['w-28', 'w-14', 'w-24', 'w-36', 'w-24', 'w-14'];\nconst GHOST_ROW_COUNT = 6;\n/** Placeholder, group and detail rows are not interactive, so they must not take the row hover fill. */\nconst STATIC_ROW = 'hover:bg-transparent hover:[--table-row-overlay:transparent]';\n\nconst getBarWidth = (columnIndex: number): string =>\n PLACEHOLDER_BARS[columnIndex % PLACEHOLDER_BARS.length];\n\ntype DataTableSkeletonRowsProps = {\n columnCount: number;\n rowCount: number;\n};\n\n/** Skeleton rows shown while data loads. Only the first bar is announced, so screen readers hear \"Loading\" once. */\nconst DataTableSkeletonRows = ({\n columnCount,\n rowCount,\n}: DataTableSkeletonRowsProps): ReactElement => (\n <>\n {Array.from({ length: rowCount }, (_, rowIndex) => (\n <TableRow\n key={rowIndex}\n data-slot=\"data-table-skeleton-row\"\n className={STATIC_ROW}\n >\n {Array.from({ length: columnCount }, (_, columnIndex) => (\n <TableCell key={columnIndex}>\n <Skeleton\n aria-hidden={rowIndex > 0 || columnIndex > 0 || undefined}\n className={cn('h-4 max-w-full', getBarWidth(columnIndex))}\n />\n </TableCell>\n ))}\n </TableRow>\n ))}\n </>\n);\n\ntype DataTableEmptyRowProps = {\n /** An action under the title, for example a button that clears the filters. */\n action?: ReactNode;\n columnCount: number;\n icon: EmptyStateProps['icon'];\n title: string;\n};\n\n/** Ghost rows keep the table's shape behind an icon and title. */\nconst DataTableEmptyRow = ({\n action,\n columnCount,\n icon,\n title,\n}: DataTableEmptyRowProps): ReactElement => (\n <TableRow data-slot=\"data-table-empty\" className={STATIC_ROW}>\n <TableCell colSpan={columnCount} className=\"p-0 whitespace-normal\">\n <div className=\"grid\">\n <div\n aria-hidden=\"true\"\n className=\"pointer-events-none col-start-1 row-start-1 select-none opacity-45 [mask-image:radial-gradient(ellipse_at_center,transparent_48%,black_88%)]\"\n >\n {Array.from({ length: GHOST_ROW_COUNT }, (_, rowIndex) => (\n <div\n key={rowIndex}\n data-slot=\"data-table-ghost-row\"\n className=\"grid items-center border-b border-[var(--border-divider)] py-3.5 last:border-b-0\"\n style={{\n gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))`,\n }}\n >\n {Array.from({ length: columnCount }, (_, columnIndex) => (\n <span key={columnIndex} className=\"px-4\">\n <span\n className={cn(\n 'block h-2.5 max-w-full rounded-full bg-[var(--bg-accented)]',\n getBarWidth(columnIndex)\n )}\n />\n </span>\n ))}\n </div>\n ))}\n </div>\n {/* The ghost rows scroll with a wide table; 100cqw of the tray keeps the message centered in what is visible. */}\n <div className=\"sticky start-0 col-start-1 row-start-1 flex w-[100cqw] items-center justify-center justify-self-start\">\n <EmptyState action={action} className=\"py-0\" icon={icon} title={title} />\n </div>\n </div>\n </TableCell>\n </TableRow>\n);\n\nexport { DataTableEmptyRow, DataTableSkeletonRows, STATIC_ROW };\n","'use client';\n\nimport { ArrowRight01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n/** A right-pointing chevron that turns to point down while its group is open. */\nconst ExpandChevron = ({ isOpen }: { isOpen: boolean }): ReactElement => (\n <HugeiconsIcon\n icon={ArrowRight01Icon}\n aria-hidden=\"true\"\n className={cn(\n 'transition-transform duration-150 motion-reduce:transition-none',\n isOpen && 'rotate-90'\n )}\n />\n);\n\nexport { ExpandChevron };\n","import type { Column } from '@tanstack/react-table';\nimport type { CSSProperties } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype PinnedCellProps = {\n className?: string;\n 'data-pinned'?: 'left' | 'right';\n style?: CSSProperties;\n};\n\n/** Pinned cells need an opaque base so scrolling text cannot show through; the body overlay still follows row hover and selection. */\nconst PINNED_BACKGROUND = {\n body: 'bg-card bg-[image:linear-gradient(var(--table-row-overlay,transparent),var(--table-row-overlay,transparent))]',\n header: 'bg-[var(--tray-chrome)]',\n} as const;\n\n/** A 1px divider marks where pinned columns meet the scrolling ones. */\nconst PINNED_EDGE = {\n left: 'shadow-[inset_-1px_0_0_var(--border-divider)]',\n right: 'shadow-[inset_1px_0_0_var(--border-divider)]',\n} as const;\n\n/** Sticky position, background and edge divider for a cell in a pinned column. */\nconst getPinnedCellProps = <TData>({\n column,\n section,\n}: {\n column: Column<TData, unknown>;\n section: 'body' | 'header';\n}): PinnedCellProps => {\n const side = column.getIsPinned();\n if (!side) return {};\n\n const isEdge =\n side === 'left'\n ? column.getIsLastColumn('left')\n : column.getIsFirstColumn('right');\n\n return {\n className: cn(\n 'sticky z-10',\n PINNED_BACKGROUND[section],\n isEdge && PINNED_EDGE[side]\n ),\n 'data-pinned': side,\n style:\n side === 'left'\n ? { insetInlineStart: column.getStart('left') }\n : { insetInlineEnd: column.getAfter('right') },\n };\n};\n\nexport { getPinnedCellProps };\nexport type { PinnedCellProps };\n","'use client';\n\nimport type { CellContext, ColumnDef, HeaderContext, Table } from '@tanstack/react-table';\nimport { type ReactElement } from 'react';\n\nimport { Checkbox } from '../checkbox/checkbox';\n\n/**\n * Id of the checkbox column added by `selectionColumn`. Use it to find that column, for example when pinning it to the start edge.\n *\n * @example\n * ```tsx\n * const columnPinning = { initial: { left: [SELECTION_COLUMN_ID] } };\n * ```\n * @see selectionColumn\n * @see useDataTable\n */\nconst SELECTION_COLUMN_ID = 'select';\n/** Fixed width in px; DataTableContent sizes headers from it when resizing or pinning is on. */\nconst SELECTION_COLUMN_SIZE = 40;\n\nconst getAllRowsCheckedState = <TData,>(\n table: Table<TData>\n): boolean | 'indeterminate' => {\n if (table.getIsAllPageRowsSelected()) return true;\n return table.getIsSomePageRowsSelected() ? 'indeterminate' : false;\n};\n\n// Module-level renderers keep one identity however often selectionColumn() is called.\n// flexRender treats a new function as a new component, which would remount every checkbox and replay its check animation on each selection change.\nconst SelectionCell = <TData,>({ row }: CellContext<TData, unknown>): ReactElement => (\n <Checkbox\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n disabled={!row.getCanSelect()}\n onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n />\n);\n\nconst SelectionHeader = <TData,>({ table }: HeaderContext<TData, unknown>): ReactElement => (\n <Checkbox\n aria-label=\"Select all rows\"\n checked={getAllRowsCheckedState(table)}\n onCheckedChange={(checked) => table.toggleAllPageRowsSelected(checked === true)}\n />\n);\n\n/**\n * A checkbox column for row selection. Put it first in `columns` and pass `selection` to `useDataTable`.\n *\n * @example\n * const columns = [selectionColumn<User>(), { accessorKey: 'name', header: 'Name' }];\n * @returns A column definition that renders a checkbox for each row and a select-all checkbox in the header.\n * @see SELECTION_COLUMN_ID\n * @see useDataTable\n */\nconst selectionColumn = <TData,>(): ColumnDef<TData> => ({\n cell: SelectionCell,\n enableHiding: false,\n enableResizing: false,\n enableSorting: false,\n header: SelectionHeader,\n id: SELECTION_COLUMN_ID,\n size: SELECTION_COLUMN_SIZE,\n});\n\nexport { SELECTION_COLUMN_ID, selectionColumn };\n","'use client';\n\nimport { type Row, flexRender } from '@tanstack/react-table';\nimport { type ComponentPropsWithoutRef, type ReactElement, type Ref } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { TableCell, TableRow } from '../table/table';\nimport { STATIC_ROW } from './data-table-placeholder-rows';\nimport { ExpandChevron } from './expand-chevron';\nimport { getPinnedCellProps } from './get-pinned-cell-props';\nimport { SELECTION_COLUMN_ID } from './selection-column';\n\n/** Fixed layout cells clip and truncate, so a narrowed column cannot spill into its neighbour. The checkbox column never needs it. */\nconst FIXED_LAYOUT_CELL_CLASS = 'overflow-hidden text-ellipsis';\n/**\n * Pins full-width row content to the visible part of a horizontally scrolling table. The single spanning cell has no\n * pinned part of its own, so without this the content scrolls off to the start. 100cqw is the tray's width, since the\n * tray is an inline-size container. The cell drops its padding and this element carries it, so the content is exactly\n * the visible width and never widens the table.\n */\nconst STICKY_ROW_CONTENT = 'sticky start-0 w-[100cqw] px-4 py-2.5';\n/** Shown for a group whose rows have no value in the grouped column. */\nconst EMPTY_GROUP_LABEL = 'None';\n\n// Mixed column value types make any the only shared row type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyRow = Row<any>;\n\n/** The checkbox column holds one control, so it stays narrow and never clips. */\nconst isControlColumn = (columnId: string): boolean => columnId === SELECTION_COLUMN_ID;\n\n/** Rows inside groups step in by 1.25rem per level from the cell's own 1rem padding. */\nconst getIndent = (depth: number): string => `calc(1rem + ${depth} * 1.25rem)`;\n\nconst getGroupLabel = ({\n groupingColumnId,\n row,\n}: {\n groupingColumnId: string;\n row: AnyRow;\n}): string => {\n const value = row.getGroupingValue(groupingColumnId);\n const label =\n value === undefined || value === null || value === ''\n ? EMPTY_GROUP_LABEL\n : String(value);\n // Leaf rows include the sub-group rows of nested grouping; count only the data rows.\n const count = row.getLeafRows().filter((leaf) => !leaf.getIsGrouped()).length;\n return `${label} (${count})`;\n};\n\n/**\n * Lands on the row's `<tr>`, for the virtualizer to measure it. A named prop rather than `ref`, because on React 18\n * a plain function component never receives `ref`.\n */\ntype RowRef = Ref<HTMLTableRowElement> | undefined;\n\ntype DataTableRowProps = ComponentPropsWithoutRef<'tr'> & {\n hasFixedLayout: boolean;\n row: AnyRow;\n rowRef?: RowRef;\n};\n\nconst DataTableRow = ({\n hasFixedLayout,\n row,\n rowRef,\n ...props\n}: DataTableRowProps): ReactElement => {\n const cells = row.getVisibleCells();\n // Rows inside groups indent their first data cell, so the nesting reads past the checkbox column.\n const indentedCellId =\n row.depth > 0\n ? cells.find((cell) => !isControlColumn(cell.column.id))?.id\n : undefined;\n\n return (\n <TableRow\n ref={rowRef}\n data-state={row.getIsSelected() ? 'selected' : undefined}\n {...props}\n >\n {cells.map((cell) => {\n const pinned = getPinnedCellProps({\n column: cell.column,\n section: 'body',\n });\n return (\n <TableCell\n key={cell.id}\n data-pinned={pinned['data-pinned']}\n className={cn(\n hasFixedLayout &&\n !isControlColumn(cell.column.id) &&\n FIXED_LAYOUT_CELL_CLASS,\n pinned.className\n )}\n style={\n cell.id === indentedCellId\n ? { ...pinned.style, paddingInlineStart: getIndent(row.depth) }\n : pinned.style\n }\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </TableCell>\n );\n })}\n </TableRow>\n );\n};\n\n/** One full-width row naming the group and how many rows it holds, with a button that opens or closes it. */\nconst DataTableGroupRow = ({\n columnCount,\n groupingColumnId,\n row,\n rowRef,\n ...props\n}: ComponentPropsWithoutRef<'tr'> & {\n columnCount: number;\n groupingColumnId: string;\n row: AnyRow;\n rowRef?: RowRef;\n}): ReactElement => {\n const isOpen = row.getIsExpanded();\n return (\n <TableRow\n ref={rowRef}\n data-slot=\"data-table-group-row\"\n className={STATIC_ROW}\n {...props}\n >\n <TableCell colSpan={columnCount} className=\"p-0 font-medium\">\n {/* Sticky so the label and its toggle stay in view when the table scrolls sideways; its padding leaves room for the focus ring. */}\n <div\n className={STICKY_ROW_CONTENT}\n style={row.depth > 0 ? { paddingInlineStart: getIndent(row.depth) } : undefined}\n >\n {/* The label sits inside the button, so the whole label opens the group and names the button. */}\n <button\n type=\"button\"\n aria-expanded={isOpen}\n onClick={row.getToggleExpandedHandler()}\n className=\"-mx-1.5 inline-flex items-center gap-1.5 rounded-md px-1.5 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] [&_svg]:size-3.5\"\n >\n <ExpandChevron isOpen={isOpen} />\n {getGroupLabel({ groupingColumnId, row })}\n </button>\n </div>\n </TableCell>\n </TableRow>\n );\n};\n\ntype DataTableBodyRowProps = ComponentPropsWithoutRef<'tr'> & {\n columnCount: number;\n hasFixedLayout: boolean;\n row: AnyRow;\n rowRef?: RowRef;\n};\n\n/** One table row, as a group header or a data row. Row props and `rowRef` land on its `<tr>`. */\nconst DataTableBodyRow = ({\n columnCount,\n hasFixedLayout,\n row,\n ...props\n}: DataTableBodyRowProps): ReactElement => {\n const { groupingColumnId } = row;\n // TanStack marks a row as grouped exactly when it has a grouping column id, so reading the id is the same check, typed.\n if (groupingColumnId) {\n return (\n <DataTableGroupRow\n columnCount={columnCount}\n groupingColumnId={groupingColumnId}\n row={row}\n {...props}\n />\n );\n }\n return <DataTableRow hasFixedLayout={hasFixedLayout} row={row} {...props} />;\n};\n\nexport { DataTableBodyRow, FIXED_LAYOUT_CELL_CLASS, isControlColumn };\n","'use client';\n\nimport { ArrowDown01Icon, ArrowUp01Icon, Table01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type Header, flexRender } from '@tanstack/react-table';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport { type ComponentProps, type KeyboardEvent, type ReactElement, type ReactNode, useCallback, useRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport type { EmptyStateProps } from '../../empty-state/empty-state';\nimport { Button } from '../button/button';\nimport { Table, TableBody, TableHead, TableHeader, TableRow } from '../table/table';\nimport { DataTableColumnFilter } from './data-table-column-filter';\nimport { useDataTableContext } from './data-table-context';\nimport { DataTableEmptyRow, DataTableSkeletonRows } from './data-table-placeholder-rows';\nimport {\n DataTableBodyRow,\n FIXED_LAYOUT_CELL_CLASS,\n isControlColumn,\n} from './data-table-rows';\nimport { getColumnLabel } from './get-column-label';\nimport { getPinnedCellProps } from './get-pinned-cell-props';\n\nconst DEFAULT_EMPTY_TITLE = 'No results';\nconst DEFAULT_EMPTY_FILTERED_TITLE = 'No matching results';\nconst DEFAULT_LOADING_ROW_COUNT = 5;\nconst ARIA_SORT = { asc: 'ascending', desc: 'descending' } as const;\nconst SORT_ICON = { asc: ArrowUp01Icon, desc: ArrowDown01Icon } as const;\n/** Arrow keys resize in 16px steps, matching the 4px spacing grid. */\nconst RESIZE_STEP: Partial<Record<string, number>> = { ArrowLeft: -16, ArrowRight: 16 };\n/** TanStack's default minimum column width. */\nconst MIN_COLUMN_SIZE = 20;\n/** TanStack leaves columns unbounded; screen readers get a usable range instead. */\nconst MAX_COLUMN_SIZE = 1000;\n/** Rows rendered beyond each edge of the view when virtualization sets no overscan. */\nconst DEFAULT_OVERSCAN = 8;\n\nconst DefaultEmptyIcon: EmptyStateProps['icon'] = ({ className, size }) => (\n <HugeiconsIcon className={className} icon={Table01Icon} size={size} />\n);\n\n// Mixed column value types make any the only shared header type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyHeader = Header<any, unknown>;\n\nconst getMaxColumnSize = (maxSize: number | undefined): number =>\n maxSize === undefined || maxSize === Number.MAX_SAFE_INTEGER ? MAX_COLUMN_SIZE : maxSize;\n\nconst DataTableResizeHandle = ({ header }: { header: AnyHeader }): ReactElement => {\n const { column } = header;\n const { table } = header.getContext();\n const size = column.getSize();\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const step = RESIZE_STEP[event.key];\n if (!step) return;\n event.preventDefault();\n table.setColumnSizing((sizing) => ({ ...sizing, [column.id]: size + step }));\n };\n const resize = header.getResizeHandler();\n\n return (\n <div\n role=\"separator\"\n aria-label={`Resize ${getColumnLabel(column)}`}\n aria-orientation=\"vertical\"\n aria-valuemax={getMaxColumnSize(column.columnDef.maxSize)}\n aria-valuemin={column.columnDef.minSize ?? MIN_COLUMN_SIZE}\n aria-valuenow={size}\n aria-valuetext={`${size} pixels`}\n tabIndex={0}\n data-slot=\"data-table-resize-handle\"\n data-resizing={column.getIsResizing() || undefined}\n onDoubleClick={() => column.resetSize()}\n onKeyDown={handleKeyDown}\n onMouseDown={resize}\n onTouchStart={resize}\n className=\"absolute inset-y-0 end-0 w-2 cursor-col-resize touch-none select-none outline-none after:absolute after:inset-y-2 after:end-0 after:w-px after:bg-[var(--border-divider)] after:opacity-0 hover:after:opacity-100 focus-visible:after:bg-[var(--ring)] focus-visible:after:opacity-100 data-[resizing=true]:after:opacity-100\"\n />\n );\n};\n\nconst DataTableHeadCell = ({\n header,\n hasFixedLayout,\n}: {\n hasFixedLayout: boolean;\n header: AnyHeader;\n}): ReactElement => {\n const { column } = header;\n const sorted = column.getIsSorted();\n const sortIndex = column.getSortIndex();\n // With several sort rules, each sorted header shows its priority; one rule needs no number.\n const isMultiSort = header.getContext().table.getState().sorting.length > 1;\n const sortPriority = sorted && isMultiSort ? sortIndex + 1 : undefined;\n const pinned = getPinnedCellProps({ column, section: 'header' });\n const content = header.isPlaceholder\n ? null\n : flexRender(column.columnDef.header, header.getContext());\n\n return (\n <TableHead\n colSpan={header.colSpan}\n // aria-sort belongs on the primary sort column only.\n aria-sort={sorted && sortIndex === 0 ? ARIA_SORT[sorted] : undefined}\n data-pinned={pinned['data-pinned']}\n className={cn(\n // The resize handle is absolutely positioned against its header cell.\n column.getCanResize() && 'relative',\n // Auto layout would hand the checkbox and expand columns spare width; w-px shrinks them to their content.\n isControlColumn(column.id) && 'w-px',\n hasFixedLayout && !isControlColumn(column.id) && FIXED_LAYOUT_CELL_CLASS,\n pinned.className\n )}\n style={{ ...pinned.style, width: hasFixedLayout ? header.getSize() : undefined }}\n >\n {/* A placeholder cell has no header content, so a sort button there would be focusable and nameless. */}\n {!header.isPlaceholder && column.getCanSort() ? (\n <button\n type=\"button\"\n onClick={column.getToggleSortingHandler()}\n className=\"-mx-1.5 inline-flex items-center gap-1 rounded-md px-1.5 py-1 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]\"\n >\n {content}\n {sorted && <HugeiconsIcon icon={SORT_ICON[sorted]} size={12} aria-hidden=\"true\" />}\n {sortPriority !== undefined && (\n <>\n <span aria-hidden=\"true\" className=\"text-[10px] tabular-nums\">\n {sortPriority}\n </span>\n <span className=\"sr-only\">, sort priority {sortPriority}</span>\n </>\n )}\n </button>\n ) : (\n content\n )}\n {/* The filter button sits beside the sort button, not inside it. Its own label joins the header's computed name, as the resize handle's does. */}\n {!header.isPlaceholder && column.getCanFilter() && column.columnDef.meta?.filter && (\n <DataTableColumnFilter column={column} />\n )}\n {column.getCanResize() && <DataTableResizeHandle header={header} />}\n </TableHead>\n );\n};\n\n/** Holds the height of the rows virtualization leaves unrendered above or below the view. */\nconst DataTableVirtualSpacer = ({\n columnCount,\n height,\n}: {\n columnCount: number;\n height: number;\n}): ReactElement => (\n <tr aria-hidden=\"true\" data-slot=\"data-table-virtual-spacer\">\n {/* An inline zero border wins over the body's row divider selector, so the spacer adds no 1px to its height. */}\n <td colSpan={columnCount} className=\"p-0\" style={{ borderWidth: 0, height }} />\n </tr>\n);\n\n// DataTable owns pinning through useDataTable, so the table's own first-column pinning is not offered; it also owns the viewport ref for virtualization.\n/**\n * Props for {@link DataTableContent}: the empty and loading states, plus the props of the underlying table element.\n *\n * @example\n * ```tsx\n * const props: DataTableContentProps = { emptyTitle: 'No users yet' };\n * ```\n * @see DataTableContent\n * @see DataTable\n */\ntype DataTableContentProps = Omit<\n ComponentProps<typeof Table>,\n 'children' | 'fill' | 'stickyFirstColumn' | 'viewportRef'\n> & {\n /** Title for the empty state when filters or search hide every row. It comes with a button that clears them. */\n emptyFilteredTitle?: string;\n /** Icon for the empty state. Defaults to a table icon. */\n emptyIcon?: EmptyStateProps['icon'];\n /** Title for the empty state. */\n emptyTitle?: string;\n /** How many skeleton rows to show while loading. */\n loadingRowCount?: number;\n};\n\n/**\n * The table itself: headers, rows, and the loading and empty states.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({ columns, data, sorting: { mode: 'client' } });\n *\n * <DataTable table={dataTable}>\n * <DataTableContent emptyTitle=\"No users yet\" />\n * </DataTable>\n * ```\n * @returns The rendered table element.\n * @see DataTable\n * @see useDataTable\n * @see DataTablePagination\n */\nconst DataTableContent = ({\n className,\n emptyFilteredTitle = DEFAULT_EMPTY_FILTERED_TITLE,\n emptyIcon = DefaultEmptyIcon,\n emptyTitle = DEFAULT_EMPTY_TITLE,\n loadingRowCount = DEFAULT_LOADING_ROW_COUNT,\n style,\n ...props\n}: DataTableContentProps): ReactElement => {\n const { fill, loading, table, virtualization } = useDataTableContext();\n const viewportRef = useRef<HTMLDivElement>(null);\n // Sticky pinned offsets come from column sizes, which only match rendered widths in fixed layout.\n // Virtualization needs it too: auto layout sizes columns from whichever rows are mounted, so widths would jump while scrolling.\n const hasFixedLayout =\n table.options.enableColumnResizing === true ||\n table.options.enableColumnPinning === true ||\n virtualization !== undefined;\n const columnCount = table.getVisibleLeafColumns().length;\n const { rows } = table.getRowModel();\n const headerGroups = table.getHeaderGroups();\n const headerRowCount = headerGroups.length;\n\n // Loading and empty states keep their plain rows; only real data rows virtualize.\n const isVirtualized = virtualization !== undefined && !loading && rows.length > 0;\n const { estimateRowHeight = 0, overscan = DEFAULT_OVERSCAN } = virtualization ?? {};\n // Row ids keep measured heights attached to their rows when sorting or filtering reorders them.\n // The virtualizer recomputes its measurements whenever this function changes identity, so it changes only with the rows.\n const getItemKey = useCallback((index: number) => rows[index].id, [rows]);\n // Hooks run unconditionally. A zero count alone still listens to scrolling and re-renders, so disable the virtualizer outright when it has no rows to render.\n const virtualizer = useVirtualizer({\n count: isVirtualized ? rows.length : 0,\n enabled: isVirtualized,\n estimateSize: () => estimateRowHeight,\n getItemKey,\n getScrollElement: () => viewportRef.current,\n overscan,\n });\n\n const renderVirtualRows = (): ReactNode => {\n const virtualRows = virtualizer.getVirtualItems();\n const firstRow = virtualRows.at(0);\n const lastRow = virtualRows.at(-1);\n const topHeight = firstRow ? firstRow.start : 0;\n const bottomHeight = lastRow ? virtualizer.getTotalSize() - lastRow.end : 0;\n // Spacer rows, rather than absolutely positioned rows, keep native table layout and the sticky header.\n return (\n <>\n {topHeight > 0 && <DataTableVirtualSpacer columnCount={columnCount} height={topHeight} />}\n {virtualRows.map(({ index }) => {\n const row = rows[index];\n // Group rows are rows of their own and get an index. The virtualizer measures each row when it mounts.\n return (\n <DataTableBodyRow\n key={row.id}\n aria-rowindex={headerRowCount + index + 1}\n columnCount={columnCount}\n data-index={index}\n hasFixedLayout={hasFixedLayout}\n row={row}\n rowRef={virtualizer.measureElement}\n />\n );\n })}\n {bottomHeight > 0 && <DataTableVirtualSpacer columnCount={columnCount} height={bottomHeight} />}\n </>\n );\n };\n\n const renderEmptyRow = (): ReactNode => {\n const { columnFilters, globalFilter } = table.getState();\n if (columnFilters.length === 0 && globalFilter === '') {\n return <DataTableEmptyRow columnCount={columnCount} icon={emptyIcon} title={emptyTitle} />;\n }\n // Both halves change in one tick; useDataTable resolves each against the latest filter state, so neither undoes the other.\n const clearFilters = () => {\n table.setColumnFilters([]);\n table.setGlobalFilter('');\n };\n return (\n <DataTableEmptyRow\n action={\n <Button variant=\"outline\" size=\"sm\" onClick={clearFilters}>\n Clear filters\n </Button>\n }\n columnCount={columnCount}\n icon={emptyIcon}\n title={emptyFilteredTitle}\n />\n );\n };\n\n const renderBody = (): ReactNode => {\n if (loading) return <DataTableSkeletonRows columnCount={columnCount} rowCount={loadingRowCount} />;\n if (rows.length === 0) return renderEmptyRow();\n if (isVirtualized) return renderVirtualRows();\n return rows.map((row) => (\n <DataTableBodyRow\n key={row.id}\n columnCount={columnCount}\n hasFixedLayout={hasFixedLayout}\n row={row}\n />\n ));\n };\n\n return (\n <Table\n fill={fill}\n aria-busy={loading || undefined}\n // Screen readers count the full table, not just the rows in view.\n aria-rowcount={isVirtualized ? rows.length + headerRowCount : undefined}\n // Fixed layout lets set widths win; tables that neither resize nor pin keep sizing to content.\n className={cn(hasFixedLayout && 'w-auto table-fixed', className)}\n style={hasFixedLayout ? { minWidth: '100%', width: table.getTotalSize(), ...style } : style}\n {...props}\n viewportRef={viewportRef}\n >\n <TableHeader>\n {headerGroups.map((headerGroup, headerIndex) => (\n // Header rows come first in the full row count, so the body's indexes continue after them.\n <TableRow key={headerGroup.id} aria-rowindex={isVirtualized ? headerIndex + 1 : undefined}>\n {headerGroup.headers.map((header) => (\n <DataTableHeadCell key={header.id} header={header} hasFixedLayout={hasFixedLayout} />\n ))}\n </TableRow>\n ))}\n </TableHeader>\n <TableBody>{renderBody()}</TableBody>\n </Table>\n );\n};\n\nexport { DataTableContent };\nexport type { DataTableContentProps };\n","'use client';\n\nimport { type ReactElement } from 'react';\n\nimport { CursorPagination } from '../pagination/pagination';\nimport { useDataTableContext } from './data-table-context';\n\n/**\n * Props for {@link DataTablePagination}.\n *\n * @example\n * ```tsx\n * const props: DataTablePaginationProps = { className: 'justify-start' };\n * ```\n * @see DataTablePagination\n * @see useDataTable\n */\ntype DataTablePaginationProps = {\n className?: string;\n};\n\n/**\n * Previous and next buttons beside the visible row range, for client or server pagination. Renders nothing when pagination is off.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({\n * columns,\n * data,\n * pagination: { mode: 'client', pageSize: 25 },\n * });\n *\n * <DataTable table={dataTable}>\n * <DataTableContent />\n * <DataTablePagination />\n * </DataTable>\n * ```\n * @returns The rendered pagination controls, or `null` when pagination is off.\n * @see useDataTable\n * @see DataTable\n */\nconst DataTablePagination = ({\n className,\n}: DataTablePaginationProps): ReactElement | null => {\n const { table } = useDataTableContext();\n // Without a pagination option every row is on one page, so there is nothing to move between.\n if (!table.options.getPaginationRowModel && !table.options.manualPagination) {\n return null;\n }\n\n const { pageIndex, pageSize } = table.getState().pagination;\n const rowCount = table.getRowCount();\n const start = pageIndex * pageSize + 1;\n const end = Math.min((pageIndex + 1) * pageSize, rowCount);\n\n return (\n <CursorPagination\n className={className}\n hasNext={table.getCanNextPage()}\n hasPrevious={table.getCanPreviousPage()}\n label={\n rowCount > 0 ? (\n <>\n <span className=\"text-foreground\">\n {start}–{end}\n </span>{' '}\n of {rowCount}\n </>\n ) : undefined\n }\n onNext={() => table.nextPage()}\n onPrevious={() => table.previousPage()}\n />\n );\n};\n\nexport { DataTablePagination };\nexport type { DataTablePaginationProps };\n","'use client';\n\nimport { Search01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Input } from '../input/input';\nimport { useDataTableContext } from './data-table-context';\n\n/**\n * Props for {@link DataTableSearch}.\n *\n * @example\n * ```tsx\n * const props: DataTableSearchProps = { placeholder: 'Search users' };\n * ```\n * @see DataTableSearch\n * @see DataTableActiveFilters\n */\ntype DataTableSearchProps = {\n className?: string;\n /** Placeholder text, also the field's accessible name. */\n placeholder?: string;\n};\n\n/**\n * A search field that matches its text across the table's columns. Needs `filtering` in `useDataTable`, and renders nothing without it.\n * With manual filtering the app receives the text as `globalFilter` and filters the data itself.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({ columns, data, filtering: { mode: 'client' } });\n *\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableSearch placeholder=\"Search users\" />\n * </DataTableToolbar>\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered search field, or nothing when filtering is off.\n * @see DataTableToolbar\n * @see DataTableActiveFilters\n * @see useDataTable\n */\nconst DataTableSearch = ({\n className,\n placeholder = 'Search',\n}: DataTableSearchProps): ReactElement | null => {\n const { table } = useDataTableContext();\n if (!table.options.enableGlobalFilter) return null;\n const { globalFilter } = table.getState();\n\n return (\n <div data-slot=\"data-table-search\" className={cn('relative w-full max-w-64', className)}>\n <HugeiconsIcon\n icon={Search01Icon}\n size={16}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute start-2 top-1/2 -translate-y-1/2 text-muted-foreground/70\"\n />\n <Input\n type=\"search\"\n aria-label={placeholder}\n placeholder={placeholder}\n // The global filter state is untyped in TanStack; useDataTable keeps it a string.\n value={typeof globalFilter === 'string' ? globalFilter : ''}\n onChange={(event) => table.setGlobalFilter(event.target.value)}\n className=\"ps-8\"\n />\n </div>\n );\n};\n\nexport { DataTableSearch };\nexport type { DataTableSearchProps };\n","'use client';\n\nimport { type Dispatch, type SetStateAction, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n type ColumnDef,\n type ColumnFiltersState,\n type ColumnPinningState,\n type ColumnSizingState,\n type ExpandedState,\n type GroupingState,\n type OnChangeFn,\n type PaginationState,\n type RowSelectionState,\n type SortingState,\n type Table,\n type TableOptions,\n type VisibilityState,\n functionalUpdate,\n getCoreRowModel,\n getExpandedRowModel,\n getFacetedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getGroupedRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nimport type {\n DataTableColumnPinningState,\n DataTableFilterState,\n} from './data-table.types';\n\n/** Keeps the pagination state complete when the app has not turned pagination on. */\nconst DEFAULT_PAGE_SIZE = 25;\n/** Columns filter only when they opt in with `meta.filter` (see `withColumnFilters`). A module constant, so the table gets the same object each render. */\nconst DEFAULT_COLUMN = { enableColumnFilter: false };\n\n/** A feature whose state the app owns, for example when the server sorts or pages. `onChange` receives the next state. */\ntype ControlledState<TState> = {\n onChange: (next: TState) => void;\n state: TState;\n};\n\n/** The state and change handler handed to the table for one feature. */\ntype TableFeatureState<TState> = {\n onChange: OnChangeFn<TState>;\n state: TState;\n};\n\n/** A feature whose state the table owns, optionally seeded. */\ntype UncontrolledState<TState> = {\n initial?: TState;\n};\n\ntype FeatureState<TState> = ControlledState<TState> | UncontrolledState<TState>;\n\ntype DataTableSortingOptions =\n | { initial?: SortingState; mode: 'client' }\n | ({ mode: 'manual' } & ControlledState<SortingState>);\n\n/** `client` filters the data in memory; `manual` lets the app filter, usually on the server. */\ntype DataTableFilteringOptions =\n | { initial?: Partial<DataTableFilterState>; mode: 'client' }\n | ({ mode: 'manual' } & ControlledState<DataTableFilterState>);\n\n/**\n * Turns on row virtualization in `DataTableContent`: only the rows in view are rendered, for long client-side lists.\n * `estimateRowHeight` is the expected row height in pixels before rows are measured; `overscan` is how many rows to render beyond the edges of the view.\n * The table needs a bounded height to scroll within: pass `fill` to `DataTable` inside a bounded parent, or a max height through `scrollAreaProps` on `DataTableContent`.\n * Without one, every row is in view and every row renders.\n *\n * @example\n * ```tsx\n * const virtualization: DataTableVirtualization = { estimateRowHeight: 41, overscan: 8 };\n *\n * const dataTable = useDataTable({ columns, data, virtualization });\n * ```\n * @see useDataTable\n * @see DataTableContent\n */\ntype DataTableVirtualization = { estimateRowHeight: number; overscan?: number };\n\ntype DataTablePaginationOptions =\n | { mode: 'client'; pageSize: number }\n | ({ mode: 'manual'; rowCount: number } & ControlledState<PaginationState>);\n\n/**\n * Options for {@link useDataTable}: the rows and columns to show, plus one option per feature to turn on (sorting, filtering, pagination, selection, grouping, column visibility, pinning, sizing and virtualization).\n *\n * @example\n * ```tsx\n * const options: UseDataTableOptions<User> = {\n * columns,\n * data: users,\n * getRowId: (user) => user.id,\n * selection: { initial: {} },\n * sorting: { mode: 'client' },\n * };\n * ```\n * @see useDataTable\n * @see DataTableInstance\n */\ntype UseDataTableOptions<TData> = {\n /**\n * Pin columns to one edge: `left` pins to the start, `right` to the end. Turns pinning on.\n * A table pins to one edge only: pinning a column to the other edge unpins the columns on the first.\n * Pinning switches the table to fixed column widths, so give columns a `size`.\n */\n columnPinning?: FeatureState<DataTableColumnPinningState>;\n /** Column widths. Turns resizing on. */\n columnSizing?: FeatureState<ColumnSizingState>;\n /** Which columns are shown. Columns can always be hidden; this seeds or controls it. */\n columnVisibility?: FeatureState<VisibilityState>;\n // Column helpers type each column by its value; any is how TanStack holds a mixed list.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n columns: ColumnDef<TData, any>[];\n data: TData[];\n /**\n * `client` filters the data in memory; `manual` lets the app filter, usually on the server. Turns search and column filters on.\n * Only columns with `meta.filter` get a column filter.\n * With `manual`, `onChange` fires on every keystroke in the search: store the state right away and debounce the fetch instead.\n * Treat the search text and filter values as untrusted input on the server.\n */\n filtering?: DataTableFilteringOptions;\n /** Stable row ids, so selection survives sorting and refetching. Defaults to the row index. */\n getRowId?: (row: TData, index: number) => string;\n /**\n * Column ids to group rows by. Turns grouping on. Groups start open.\n * While every group is open, groups that appear later open too; collapsing one fixes the open set to the groups shown at that moment.\n */\n grouping?: FeatureState<GroupingState>;\n /** Show skeleton rows instead of data. */\n loading?: boolean;\n /**\n * `client` pages the data in memory; `manual` lets the app fetch each page.\n * With `manual`, client sorting only sorts the current page. With grouping, client pages count group header rows as rows.\n */\n pagination?: DataTablePaginationOptions;\n /** Selected rows by id. Turns selection on. */\n selection?: FeatureState<RowSelectionState>;\n /**\n * `client` sorts the data in memory; `manual` lets the app sort, usually on the server.\n * Shift-click a second header to sort by more than one column.\n */\n sorting?: DataTableSortingOptions;\n /**\n * Render only the rows in view. Use it for long lists without pagination.\n * Needs a bounded table height: `fill` on `DataTable`, or a max height through `scrollAreaProps` on `DataTableContent`.\n */\n virtualization?: DataTableVirtualization;\n};\n\n/**\n * The value `useDataTable` returns. Pass it to `DataTable` as `table`; it holds the table state and the loading flag.\n *\n * @example\n * ```tsx\n * const dataTable: DataTableInstance<User> = useDataTable({ columns, data });\n *\n * return <DataTable table={dataTable}>...</DataTable>;\n * ```\n * @see useDataTable\n * @see DataTable\n */\ntype DataTableInstance<TData> = {\n loading: boolean;\n table: Table<TData>;\n virtualization: DataTableVirtualization | undefined;\n};\n\nconst isControlled = <TState>(\n feature: FeatureState<TState> | undefined\n): feature is ControlledState<TState> =>\n feature !== undefined && 'state' in feature;\n\n/**\n * A table pins to one edge only, so when a change leaves columns on both edges, keep the edge that just gained a column and unpin the other.\n * When it is not only the end edge that gained, the start edge wins.\n */\nconst toOneEdge = ({\n next,\n previous,\n}: {\n next: ColumnPinningState;\n previous: ColumnPinningState;\n}): DataTableColumnPinningState => {\n const left = next.left ?? [];\n const right = next.right ?? [];\n if (left.length > 0 && right.length > 0) {\n const previousLeft = previous.left ?? [];\n const previousRight = previous.right ?? [];\n const onlyEndGained =\n right.some((id) => !previousRight.includes(id)) &&\n left.every((id) => previousLeft.includes(id));\n return onlyEndGained ? { right } : { left };\n }\n return right.length > 0 ? { right } : { left };\n};\n\nconst getInitialState = <TState>({\n fallback,\n feature,\n}: {\n fallback: TState;\n feature: FeatureState<TState> | undefined;\n}): TState =>\n feature && !isControlled(feature) ? (feature.initial ?? fallback) : fallback;\n\n/** The table hands over updaters; the app expects the next value, resolved against its current state. */\nconst toTableFeatureState = <TState>(\n feature: ControlledState<TState>\n): TableFeatureState<TState> => ({\n onChange: (updater) => feature.onChange(functionalUpdate(updater, feature.state)),\n state: feature.state,\n});\n\n/** Use the app's state when it owns the feature, otherwise the table's own. */\nconst resolveFeatureState = <TState>({\n feature,\n internal,\n setInternal,\n}: {\n feature: FeatureState<TState> | undefined;\n internal: TState;\n setInternal: OnChangeFn<TState>;\n}): TableFeatureState<TState> =>\n isControlled(feature)\n ? toTableFeatureState(feature)\n : { onChange: setInternal, state: internal };\n\n/**\n * Matches a row when its value is one of the checked values, or, for a list value, when any item is.\n * TanStack's `arrIncludesSome` calls `includes` on the row value, which matches substrings of strings and throws on numbers.\n * Clearing every value removes the filter.\n */\nconst includesSomeValue = Object.assign(\n (\n row: { getValue: (columnId: string) => unknown },\n columnId: string,\n filterValue: string[]\n ): boolean => {\n const value = row.getValue(columnId);\n return Array.isArray(value)\n ? value.some((item) => filterValue.includes(String(item)))\n : filterValue.includes(String(value));\n },\n {\n autoRemove: (value: unknown): boolean =>\n !Array.isArray(value) || value.length === 0,\n }\n);\n\n/**\n * Give each column with `meta.filter` a matching filter function and let it filter, recursing into column groups.\n * TanStack's `auto` filter guesses from the first row's value, so a checklist of values over string cells would get a string filter.\n */\nconst withColumnFilters = <TData>(\n columns: ColumnDef<TData, unknown>[]\n): ColumnDef<TData, unknown>[] =>\n columns.map((column) => {\n const withGroups =\n 'columns' in column && column.columns\n ? { ...column, columns: withColumnFilters(column.columns) }\n : column;\n const filter = column.meta?.filter;\n if (!filter) {\n return withGroups;\n }\n return {\n ...withGroups,\n // An app can still turn a column's filter off, or bring its own filter function.\n enableColumnFilter: column.enableColumnFilter ?? true,\n filterFn:\n column.filterFn ??\n (filter === 'values' ? includesSomeValue : 'includesString'),\n };\n });\n\n/** The filters a table starts with: the app's seed for client filtering, nothing otherwise. */\nconst getInitialFilters = ({\n filtering,\n}: {\n filtering: DataTableFilteringOptions | undefined;\n}): DataTableFilterState => {\n const initial = filtering?.mode === 'client' ? filtering.initial : undefined;\n return {\n columnFilters: initial?.columnFilters ?? [],\n globalFilter: initial?.globalFilter ?? '',\n };\n};\n\n/** The current filters and the handlers the table calls to change them. */\ntype UseFilterStateResult = {\n filterState: DataTableFilterState;\n handleColumnFiltersChange: OnChangeFn<ColumnFiltersState>;\n handleGlobalFilterChange: OnChangeFn<string>;\n};\n\n/**\n * Filter state and change handlers for search and column filters, which share one state.\n * `onFiltersChange` runs after every change, so the caller can react to it (pagination returns to the first page).\n */\nconst useFilterState = ({\n filtering,\n onFiltersChange,\n}: {\n filtering: DataTableFilteringOptions | undefined;\n onFiltersChange: () => void;\n}): UseFilterStateResult => {\n const [internalFilters, setInternalFilters] = useState<DataTableFilterState>(() => getInitialFilters({ filtering }));\n const manual = filtering?.mode === 'manual' ? filtering : undefined;\n // Manual filters resolve against the latest value handed to the app, not the last render's state:\n // two changes in one tick (clear column filters, then clear search) would otherwise each start from\n // the same stale state and the second would bring back what the first cleared.\n // Every render resyncs it from the app's state.\n const latestManualFilters = useRef<DataTableFilterState | undefined>(undefined);\n latestManualFilters.current = manual?.state;\n\n // Column filters and search share one state, so each change updates its half against the latest value.\n const updateFilters: OnChangeFn<DataTableFilterState> = (updater) => {\n if (manual) {\n const next = functionalUpdate(updater, latestManualFilters.current ?? manual.state);\n latestManualFilters.current = next;\n manual.onChange(next);\n } else {\n setInternalFilters(updater);\n }\n onFiltersChange();\n };\n\n return {\n filterState: manual ? manual.state : internalFilters,\n handleColumnFiltersChange: (updater) =>\n updateFilters((old) => ({\n ...old,\n columnFilters: functionalUpdate(updater, old.columnFilters),\n })),\n handleGlobalFilterChange: (updater) =>\n updateFilters((old) => ({\n ...old,\n // Resetting the search hands over undefined; keep the state a string.\n globalFilter: functionalUpdate(updater, old.globalFilter) ?? '',\n })),\n };\n};\n\n/** Pinning state where every change goes through toOneEdge, so the table and a controlled onChange only ever see one pinned edge. */\nconst resolvePinningState = ({\n columnPinning,\n internal,\n setInternal,\n}: {\n columnPinning: FeatureState<DataTableColumnPinningState> | undefined;\n internal: DataTableColumnPinningState;\n setInternal: Dispatch<SetStateAction<DataTableColumnPinningState>>;\n}): TableFeatureState<ColumnPinningState> => {\n if (isControlled(columnPinning)) {\n return {\n onChange: (updater) =>\n columnPinning.onChange(\n toOneEdge({\n next: functionalUpdate<ColumnPinningState>(updater, columnPinning.state),\n previous: columnPinning.state,\n })\n ),\n state: columnPinning.state,\n };\n }\n return {\n onChange: (updater) =>\n setInternal((old) =>\n toOneEdge({\n next: functionalUpdate<ColumnPinningState>(updater, old),\n previous: old,\n })\n ),\n state: internal,\n };\n};\n\n/** Row models for the features the table runs in memory; manual features leave their step to the app. */\nconst getRowModels = <TData>({\n filtering,\n grouping,\n pagination,\n sorting,\n}: Pick<UseDataTableOptions<TData>, 'filtering' | 'grouping' | 'pagination' | 'sorting'>): Pick<\n TableOptions<TData>,\n | 'getExpandedRowModel'\n | 'getFacetedRowModel'\n | 'getFacetedUniqueValues'\n | 'getFilteredRowModel'\n | 'getGroupedRowModel'\n | 'getPaginationRowModel'\n | 'getSortedRowModel'\n> => {\n const clientFiltering = filtering?.mode === 'client';\n return {\n getExpandedRowModel: grouping ? getExpandedRowModel<TData>() : undefined,\n getFacetedRowModel: clientFiltering ? getFacetedRowModel<TData>() : undefined,\n getFacetedUniqueValues: clientFiltering ? getFacetedUniqueValues<TData>() : undefined,\n getFilteredRowModel: clientFiltering ? getFilteredRowModel<TData>() : undefined,\n getGroupedRowModel: grouping ? getGroupedRowModel<TData>() : undefined,\n getPaginationRowModel: pagination?.mode === 'client' ? getPaginationRowModel<TData>() : undefined,\n getSortedRowModel: sorting?.mode === 'client' ? getSortedRowModel<TData>() : undefined,\n };\n};\n\n/**\n * Page resets are off (see autoResetPageIndex), so when the data shrinks the page can run past the end.\n * Clamping only when out of range keeps a fresh data array each render from looping.\n */\nconst useClampedPageIndex = <TData>({\n isClientPagination,\n pageIndex,\n table,\n}: {\n isClientPagination: boolean;\n pageIndex: number;\n table: Table<TData>;\n}): void => {\n const lastPageIndex = Math.max(0, table.getPageCount() - 1);\n useEffect(() => {\n if (isClientPagination && pageIndex > lastPageIndex) {\n table.setPageIndex(lastPageIndex);\n }\n }, [isClientPagination, lastPageIndex, pageIndex, table]);\n};\n\n/**\n * Create the state for a `DataTable`. Each feature stays off until its option is passed.\n * Pass `{ state, onChange }` to own a feature's state, or `mode: 'manual'` for server-driven sorting and pagination.\n * `onChange` receives the next state, ready to store.\n *\n * @example\n * const dataTable = useDataTable({\n * columns,\n * data,\n * pagination: { mode: 'client', pageSize: 25 },\n * sorting: { mode: 'client' },\n * });\n *\n * <DataTable table={dataTable}>\n * <DataTableContent />\n * <DataTablePagination />\n * </DataTable>\n * @returns A table instance to pass to `DataTable` as `table`.\n * @see UseDataTableOptions\n * @see DataTable\n * @see DataTableContent\n */\nconst useDataTable = <TData>({\n columnPinning,\n columnSizing,\n columnVisibility,\n columns,\n data,\n filtering,\n getRowId,\n grouping,\n loading = false,\n pagination,\n selection,\n sorting,\n virtualization,\n}: UseDataTableOptions<TData>): DataTableInstance<TData> => {\n const [internalSorting, setInternalSorting] = useState<SortingState>(\n sorting?.mode === 'client' ? (sorting.initial ?? []) : []\n );\n const [internalPagination, setInternalPagination] = useState<PaginationState>({\n pageIndex: 0,\n pageSize: pagination?.mode === 'client' ? pagination.pageSize : DEFAULT_PAGE_SIZE,\n });\n const [internalSelection, setInternalSelection] = useState<RowSelectionState>(\n getInitialState({ fallback: {}, feature: selection })\n );\n const [internalVisibility, setInternalVisibility] = useState<VisibilityState>(\n getInitialState({ fallback: {}, feature: columnVisibility })\n );\n const [internalPinning, setInternalPinning] =\n useState<DataTableColumnPinningState>(\n getInitialState({ fallback: { left: [] }, feature: columnPinning })\n );\n const [internalSizing, setInternalSizing] = useState<ColumnSizingState>(\n getInitialState({ fallback: {}, feature: columnSizing })\n );\n // Which groups are open. The table owns it, and groups start open.\n const [expandedGroups, setExpandedGroups] = useState<ExpandedState>(true);\n const [internalGrouping, setInternalGrouping] = useState<GroupingState>(\n getInitialState({ fallback: [], feature: grouping })\n );\n\n // TanStack rebuilds every column when the columns option changes identity, so only rebuild when the app's columns do.\n const tableColumns = useMemo(() => withColumnFilters(columns), [columns]);\n\n const isClientPagination = pagination?.mode === 'client';\n const handleClientSortingChange: OnChangeFn<SortingState> = (updater) => {\n setInternalSorting(updater);\n // A new order makes the current page meaningless, so start again from the first page.\n if (isClientPagination) {\n setInternalPagination((old) => ({ ...old, pageIndex: 0 }));\n }\n };\n\n const { filterState, handleColumnFiltersChange, handleGlobalFilterChange } = useFilterState({\n filtering,\n // Filtering changes which rows exist, so start again from the first page.\n onFiltersChange: () => {\n if (isClientPagination) setInternalPagination((old) => ({ ...old, pageIndex: 0 }));\n },\n });\n\n const sortingState: TableFeatureState<SortingState> =\n sorting?.mode === 'manual'\n ? toTableFeatureState(sorting)\n : { onChange: handleClientSortingChange, state: internalSorting };\n const paginationState: TableFeatureState<PaginationState> =\n pagination?.mode === 'manual'\n ? toTableFeatureState(pagination)\n : { onChange: setInternalPagination, state: internalPagination };\n const selectionState = resolveFeatureState({\n feature: selection,\n internal: internalSelection,\n setInternal: setInternalSelection,\n });\n const visibilityState = resolveFeatureState({\n feature: columnVisibility,\n internal: internalVisibility,\n setInternal: setInternalVisibility,\n });\n const pinningState = resolvePinningState({\n columnPinning,\n internal: internalPinning,\n setInternal: setInternalPinning,\n });\n const sizingState = resolveFeatureState({\n feature: columnSizing,\n internal: internalSizing,\n setInternal: setInternalSizing,\n });\n const groupingState = resolveFeatureState({\n feature: grouping,\n internal: internalGrouping,\n setInternal: setInternalGrouping,\n });\n\n const table = useReactTable({\n // Apps often pass a fresh data array each render. Regrouping on each one would reset the expanded rows,\n // closing every group, and resetting the page would loop, so both resets stay off.\n autoResetExpanded: false,\n autoResetPageIndex: false,\n columnResizeMode: 'onChange',\n columns: tableColumns,\n data,\n defaultColumn: DEFAULT_COLUMN,\n enableColumnFilters: filtering !== undefined,\n enableColumnPinning: columnPinning !== undefined,\n enableColumnResizing: columnSizing !== undefined,\n enableExpanding: grouping !== undefined,\n enableGlobalFilter: filtering !== undefined,\n enableGrouping: grouping !== undefined,\n // Group rows hold no data of their own and render without a checkbox. Selecting all would otherwise store their ids,\n // and since they never count as selected, the select-all checkbox would never read checked.\n enableRowSelection:\n selection === undefined ? false : (row) => !row.getIsGrouped(),\n // Multi-sort uses TanStack's default trigger: shift-click a second header to add a sort rule.\n enableSorting: sorting !== undefined,\n getCoreRowModel: getCoreRowModel(),\n ...getRowModels<TData>({ filtering, grouping, pagination, sorting }),\n getRowId,\n // Keep grouped columns where the app placed them instead of moving them to the start.\n groupedColumnMode: false,\n manualFiltering: filtering?.mode === 'manual',\n manualPagination: pagination?.mode === 'manual',\n manualSorting: sorting?.mode === 'manual',\n onColumnFiltersChange: handleColumnFiltersChange,\n onColumnPinningChange: pinningState.onChange,\n onColumnSizingChange: sizingState.onChange,\n onColumnVisibilityChange: visibilityState.onChange,\n onExpandedChange: setExpandedGroups,\n onGlobalFilterChange: handleGlobalFilterChange,\n onGroupingChange: groupingState.onChange,\n onPaginationChange: paginationState.onChange,\n onRowSelectionChange: selectionState.onChange,\n onSortingChange: sortingState.onChange,\n rowCount: pagination?.mode === 'manual' ? pagination.rowCount : undefined,\n state: {\n columnFilters: filterState.columnFilters,\n columnPinning: pinningState.state,\n columnSizing: sizingState.state,\n columnVisibility: visibilityState.state,\n expanded: expandedGroups,\n globalFilter: filterState.globalFilter,\n grouping: groupingState.state,\n pagination: paginationState.state,\n rowSelection: selectionState.state,\n sorting: sortingState.state,\n },\n });\n\n useClampedPageIndex({ isClientPagination, pageIndex: paginationState.state.pageIndex, table });\n\n return { loading, table, virtualization };\n};\n\nexport { useDataTable };\nexport type {\n DataTableInstance,\n DataTableVirtualization,\n UseDataTableOptions,\n};\n","'use client';\n\nimport {\n type ComponentProps,\n type ComponentRef,\n type ReactElement,\n forwardRef,\n} from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '../../../lib/utils';\n\nconst Tabs = ({\n className,\n orientation = 'horizontal',\n ...props\n}: ComponentProps<typeof TabsPrimitive.Root>): ReactElement => {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'group/tabs flex gap-2 data-[orientation=horizontal]:flex-col',\n className\n )}\n {...props}\n />\n );\n};\n\nconst tabsListVariants = cva(\n 'rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col',\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: 'bg-muted',\n line: 'gap-1 bg-transparent',\n navigation: 'group-data-[orientation=horizontal]/tabs:h-auto w-full justify-start gap-5 rounded-none border-b border-border-divider bg-transparent p-0',\n },\n },\n }\n);\n\n// forwardRef (not ref-as-prop) so callers measuring the list still work\n// under React 18, where a function component cannot receive a ref prop.\nconst TabsList = forwardRef<\n ComponentRef<typeof TabsPrimitive.List>,\n ComponentProps<typeof TabsPrimitive.List> &\n VariantProps<typeof tabsListVariants>\n>(({ className, variant = 'default', ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n data-slot=\"tabs-list\"\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = ({\n className,\n ...props\n}: ComponentProps<typeof TabsPrimitive.Trigger>): ReactElement => {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap touch-manipulation transition-[color,background-color,border-color,box-shadow,opacity] duration-150 motion-reduce:transition-none group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent',\n 'data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground',\n 'after:bg-foreground after:absolute after:opacity-0 after:transition-[opacity] after:motion-reduce:transition-none group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100',\n 'group-data-[variant=navigation]/tabs-list:h-11 group-data-[variant=navigation]/tabs-list:flex-none group-data-[variant=navigation]/tabs-list:rounded-none group-data-[variant=navigation]/tabs-list:border-0 group-data-[variant=navigation]/tabs-list:bg-transparent group-data-[variant=navigation]/tabs-list:px-0 group-data-[variant=navigation]/tabs-list:py-0 group-data-[variant=navigation]/tabs-list:text-sm group-data-[variant=navigation]/tabs-list:font-normal group-data-[variant=navigation]/tabs-list:after:hidden group-data-[variant=navigation]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=navigation]/tabs-list:data-[state=active]:bg-transparent',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TabsContent = ({\n className,\n ...props\n}: ComponentProps<typeof TabsPrimitive.Content>): ReactElement => {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\n 'flex-1 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:rounded-md',\n className\n )}\n {...props}\n />\n );\n};\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };\n","'use client';\n\nimport { type ComponentProps, type KeyboardEvent, type ReactElement, createContext, useCallback, useContext, useId, useMemo, useRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ntype ToggleGroupSingleContext = {\n disabled: boolean;\n groupId: string;\n onValueChange: (value: string) => void;\n type: 'single';\n value: string;\n};\n\ntype ToggleGroupMultipleContext = {\n disabled: boolean;\n groupId: string;\n onValueChange: (value: string[]) => void;\n type: 'multiple';\n value: string[];\n};\n\ntype ToggleGroupContextValue =\n | ToggleGroupSingleContext\n | ToggleGroupMultipleContext;\n\nconst ToggleGroupContext = createContext<ToggleGroupContextValue | null>(null);\n\nconst useToggleGroupContext = (): ToggleGroupContextValue => {\n const ctx = useContext(ToggleGroupContext);\n if (!ctx) {\n // eslint-disable-next-line no-restricted-syntax -- dev-time invariant guard; a \"used outside provider\" check doesn't warrant a domain BaseError class\n throw new Error('ToggleGroupItem must be used inside a ToggleGroup');\n }\n return ctx;\n};\n\n// ---------------------------------------------------------------------------\n// Prop types\n// ---------------------------------------------------------------------------\n\n/** Props for a single-select ToggleGroup. */\ntype ToggleGroupSingleProps = {\n /** Fired when the selected value changes. */\n onValueChange: (value: string) => void;\n type: 'single';\n /** The currently selected value. */\n value: string;\n};\n\n/** Props for a multi-select ToggleGroup. */\ntype ToggleGroupMultipleProps = {\n /** Fired when the selected values change. */\n onValueChange: (value: string[]) => void;\n type: 'multiple';\n /** The currently selected values. */\n value: string[];\n};\n\ntype ToggleGroupBaseProps = {\n children?: React.ReactNode;\n className?: string;\n /** Disables all items in the group. */\n disabled?: boolean;\n};\n\n/** Combined props for ToggleGroup. */\ntype ToggleGroupProps = ToggleGroupBaseProps &\n (ToggleGroupSingleProps | ToggleGroupMultipleProps);\n\n/** Props for ToggleGroupItem. */\ntype ToggleGroupItemProps = ComponentProps<'button'> & {\n /** Overrides the group-level disabled state for this item. */\n disabled?: boolean;\n /** The value this item represents. Must match a value in the parent group. */\n value: string;\n};\n\n// ---------------------------------------------------------------------------\n// ToggleGroup\n// ---------------------------------------------------------------------------\n\n/**\n * Segmented control container that manages single or multiple selection.\n * Renders a rounded pill-track styled with the muted background token.\n * Provides context and implements roving keyboard navigation across items.\n *\n * @example\n * // Single selection\n * <ToggleGroup type=\"single\" value={view} onValueChange={setView}>\n * <ToggleGroupItem value=\"day\">Day</ToggleGroupItem>\n * <ToggleGroupItem value=\"week\">Week</ToggleGroupItem>\n * </ToggleGroup>\n *\n * @example\n * // Multiple selection\n * <ToggleGroup type=\"multiple\" value={formats} onValueChange={setFormats}>\n * <ToggleGroupItem value=\"bold\">B</ToggleGroupItem>\n * <ToggleGroupItem value=\"italic\">I</ToggleGroupItem>\n * </ToggleGroup>\n */\nconst ToggleGroup = ({\n type,\n value,\n onValueChange,\n disabled = false,\n className,\n children,\n ...props\n}: ToggleGroupProps): ReactElement => {\n const groupId = useId();\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Roving keyboard navigation: Arrow keys move focus between enabled buttons.\n const handleKeyDown = useCallback((e: KeyboardEvent<HTMLDivElement>) => {\n const container = containerRef.current;\n if (!container) return;\n\n const items = Array.from(\n container.querySelectorAll<HTMLButtonElement>(\n 'button[data-slot=\"toggle-group-item\"]:not([disabled])'\n )\n );\n if (items.length === 0) return;\n\n const focused = document.activeElement as HTMLButtonElement;\n const idx = items.indexOf(focused);\n\n let next: number;\n\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n e.preventDefault();\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n e.preventDefault();\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n e.preventDefault();\n next = 0;\n } else if (e.key === 'End') {\n e.preventDefault();\n next = items.length - 1;\n } else {\n return;\n }\n\n items[next]?.focus();\n }, []);\n\n const contextValue: ToggleGroupContextValue = useMemo(\n () =>\n type === 'single'\n ? {\n disabled,\n groupId,\n onValueChange: onValueChange as (v: string) => void,\n type: 'single',\n value: value as string,\n }\n : {\n disabled,\n groupId,\n onValueChange: onValueChange as (v: string[]) => void,\n type: 'multiple',\n value: value as string[],\n },\n [disabled, groupId, onValueChange, type, value]\n );\n\n return (\n <ToggleGroupContext.Provider value={contextValue}>\n <div\n ref={containerRef}\n data-slot=\"toggle-group\"\n role={type === 'single' ? 'radiogroup' : 'toolbar'}\n onKeyDown={handleKeyDown}\n className={cn(\n 'inline-flex items-center rounded-lg bg-muted p-[3px] gap-0.5',\n disabled && 'opacity-50 pointer-events-none',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </ToggleGroupContext.Provider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// ToggleGroupItem\n// ---------------------------------------------------------------------------\n\n/**\n * An individual button within a ToggleGroup.\n * Reads context to determine selection state and fires the appropriate\n * onValueChange callback on click. Mirrors the elevated/pill styling of\n * the active tab trigger (bg-background + shadow) when selected.\n */\nconst ToggleGroupItem = ({\n value,\n disabled,\n className,\n children,\n onClick,\n ...props\n}: ToggleGroupItemProps): ReactElement => {\n const ctx = useToggleGroupContext();\n\n const isDisabled = disabled ?? ctx.disabled;\n\n const isActive =\n ctx.type === 'single' ? ctx.value === value : ctx.value.includes(value);\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (isDisabled) return;\n\n if (ctx.type === 'single') {\n // In single mode, clicking the already-active value keeps it selected.\n if (ctx.value !== value) {\n ctx.onValueChange(value);\n }\n } else {\n // In multiple mode, toggle the value in/out of the array.\n const next = ctx.value.includes(value)\n ? ctx.value.filter((v) => v !== value)\n : [...ctx.value, value];\n ctx.onValueChange(next);\n }\n\n onClick?.(e);\n };\n\n // Roving tabIndex: only the active (or first) item is reachable via Tab.\n // For multiple-select there is no single \"active\" item so we use first-in-group\n // logic: the first item keeps tabIndex=0 when nothing is selected.\n const tabIndex = isActive ? 0 : -1;\n\n const sharedButtonProps = {\n className: cn(\n // Compact segmented-control height (matches Tabs); the parent track keeps it\n // tappable. Use a taller size variant if a touch-first surface needs 44px.\n 'relative inline-flex h-8 flex-1 items-center justify-center gap-1.5',\n 'rounded-md px-3 text-sm font-medium whitespace-nowrap',\n // Cursor\n 'cursor-pointer',\n // Inactive colour\n 'text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground',\n // Transition — ease-out matches design system, motion-reduce honours OS setting.\n 'transition-[color,background-color,box-shadow] duration-150 ease-out motion-reduce:transition-none',\n // Active (selected) state mirrors tabs trigger active styling.\n 'data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm',\n 'dark:data-[state=on]:bg-input/30 dark:data-[state=on]:text-foreground dark:data-[state=on]:border dark:data-[state=on]:border-input',\n // Focus ring\n 'focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',\n // Disabled\n 'disabled:pointer-events-none disabled:opacity-50',\n // SVG children\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n ),\n 'data-slot': 'toggle-group-item' as const,\n 'data-state': isActive ? ('on' as const) : ('off' as const),\n disabled: isDisabled,\n onClick: handleClick,\n\n // tabIndex drives roving focus; keyboard nav updates focus programmatically.\n tabIndex,\n\n type: 'button' as const,\n };\n\n if (ctx.type === 'single') {\n return (\n <button\n {...sharedButtonProps}\n role=\"radio\"\n aria-checked={isActive}\n // Associate with the radiogroup by name so ATs announce group context.\n name={ctx.groupId}\n {...props}\n >\n {children}\n </button>\n );\n }\n\n return (\n <button {...sharedButtonProps} aria-pressed={isActive} {...props}>\n {children}\n </button>\n );\n};\n\nexport { ToggleGroup, ToggleGroupItem };\nexport type { ToggleGroupProps, ToggleGroupItemProps };\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst Textarea = ({\n className,\n ...props\n}: ComponentProps<'textarea'>): ReactElement => {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground/60 dark:bg-input/30 flex field-sizing-content min-h-20 w-full touch-manipulation rounded-md border-0 bg-background px-3 py-2 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)]',\n className\n )}\n {...props}\n />\n );\n};\n\nexport { Textarea };\n","'use client';\n\nimport {\n Arrow,\n Content,\n Portal,\n Provider,\n Root,\n Trigger,\n} from '@radix-ui/react-tooltip';\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst TooltipProvider = Provider;\n\nconst Tooltip = Root;\n\nconst TooltipTrigger = Trigger;\n\n// Motion lives in globals.css under [data-slot='tooltip-content'], keyed off Radix's delayed-open, instant-open and closed states.\nconst TooltipContent = forwardRef<\n ComponentRef<typeof Content>,\n ComponentPropsWithoutRef<typeof Content>\n>(({ children, className, sideOffset = 4, ...props }, ref) => (\n <Portal>\n <Content\n ref={ref}\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n // 24px tall with 6px corners: compact for a label. A 1px inner highlight on the top edge catches the light.\n 'z-50 max-w-xs rounded-[6px] bg-[var(--tooltip-bg)] px-2 py-1 text-xs leading-4 font-medium text-balance text-[var(--tooltip-fg)] shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08)] [filter:var(--tooltip-drop)]',\n className\n )}\n {...props}\n >\n {children}\n {/* A soft-tipped triangle in the surface colour; 1px of overlap hides the seam, and the drop-shadow wraps it with the body. */}\n <Arrow asChild height={5} width={10}>\n <svg\n aria-hidden=\"true\"\n className=\"-translate-y-px fill-[var(--tooltip-bg)]\"\n viewBox=\"0 0 10 5\"\n >\n <path d=\"M0 0H10L5.88 4.12a1.25 1.25 0 0 1-1.76 0Z\" />\n </svg>\n </Arrow>\n </Content>\n </Portal>\n));\nTooltipContent.displayName = Content.displayName;\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n","import type { ReactElement } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nconst aliases: Record<string, string> = {\n arbitrum: 'arb',\n 'arbitrum-one': 'arb',\n 'arbitrum-sepolia': 'arb',\n avalanche: 'avax',\n 'base-sepolia': 'base',\n 'binance-smart-chain': 'bnb',\n bitcoin: 'btc',\n 'bitcoin-mainnet': 'btc',\n 'bitcoin-testnet': 'btc',\n bsc: 'bnb',\n cosmos: 'atom',\n 'cosmos-hub': 'atom',\n 'cosmos-testnet': 'atom',\n ethereum: 'eth',\n fantom: 'ftm',\n gnosis: 'gnosis',\n linea: 'linea',\n mantle: 'mantle',\n optimism: 'optimism',\n osmosis: 'osmo',\n polygon: 'matic',\n 'polygon-amoy': 'matic',\n scroll: 'scroll',\n sei: 'sei',\n 'sei-network': 'sei',\n sepolia: 'eth',\n solana: 'sol',\n 'solana-devnet': 'sol',\n 'solana-mainnet': 'sol',\n starknet: 'generic',\n sui: 'sui',\n zksync: 'zkevm',\n};\n\nexport interface AssetIconProps {\n className?: string;\n size?: number;\n symbol: string;\n}\n\nexport const AssetIcon = ({\n symbol,\n size = 32,\n className,\n}: AssetIconProps): ReactElement => {\n const resolved = aliases[symbol.toLowerCase()] ?? symbol.toLowerCase();\n return (\n <img\n src={`/assets/${resolved}.svg`}\n alt={symbol}\n width={size}\n height={size}\n className={cn('object-contain', className)}\n onError={(e) => {\n const target = e.currentTarget;\n if (!target.src.endsWith('/assets/generic.svg')) {\n target.src = '/assets/generic.svg';\n }\n }}\n />\n );\n};\n","'use client';\n\nimport { type ReactElement, useEffect, useRef, useState } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { AlertCircleIcon, Copy01Icon } from '@hugeicons/core-free-icons';\nimport { type Transition, motion, useReducedMotion } from 'motion/react';\n\nimport { Button } from '../ui/button';\nimport { CheckIcon } from '../ui/check-icon/check-icon';\nimport { cn } from '../../lib/utils';\n\n/* ─────────────────────────────────────────────────────────\n * ANIMATION STORYBOARD\n *\n * Read top-to-bottom. Each value is ms after feedback begins.\n *\n * 0ms copy icon fades out while feedback icon scales 0.72 → 1\n * 0ms label crossfades and translates 2px → 0\n * 1500ms feedback resets with a quiet opacity transition\n * 1620ms invisible feedback layers prepare for the next entrance\n * ───────────────────────────────────────────────────────── */\nconst TIMING = {\n // Time success or failure remains visible.\n feedbackHold: 1500,\n // Duration of the semantic icon transition.\n iconSwap: 220,\n // Duration of the quieter automatic reset.\n reset: 120,\n};\n\nconst COPY_STAGE = {\n copied: 1,\n error: 2,\n idle: 0,\n} as const;\n\ntype CopyStage = (typeof COPY_STAGE)[keyof typeof COPY_STAGE];\n\nconst ICON = {\n // Resting scale for the visible icon.\n activeScale: 1,\n // Compact scale used during feedback entry.\n inactiveScale: 0.72,\n spring: {\n bounce: 0,\n type: 'spring' as const,\n visualDuration: TIMING.iconSwap / 1000,\n },\n};\n\nconst LABEL = {\n // Resting vertical position for the visible label.\n activeOffset: 0,\n // Subtle offset used during the label crossfade.\n inactiveOffset: 2,\n spring: {\n bounce: 0,\n type: 'spring' as const,\n visualDuration: TIMING.iconSwap / 1000,\n },\n};\n\nconst RESET_TRANSITION = {\n duration: TIMING.reset / 1000,\n ease: 'easeOut' as const,\n};\n\n// Prepare hidden geometry only after the fade so the reset never visibly snaps.\nconst HIDDEN_RESET_TRANSITION = {\n delay: TIMING.reset / 1000,\n duration: 0,\n};\n\nconst ICON_RESET_TRANSITION = {\n opacity: RESET_TRANSITION,\n scale: HIDDEN_RESET_TRANSITION,\n};\n\nconst LABEL_RESET_TRANSITION = {\n opacity: RESET_TRANSITION,\n y: HIDDEN_RESET_TRANSITION,\n};\n\nconst REDUCED_MOTION_TRANSITION = { duration: 0 };\n\nexport type CopyButtonProps = {\n className?: string;\n label?: string;\n size?: 'default' | 'sm' | 'xs' | 'icon' | 'icon-xs' | 'icon-sm';\n value: string;\n variant?: 'default' | 'outline' | 'ghost' | 'secondary';\n};\n\n/** Copies a value and presents stable, accessible success or failure feedback. */\nexport const CopyButton = ({\n value,\n label,\n variant = 'outline',\n size = 'icon-xs',\n className,\n}: CopyButtonProps): ReactElement => {\n const [stage, setStage] = useState<CopyStage>(COPY_STAGE.idle);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n // Only the latest clipboard request may update feedback when writes settle out of order.\n const requestIdRef = useRef(0);\n const shouldReduceMotion = useReducedMotion();\n // Prepare only the animated layers so their compositing stays stable during swaps.\n const animationStyle = {\n willChange: shouldReduceMotion ? 'auto' : 'transform, opacity',\n };\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n };\n }, []);\n\n const showFeedback = (nextStage: CopyStage): void => {\n setStage(nextStage);\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(\n () => setStage(COPY_STAGE.idle),\n TIMING.feedbackHold,\n );\n };\n\n const handleCopy = async (): Promise<void> => {\n const requestId = ++requestIdRef.current;\n try {\n await navigator.clipboard.writeText(value);\n if (requestId === requestIdRef.current) showFeedback(COPY_STAGE.copied);\n } catch {\n if (requestId === requestIdRef.current) showFeedback(COPY_STAGE.error);\n }\n };\n\n // Empty labels cannot name the icon-only button.\n let ariaLabel = label || 'Copy to clipboard';\n let announcement = '';\n if (stage === COPY_STAGE.copied) {\n ariaLabel = 'Copied';\n announcement = 'Copied to clipboard';\n } else if (stage === COPY_STAGE.error) {\n ariaLabel = 'Copy failed';\n announcement = 'Copy failed';\n }\n\n let iconTransition: Transition = ICON.spring;\n let labelTransition: Transition = LABEL.spring;\n if (stage === COPY_STAGE.idle) {\n iconTransition = ICON_RESET_TRANSITION;\n labelTransition = LABEL_RESET_TRANSITION;\n }\n if (shouldReduceMotion) {\n iconTransition = REDUCED_MOTION_TRANSITION;\n labelTransition = REDUCED_MOTION_TRANSITION;\n }\n const visualStates = [\n {\n icon: <HugeiconsIcon icon={Copy01Icon} size={14} />,\n label,\n stage: COPY_STAGE.idle,\n },\n {\n // Let Button's SVG size selectors match the copy and error icons.\n icon: <CheckIcon size={null} strokeWidth={2} />,\n label: label ? 'Copied' : undefined,\n stage: COPY_STAGE.copied,\n },\n {\n icon: <HugeiconsIcon icon={AlertCircleIcon} size={14} />,\n label: label ? 'Failed' : undefined,\n stage: COPY_STAGE.error,\n },\n ];\n\n return (\n <Button\n variant={variant}\n size={size}\n onClick={handleCopy}\n aria-label={ariaLabel}\n className={cn(\n stage === COPY_STAGE.copied && 'text-[var(--text-success)]',\n stage === COPY_STAGE.error && 'text-[var(--text-danger)]',\n className,\n )}\n >\n {/* Overlapping grid cells reserve the widest state and prevent blank frames. */}\n <span aria-hidden='true' className='grid items-center'>\n {visualStates.map((visualState) => {\n const isActive = stage === visualState.stage;\n const isIdleVisual = visualState.stage === COPY_STAGE.idle;\n\n return (\n <span\n key={visualState.stage}\n className='col-start-1 row-start-1 flex items-center gap-1.5'\n >\n <motion.span\n initial={false}\n animate={{\n opacity: isActive ? 1 : 0,\n scale:\n isIdleVisual || isActive\n ? ICON.activeScale\n : ICON.inactiveScale,\n }}\n transition={iconTransition}\n style={animationStyle}\n className='flex items-center'\n >\n {visualState.icon}\n </motion.span>\n {visualState.label && (\n <motion.span\n initial={false}\n style={animationStyle}\n animate={{\n opacity: isActive ? 1 : 0,\n y:\n isIdleVisual || isActive\n ? LABEL.activeOffset\n : LABEL.inactiveOffset,\n }}\n transition={labelTransition}\n >\n {visualState.label}\n </motion.span>\n )}\n </span>\n );\n })}\n </span>\n <span aria-live='polite' className='sr-only' role='status'>\n {announcement}\n </span>\n </Button>\n );\n};\n","'use client';\n\nimport { type ReactElement, forwardRef, useMemo, useRef, useState } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { cn } from '../../lib/utils';\nimport { CopyButton } from '../copy-button';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype CodeBlockVariant = 'dark' | 'light';\n\ninterface CodeBlockProps {\n className?: string;\n code: string;\n language?: string;\n showLineNumbers?: boolean;\n showTerminalPrompt?: boolean;\n showWindowChrome?: boolean;\n title?: string;\n variant?: CodeBlockVariant;\n}\n\nconst variantStyles = {\n dark: {\n chromeDot: 'bg-[var(--border-hover)]',\n code: 'text-[var(--foreground)]',\n copyBtn:\n 'text-[var(--text-disabled)] hover:text-[var(--foreground)] hover:bg-white/[0.06]',\n header: 'border-white/[0.05] bg-[var(--bg-default)]',\n headerText: 'text-[var(--muted-foreground)]',\n lineNumber: 'text-[var(--text-disabled)]',\n prompt: 'text-[var(--muted-foreground)]',\n tabActive: 'bg-white/[0.08] text-[var(--foreground)]',\n tabInactive: 'text-[var(--text-disabled)] hover:text-[var(--foreground)]',\n wrapper:\n 'bg-[var(--card)] text-[var(--foreground)] shadow-[0_0_0_1px_var(--border)]',\n },\n light: {\n chromeDot: 'bg-muted-foreground/15',\n code: 'text-foreground',\n copyBtn:\n 'text-muted-foreground/60 hover:text-foreground hover:bg-black/[0.04]',\n header: 'border-border/60 bg-[var(--muted)]/40',\n headerText: 'text-muted-foreground',\n lineNumber: 'text-muted-foreground/30',\n prompt: 'text-muted-foreground/40',\n tabActive:\n 'bg-background text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.05)]',\n tabInactive: 'text-muted-foreground hover:text-foreground',\n wrapper: 'bg-white text-foreground shadow-[var(--shadow-card)]',\n },\n};\n\nconst CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(\n (\n {\n code,\n title,\n language: _language,\n showLineNumbers = false,\n showTerminalPrompt = false,\n variant = 'dark',\n showWindowChrome = false,\n className,\n },\n ref\n ) => {\n const lines = code.split('\\n');\n const s = variantStyles[variant];\n\n return (\n <div\n ref={ref}\n className={cn('rounded-xl overflow-hidden', s.wrapper, className)}\n >\n {(title || showWindowChrome) && (\n <div\n className={cn(\n 'flex items-center justify-between border-b px-4 py-2.5',\n s.header\n )}\n >\n <div className=\"flex items-center gap-3\">\n {showWindowChrome && (\n <div className=\"flex gap-[6px]\" aria-hidden=\"true\">\n <div className={cn('size-[9px] rounded-full', s.chromeDot)} />\n <div className={cn('size-[9px] rounded-full', s.chromeDot)} />\n <div className={cn('size-[9px] rounded-full', s.chromeDot)} />\n </div>\n )}\n {title && (\n <span className={cn('text-[13px] font-medium', s.headerText)}>\n {title}\n </span>\n )}\n </div>\n <CopyButton\n value={code}\n variant=\"ghost\"\n size=\"icon-xs\"\n className={s.copyBtn}\n />\n </div>\n )}\n <div className=\"relative group\">\n {!title && !showWindowChrome && (\n <div className=\"absolute top-2.5 right-2.5 opacity-0 group-hover:opacity-100 transition-[opacity] duration-150\">\n <CopyButton\n value={code}\n variant=\"ghost\"\n size=\"icon-xs\"\n className={s.copyBtn}\n />\n </div>\n )}\n <pre\n className={cn(\n 'overflow-x-auto px-4 py-3.5 text-[13px] font-mono leading-relaxed',\n !title && !showWindowChrome && 'pr-10',\n variant === 'dark' && 'bg-[var(--background)]'\n )}\n >\n <code>\n {showLineNumbers ? (\n lines.map((line, i) => (\n <span key={`L${i}:${line}`} className=\"table-row\">\n <span\n className={cn(\n 'table-cell pr-4 text-right select-none tabular-nums w-[2ch]',\n s.lineNumber\n )}\n >\n {i + 1}\n </span>\n <span className=\"table-cell\">\n {showTerminalPrompt && i === 0 && (\n <span className={cn('select-none mr-2', s.prompt)}>\n $\n </span>\n )}\n {line}\n </span>\n {i < lines.length - 1 && '\\n'}\n </span>\n ))\n ) : (\n <>\n {showTerminalPrompt && (\n <span className={cn('select-none mr-2', s.prompt)}>$</span>\n )}\n {code}\n </>\n )}\n </code>\n </pre>\n </div>\n </div>\n );\n }\n);\n\nCodeBlock.displayName = 'CodeBlock';\n\ninterface PackageManagerTabsProps {\n className?: string;\n npm: string;\n pnpm?: string;\n showTerminalPrompt?: boolean;\n variant?: CodeBlockVariant;\n yarn?: string;\n}\n\nconst PackageManagerTabs = ({\n npm,\n yarn,\n pnpm,\n variant = 'dark',\n showTerminalPrompt = true,\n className,\n}: PackageManagerTabsProps): ReactElement => {\n const tabs = useMemo(\n () => [\n { code: npm, id: 'npm' as const, label: 'npm' },\n ...(yarn ? [{ code: yarn, id: 'yarn' as const, label: 'yarn' }] : []),\n ...(pnpm ? [{ code: pnpm, id: 'pnpm' as const, label: 'pnpm' }] : []),\n ],\n [npm, yarn, pnpm]\n );\n\n const [activeIndex, setActiveIndex] = useState(0);\n const tabRefs = useRef<(HTMLButtonElement | null)[]>([]);\n const shouldReduceMotion = useReducedMotion();\n\n const s = variantStyles[variant];\n const activeTab = tabs[activeIndex];\n const activeCode = activeTab?.code || npm;\n\n // eslint-disable-next-line custom-rules/require-single-object-param\n const handleKeyDown = (e: React.KeyboardEvent, index: number) => {\n let nextIndex: number;\n switch (e.key) {\n case 'ArrowRight':\n nextIndex = (index + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n nextIndex = (index - 1 + tabs.length) % tabs.length;\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = tabs.length - 1;\n break;\n default:\n return;\n }\n e.preventDefault();\n setActiveIndex(nextIndex);\n tabRefs.current[nextIndex]?.focus();\n };\n\n return (\n <div className={cn('rounded-xl overflow-hidden', s.wrapper, className)}>\n <div\n className={cn(\n 'flex items-center justify-between border-b px-3 py-2',\n s.header\n )}\n >\n <div\n className=\"flex gap-0.5 rounded-lg p-0.5\"\n role=\"tablist\"\n aria-label=\"Package manager\"\n >\n {tabs.map((tab, i) => (\n <button\n key={tab.id}\n ref={(el) => {\n tabRefs.current[i] = el;\n }}\n role=\"tab\"\n aria-selected={activeIndex === i}\n aria-controls={`panel-${tab.id}`}\n tabIndex={activeIndex === i ? 0 : -1}\n onClick={() => setActiveIndex(i)}\n onKeyDown={(e) => handleKeyDown(e, i)}\n className={cn(\n 'relative px-3 py-1 rounded-md text-[13px] font-medium transition-[color,background-color,box-shadow] duration-150 touch-manipulation cursor-pointer',\n activeIndex === i ? s.tabActive : s.tabInactive\n )}\n >\n <motion.span\n whileTap={shouldReduceMotion ? undefined : { scale: 0.95 }}\n transition={spring}\n >\n {tab.label}\n </motion.span>\n </button>\n ))}\n </div>\n <CopyButton\n value={activeCode}\n variant=\"ghost\"\n size=\"icon-xs\"\n className={s.copyBtn}\n />\n </div>\n <div\n id={`panel-${activeTab?.id}`}\n role=\"tabpanel\"\n aria-labelledby={activeTab?.id}\n >\n <pre\n className={cn(\n 'overflow-x-auto px-4 py-3.5 text-[13px] font-mono',\n variant === 'dark' && 'bg-[var(--background)]'\n )}\n >\n <code>\n {showTerminalPrompt && (\n <span className={cn('select-none mr-2', s.prompt)}>$</span>\n )}\n {activeCode}\n </code>\n </pre>\n </div>\n </div>\n );\n};\n\nexport { CodeBlock, PackageManagerTabs };\nexport type { CodeBlockProps, PackageManagerTabsProps, CodeBlockVariant };\n","'use client';\n\nimport type { ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Alert01Icon } from '@hugeicons/core-free-icons';\n\nimport { Button } from '../ui/button';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from '../ui/alert-dialog';\nimport { cn } from '../../lib/utils';\n\nexport interface DangerZoneProps {\n actionLabel: string;\n className?: string;\n confirmDescription?: string;\n confirmTitle?: string;\n description: string;\n onConfirm: () => void;\n title: string;\n}\n\nexport const DangerZone = ({\n title,\n description,\n actionLabel,\n confirmTitle,\n confirmDescription,\n onConfirm,\n className,\n}: DangerZoneProps): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl border border-[var(--border-danger)]/30 p-6 shadow-[var(--shadow-card)] bg-card',\n className\n )}\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--danger-light)]\">\n <HugeiconsIcon\n icon={Alert01Icon}\n size={16}\n className=\"text-[var(--text-danger)]\"\n />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"text-sm font-semibold text-[var(--text-danger)] text-balance\">\n {title}\n </h3>\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n <div className=\"mt-4\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"destructive\">{actionLabel}</Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{confirmTitle || title}</AlertDialogTitle>\n <AlertDialogDescription>\n {confirmDescription || description}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={onConfirm}\n className=\"bg-destructive text-white hover:bg-destructive/90\"\n >\n {actionLabel}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","'use client';\n\nimport { type ReactElement, useState } from 'react';\nimport { Add01Icon, Cancel01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { Button } from '../ui/button';\nimport { Input } from '../ui/input';\nimport { cn } from '../../lib/utils';\n\nexport interface DomainListProps {\n className?: string;\n domains: string[];\n onChange: (domains: string[]) => void;\n placeholder?: string;\n validate?: (domain: string) => string | null;\n}\n\nconst DomainList = ({\n className,\n domains,\n onChange,\n placeholder = 'https://example.com',\n validate,\n}: DomainListProps): ReactElement => {\n const [inputValue, setInputValue] = useState('');\n const [error, setError] = useState<string | null>(null);\n\n const handleAdd = () => {\n const trimmed = inputValue.trim();\n if (!trimmed) return;\n\n if (validate) {\n const validationError = validate(trimmed);\n if (validationError) {\n setError(validationError);\n return;\n }\n }\n\n if (domains.includes(trimmed)) {\n setError('Already added');\n return;\n }\n\n onChange([...domains, trimmed]);\n setInputValue('');\n setError(null);\n };\n\n // eslint-disable-next-line custom-rules/require-single-object-param\n const handleRemove = (domain: string) => {\n onChange(domains.filter((d) => d !== domain));\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n handleAdd();\n }\n };\n\n return (\n <div className={cn('space-y-3', className)}>\n <div className=\"flex gap-2\">\n <div className=\"flex-1\">\n <Input\n value={inputValue}\n onChange={(e) => {\n setInputValue(e.target.value);\n setError(null);\n }}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-invalid={!!error}\n />\n {error && (\n <p className=\"text-xs text-[var(--text-danger)] mt-1\">{error}</p>\n )}\n </div>\n <Button\n variant=\"outline\"\n size=\"default\"\n onClick={handleAdd}\n disabled={!inputValue.trim()}\n type=\"button\"\n >\n <HugeiconsIcon icon={Add01Icon} size={16} />\n Add\n </Button>\n </div>\n {domains.length > 0 && (\n <ul className=\"space-y-1.5\">\n {domains.map((domain) => (\n <li\n key={domain}\n className=\"flex items-center justify-between gap-2 rounded-md border bg-[var(--bg-bottom)] px-3 py-2 text-sm\"\n >\n <span className=\"font-mono text-sm truncate\">{domain}</span>\n <button\n type=\"button\"\n onClick={() => handleRemove(domain)}\n className=\"shrink-0 rounded-sm p-0.5 text-muted-foreground hover:text-[var(--text-danger)] transition-[color] duration-150 relative before:absolute before:-inset-[11px] before:content-['']\"\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n};\n\nexport { DomainList };\n","'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Cancel01Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\n\nimport { cn } from '../../lib/utils';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\nexport interface InfoBannerProps {\n children: ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n}\n\nexport const InfoBanner = ({\n children,\n dismissible = false,\n onDismiss,\n className,\n}: InfoBannerProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n const shouldReduceMotion = useReducedMotion();\n\n if (dismissed) return null;\n\n return (\n <div\n className={cn(\n 'flex items-center gap-2 rounded-lg border border-border bg-muted/50 px-3 py-2 text-sm text-muted-foreground',\n className\n )}\n >\n <span className=\"text-muted-foreground shrink-0\">\n <HugeiconsIcon icon={InformationCircleIcon} size={16} />\n </span>\n <div className=\"flex-1 min-w-0 text-pretty\">{children}</div>\n {dismissible && (\n <motion.button\n whileTap={shouldReduceMotion ? undefined : { scale: 0.96 }}\n transition={spring}\n onClick={() => {\n setDismissed(true);\n onDismiss?.();\n }}\n className=\"relative before:absolute before:-inset-[13px] before:content-[''] shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-[opacity] touch-manipulation cursor-pointer\"\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </motion.button>\n )}\n </div>\n );\n};\n","import { type ReactElement, useMemo } from 'react';\n\nimport { Skeleton } from '../ui/skeleton';\nimport { cn } from '../../lib/utils';\n\nconst buildIdList = (length: number): string[] =>\n Array.from({ length }, () => crypto.randomUUID());\n\n/** Full-page skeleton with header and content area */\nexport const PageSkeleton = ({\n className,\n}: {\n className?: string;\n}): ReactElement => {\n return (\n <div className={cn('space-y-6 p-6', className)}>\n <div className=\"space-y-2\">\n <Skeleton className=\"h-8 w-48\" />\n <Skeleton className=\"h-4 w-96\" />\n </div>\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\n <StatCardSkeleton />\n <StatCardSkeleton />\n <StatCardSkeleton />\n </div>\n <TableSkeleton rows={5} />\n </div>\n );\n};\n\n/** Stat/metric card skeleton */\nexport const StatCardSkeleton = ({\n className,\n}: {\n className?: string;\n}): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl p-5 shadow-[var(--shadow-card)] bg-card',\n className\n )}\n >\n <div className=\"flex items-center justify-between mb-3\">\n <Skeleton className=\"h-4 w-24\" />\n <Skeleton className=\"size-8 rounded-lg\" />\n </div>\n <Skeleton className=\"h-8 w-20 mb-1\" />\n <Skeleton className=\"h-4 w-16\" />\n </div>\n );\n};\n\n/** Table skeleton with configurable rows */\nexport const TableSkeleton = ({\n rows = 5,\n columns = 4,\n className,\n}: {\n className?: string;\n columns?: number;\n rows?: number;\n}): ReactElement => {\n // Stable identity keys so React doesn't remount on re-render. Indices are\n // unsuitable here because the lists are fixed-length but Sonar's S6479 flags\n // index-derived keys.\n const headerIds = useMemo(() => buildIdList(columns), [columns]);\n const rowIds = useMemo(() => buildIdList(rows), [rows]);\n const colIds = useMemo(() => buildIdList(columns), [columns]);\n\n return (\n <div\n className={cn(\n 'rounded-xl border shadow-[var(--shadow-card)] bg-card overflow-hidden',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-center gap-4 px-4 py-3 border-b\">\n {headerIds.map((id) => (\n <Skeleton key={id} className=\"h-4 flex-1\" />\n ))}\n </div>\n {/* Rows */}\n {rowIds.map((rowId) => (\n <div\n key={rowId}\n className=\"flex items-center gap-4 px-4 py-3 border-b last:border-b-0\"\n >\n {colIds.map((colId, colIdx) => (\n <Skeleton\n key={`${rowId}-${colId}`}\n className={cn(\n 'h-4 flex-1',\n colIdx === 0 && 'max-w-32',\n colIdx === columns - 1 && 'max-w-16'\n )}\n />\n ))}\n </div>\n ))}\n </div>\n );\n};\n\n/** Card skeleton */\nexport const CardSkeleton = ({\n className,\n}: {\n className?: string;\n}): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl p-6 shadow-[var(--shadow-card)] bg-card space-y-4',\n className\n )}\n >\n <div className=\"space-y-2\">\n <Skeleton className=\"h-5 w-32\" />\n <Skeleton className=\"h-4 w-48\" />\n </div>\n <Skeleton className=\"h-24 w-full\" />\n <div className=\"flex gap-2\">\n <Skeleton className=\"h-9 w-20\" />\n <Skeleton className=\"h-9 w-20\" />\n </div>\n </div>\n );\n};\n","import { type ComponentType, type ReactElement } from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Skeleton } from '../ui/skeleton';\n\ntype Trend = 'up' | 'down' | 'neutral';\n\ntype IconComponent = ComponentType<{ className?: string; size?: number }>;\n\ninterface MetricCardBaseProps {\n className?: string;\n icon?: IconComponent;\n label: string;\n loading?: boolean;\n}\n\nexport interface MetricCardActiveProps extends MetricCardBaseProps {\n inactive?: false;\n trend?: Trend;\n trendValue?: string;\n value: string | number;\n}\n\nexport interface MetricCardInactiveProps extends MetricCardBaseProps {\n inactive: true;\n onSetup: () => void;\n setupDescription?: string;\n setupLabel: string;\n trend?: never;\n trendValue?: never;\n value?: never;\n}\n\ntype MetricCardProps = MetricCardActiveProps | MetricCardInactiveProps;\n\nconst trendColor: Record<Trend, string> = {\n down: 'text-[var(--text-danger)]',\n neutral: 'text-muted-foreground',\n up: 'text-[var(--text-success)]',\n};\n\nexport const MetricCard = (props: MetricCardProps): ReactElement => {\n const { label, icon: Icon, loading = false, className } = props;\n\n if (loading) {\n return (\n <div\n className={cn(\n 'rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4',\n className\n )}\n >\n <Skeleton className=\"h-3.5 w-20 mb-2.5\" />\n <Skeleton className=\"h-7 w-24\" />\n </div>\n );\n }\n\n if (props.inactive) {\n return (\n <div\n className={cn(\n 'rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4',\n className\n )}\n >\n <div className=\"flex items-center gap-1.5\">\n {Icon && <Icon className=\"size-3.5 text-muted-foreground\" />}\n <span className=\"text-[13px] text-muted-foreground font-medium\">\n {label}\n </span>\n </div>\n <div className=\"text-2xl font-semibold tracking-tight text-muted-foreground/30 tabular-nums mt-1.5\">\n 0\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={cn(\n 'rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4',\n className\n )}\n >\n <div className=\"flex items-center gap-1.5\">\n {Icon && <Icon className=\"size-3.5 text-muted-foreground\" />}\n <span className=\"text-[13px] text-muted-foreground font-medium\">\n {label}\n </span>\n </div>\n <div className=\"flex items-baseline gap-2 mt-1.5\">\n <span className=\"text-2xl font-semibold tracking-tight tabular-nums\">\n {props.value}\n </span>\n {props.trend && props.trendValue && (\n <span\n className={cn(\n 'text-xs font-medium tabular-nums',\n trendColor[props.trend]\n )}\n >\n {props.trendValue}\n </span>\n )}\n </div>\n </div>\n );\n};\n","'use client';\n\n/**\n * Placeholder stub for the docs-AI sheet.\n *\n * Renders nothing in droplet — the real sheet lives in the consumer app and\n * subscribes to the `docsPath` to surface contextual AI help. Kept here so\n * `PageActions` can mount it unconditionally without each consumer wiring it.\n */\nexport const AskAISheet = ({\n docsPath: _docsPath,\n}: {\n docsPath?: string;\n}): null => {\n return null;\n};\n","import type { ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { WebhookIcon } from '@hugeicons/core-free-icons';\nimport Link from 'next/link';\n\nimport { Button } from '../ui/button';\nimport { AskAISheet } from '../ask-ai-sheet';\n\nexport const AskAIAction = ({\n docsPath,\n}: {\n docsPath?: string;\n}): ReactElement => {\n return <AskAISheet docsPath={docsPath} />;\n};\n\nexport const WebhooksAction = (): ReactElement => {\n return (\n <Button variant=\"outline\" size=\"sm\" asChild>\n <Link href=\"/dashboard/developers?tab=webhooks\">\n <HugeiconsIcon icon={WebhookIcon} size={14} />\n Webhooks\n </Link>\n </Button>\n );\n};\n","'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\n/**\n * Props for {@link PageHeader}.\n *\n * @description `title` is the page heading; `description` renders muted\n * supporting text under it; `badge` sits next to the title; `actions` render\n * right-aligned; `className` merges onto the outer wrapper.\n * @example\n * ```tsx\n * const props: PageHeaderProps = {\n * title: 'Accounts',\n * description: 'Manage your accounts',\n * };\n * ```\n * @see PageHeader\n * @see ProductPageLayout\n */\nexport type PageHeaderProps = {\n actions?: ReactNode;\n badge?: ReactNode;\n className?: string;\n description?: string;\n title: string;\n};\n\n/**\n * Standard page heading — title, optional muted description, optional badge\n * next to the title and optional actions on the right. `ProductPageLayout`\n * renders the same header internally; use this on pages outside it so every\n * page shares one header pattern.\n *\n * @description Renders the shared dashboard page header pattern.\n * @example\n * ```tsx\n * <PageHeader\n * title=\"Accounts\"\n * description=\"Manage your accounts\"\n * actions={<Button>New account</Button>}\n * />\n * ```\n * @returns The rendered page header element.\n * @see ProductPageLayout\n * @see SettingsSection\n */\nexport const PageHeader = ({\n title,\n description,\n badge,\n actions,\n className,\n}: PageHeaderProps): ReactElement => (\n <div className={cn('flex items-start justify-between gap-4', className)}>\n <div>\n {badge ? (\n <div className='flex flex-wrap items-center gap-2'>\n <h1 className='text-2xl font-semibold text-balance'>{title}</h1>\n {badge}\n </div>\n ) : (\n <h1 className='text-2xl font-semibold text-balance'>{title}</h1>\n )}\n {description && (\n <p className='text-sm text-muted-foreground mt-1 text-pretty'>\n {description}\n </p>\n )}\n </div>\n {actions && (\n <div className='flex items-center gap-2 shrink-0'>{actions}</div>\n )}\n </div>\n);\n","'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { cn } from '../../lib/utils';\nimport { PageHeader } from '../page-header';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ninterface Tab {\n description?: string;\n heading?: string;\n id: string;\n label: string;\n}\n\nexport interface ProductPageLayoutProps {\n activeTab: string;\n children: ReactNode;\n headerActions?: ReactNode;\n headerContent?: ReactNode;\n onTabChange: (tabId: string) => void;\n sidebarFooter?: ReactNode;\n tabs: Tab[];\n title: string;\n}\n\nexport const ProductPageLayout = ({\n title,\n tabs,\n activeTab,\n onTabChange,\n children,\n headerActions,\n headerContent,\n sidebarFooter,\n}: ProductPageLayoutProps): ReactElement => {\n const activeTabConfig = tabs.find((t) => t.id === activeTab);\n const shouldReduceMotion = useReducedMotion();\n\n return (\n <div className=\"flex h-full\">\n {/* Sub-nav sidebar */}\n <nav className=\"w-52 shrink-0 bg-background overflow-y-auto py-4 px-3 flex flex-col\">\n <h2 className=\"px-3 mb-3 text-sm font-semibold text-balance\">\n {title}\n </h2>\n <div className=\"flex flex-col gap-0.5\">\n {tabs.map((tab) => (\n <motion.button\n key={tab.id}\n whileTap={shouldReduceMotion ? undefined : { scale: 0.96 }}\n transition={spring}\n onClick={() => onTabChange(tab.id)}\n className={cn(\n 'flex items-center rounded-md px-3 py-1.5 text-[13px] font-medium transition-[color,background-color] text-left touch-manipulation',\n activeTab === tab.id\n ? 'bg-muted text-foreground'\n : 'text-muted-foreground hover:bg-muted/50 hover:text-foreground'\n )}\n >\n {tab.label}\n </motion.button>\n ))}\n </div>\n {sidebarFooter && <div className=\"mt-auto pt-4\">{sidebarFooter}</div>}\n </nav>\n\n {/* Content area */}\n <div className=\"flex-1 overflow-auto\">\n <div className=\"px-10 py-8 space-y-8\">\n {headerContent ?? (\n <PageHeader\n title={\n activeTabConfig?.heading ??\n activeTabConfig?.label ??\n activeTab\n }\n description={activeTabConfig?.description}\n actions={headerActions}\n />\n )}\n {children}\n </div>\n </div>\n </div>\n );\n};\n","import { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface SettingsSectionProps {\n children: ReactNode;\n className?: string;\n description?: string;\n title: string;\n variant?: 'default' | 'danger';\n}\n\nexport const SettingsSection = ({\n title,\n description,\n children,\n variant = 'default',\n className,\n}: SettingsSectionProps): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl border p-6 shadow-[var(--shadow-card)] bg-card',\n variant === 'danger' && 'border-[var(--border-danger)]/30',\n className\n )}\n >\n <div className=\"mb-4\">\n <h3\n className={cn(\n 'text-sm font-semibold text-balance',\n variant === 'danger' && 'text-[var(--text-danger)]'\n )}\n >\n {title}\n </h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-4\">{children}</div>\n </div>\n );\n};\n","import type { ReactElement } from 'react';\n\nimport { Badge } from '../ui/badge';\n\ntype StatusType =\n | 'active'\n | 'inactive'\n | 'blocked'\n | 'pending'\n | 'live'\n | 'sandbox'\n | 'processing';\n\nconst statusConfig: Record<\n StatusType,\n {\n label: string;\n variant:\n | 'success'\n | 'inactive'\n | 'danger'\n | 'warning'\n | 'brand'\n | 'process';\n }\n> = {\n active: { label: 'Active', variant: 'success' },\n blocked: { label: 'Blocked', variant: 'danger' },\n inactive: { label: 'Inactive', variant: 'inactive' },\n live: { label: 'Live', variant: 'success' },\n pending: { label: 'Pending', variant: 'warning' },\n processing: { label: 'Processing', variant: 'process' },\n sandbox: { label: 'Sandbox', variant: 'warning' },\n};\n\nexport interface StatusBadgeProps {\n className?: string;\n label?: string;\n status: StatusType;\n}\n\nexport const StatusBadge = ({\n status,\n label,\n className,\n}: StatusBadgeProps): ReactElement => {\n const config = statusConfig[status];\n\n return (\n // No leading dot: the badge's colour and label already carry the status, and a dot repeated down a column is noise.\n <Badge variant={config.variant} className={className}>\n {label || config.label}\n </Badge>\n );\n};\n","'use client';\n\nimport {\n type ComponentProps,\n type ReactElement,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { Tabs, TabsList, TabsTrigger } from '../ui/tabs';\n\n/**\n * A single tab in {@link TabNavigation}.\n *\n * @description `value` keys the tab and its `TabsContent` panel; `label` is the\n * visible tab text; `disabled` blocks selection and is skipped for the initial\n * selection.\n * @example\n * ```tsx\n * const item: TabNavigationItem = { label: 'Invitations', value: 'invitations' };\n * ```\n * @see TabNavigation\n * @see TabNavigationProps\n */\ntype TabNavigationItem = {\n disabled?: boolean;\n label: string;\n value: string;\n};\n\n/**\n * Props for {@link TabNavigation}. Extends the underlying `Tabs` props except\n * `orientation`, which is fixed to horizontal: the underline indicator and\n * navigation styles only apply to a horizontal tab list.\n *\n * @description `items` renders the tabs in order; `listLabel` gives the tab\n * list an accessible name; `defaultValue` picks the initially selected tab in\n * uncontrolled use; `value`/`onValueChange` control selection.\n * @example\n * ```tsx\n * const props: TabNavigationProps = {\n * items: [\n * { label: 'All', value: 'all' },\n * { label: 'Invitations', value: 'invitations' },\n * ],\n * listLabel: 'Users',\n * };\n * ```\n * @see TabNavigation\n * @see ProductPageLayout\n */\ntype TabNavigationProps = Omit<ComponentProps<typeof Tabs>, 'orientation'> & {\n items: TabNavigationItem[];\n listLabel?: string;\n};\n\n/**\n * Full-width underline tab navigation for switching between related views,\n * built on {@link Tabs}. The blue underline slides between tabs; pass\n * `TabsContent` elements as children when the component owns the panels.\n *\n * @description Without `defaultValue`, the first enabled item is selected. If\n * uncontrolled `items` later change so the selection is missing or disabled,\n * the selection moves to the first enabled item.\n * @example\n * ```tsx\n * <TabNavigation\n * items={[\n * { label: 'All', value: 'all' },\n * { label: 'Invitations', value: 'invitations' },\n * ]}\n * listLabel=\"Users\"\n * >\n * <TabsContent value=\"all\">All users</TabsContent>\n * <TabsContent value=\"invitations\">Pending invitations</TabsContent>\n * </TabNavigation>\n * ```\n * @returns The rendered tab navigation element.\n * @see Tabs\n * @see ProductPageLayout\n */\nconst TabNavigation = ({\n children,\n defaultValue,\n items,\n listLabel,\n onValueChange,\n value,\n ...props\n}: TabNavigationProps): ReactElement => {\n const [internalValue, setInternalValue] = useState(\n defaultValue ?? items.find((item) => !item.disabled)?.value\n );\n const selectedValue = value ?? internalValue;\n const shouldReduceMotion = useReducedMotion();\n const listRef = useRef<HTMLDivElement | null>(null);\n const [indicator, setIndicator] = useState<\n { left: number; width: number } | undefined\n >();\n\n // Measure the active trigger so a single indicator can animate left/width\n // between tabs. The mount/unmount layoutId pattern never fires a shared\n // transition here (motion@12), so the underline would sit still.\n useLayoutEffect(() => {\n const list = listRef.current;\n if (!list) return;\n const measure = () => {\n const active = list.querySelector<HTMLElement>(\n '[data-slot=\"tabs-trigger\"][data-state=\"active\"]'\n );\n setIndicator(\n active\n ? { left: active.offsetLeft, width: active.offsetWidth }\n : undefined\n );\n };\n measure();\n // Observe every trigger, not just the list: a label edit can resize one\n // tab (and shift the rest) without changing the list's own box.\n const observer =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(measure);\n list\n .querySelectorAll<HTMLElement>('[data-slot=\"tabs-trigger\"]')\n .forEach((trigger) => observer?.observe(trigger));\n return () => observer?.disconnect();\n }, [selectedValue, items]);\n\n // Re-select the first enabled item when an uncontrolled list changes under a\n // missing or disabled selection (e.g. items loading in after an empty mount).\n const [prevItems, setPrevItems] = useState(items);\n if (prevItems !== items) {\n setPrevItems(items);\n if (\n defaultValue === undefined &&\n value === undefined &&\n !items.some((item) => item.value === internalValue && !item.disabled)\n ) {\n setInternalValue(items.find((item) => !item.disabled)?.value);\n }\n }\n\n return (\n <Tabs\n {...props}\n value={selectedValue}\n onValueChange={(nextValue) => {\n setInternalValue(nextValue);\n onValueChange?.(nextValue);\n }}\n >\n <TabsList\n variant=\"navigation\"\n aria-label={listLabel}\n ref={listRef}\n className=\"relative\"\n >\n {items.map(({ disabled, label, value }) => (\n <TabsTrigger key={value} value={value} disabled={disabled}>\n {label}\n </TabsTrigger>\n ))}\n {indicator && (\n <motion.span\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 -bottom-px h-px bg-(--action)\"\n initial={false}\n animate={{ width: indicator.width, x: indicator.left }}\n transition={\n shouldReduceMotion\n ? { duration: 0 }\n : { duration: 0.2, ease: [0.645, 0.045, 0.355, 1] }\n }\n />\n )}\n </TabsList>\n {children}\n </Tabs>\n );\n};\n\nexport { TabNavigation };\nexport type { TabNavigationItem, TabNavigationProps };\n","/**\n * ToggleCard — droplet's rich toggle composite.\n *\n * Rebuilt from Northstar's SingleToggleCard to support the redcoast dashboard\n * migration. ToggleRow (sibling primitive) remains the minimal/canonical\n * single-line toggle; ToggleCard is the multi-feature card variant with:\n * - Accordion expand/collapse for nested children\n * - Pluggable input type: switch (default), radio, or checkbox\n * - Optional left icon\n * - Tags row above the title and a RightSideTags slot on the right\n * - Optional notification dot in the trigger\n * - Optional `actionLink` rendered below content\n * - Optional `customActionIcon` rendered alongside the trigger affordance\n * - Whole-card click handler\n *\n * The API mirrors Northstar SingleToggleCard so a redcoast migration can be a\n * mechanical rename. Where the Northstar API surfaced layout-tuning props\n * (`disableHover`, `dontSeparateContentFromHeader`, `descriptionModificators`,\n * `titleModificators`) the equivalent expression here is via Tailwind classes\n * on `className` or `triggerClassName`.\n *\n * Authored in droplet so a single canonical card is available across teams.\n * Backed by Card + Switch/Checkbox/RadioGroup + Radix Accordion.\n */\nimport { type ChangeEvent, type FC, type ReactElement, type ReactNode, useId } from 'react';\nimport {\n Content as AccordionContent,\n Header as AccordionHeader,\n Item as AccordionItem,\n Root as AccordionRoot,\n Trigger as AccordionTrigger,\n} from '@radix-ui/react-accordion';\n\nimport { cn } from '../../lib/utils';\nimport { Switch } from '../ui/switch';\nimport { Checkbox } from '../ui/checkbox';\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group';\n\ntype ToggleCardInputType = 'toggle' | 'radio' | 'checkbox';\n\nexport type ToggleCardInputProps = {\n checked?: boolean;\n disabled?: boolean;\n /** Hide the input control entirely (useful when the row is informational). */\n hidden?: boolean;\n id?: string;\n /** When true, renders a lock badge instead of a switch — signals the value\n * is fixed and cannot be toggled via this UI. Implies disabled. */\n isLocked?: boolean;\n /** Indicates the saved/unsaved state via styling — informational, optional. */\n isSaved?: boolean;\n /** When true, paints the input with the warning accent (informational). */\n isWarning?: boolean;\n name?: string;\n /** Native onChange — receives a synthetic event for parity with HTML inputs. */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /** Controls which control element renders next to the title. */\n type?: ToggleCardInputType;\n};\n\nexport type ToggleCardTag = {\n Tag: ReactElement;\n id: string;\n};\n\nexport type ToggleCardActionLink = {\n onClick: () => void;\n text: string;\n};\n\nexport type ToggleCardCustomActionIcon = {\n Icon: ReactElement;\n className?: string;\n};\n\nexport type ToggleCardProps = {\n /** Optional icon rendered before the title. */\n Icon?: ReactElement;\n /** Tags shown on the RIGHT side of the trigger (e.g. status badges). */\n RightSideTags?: ToggleCardTag[];\n /** Tags shown ABOVE the title (e.g. status pills). */\n Tags?: ToggleCardTag[];\n /** Required key for Radix Accordion item identity. */\n accordionKey: string;\n /** Action button rendered at the bottom of expanded content. */\n actionLink?: ToggleCardActionLink;\n /** Whether the accordion CAN expand. Defaults to true. */\n allowExpand?: boolean;\n /** Children — rendered inside the AccordionContent when expanded. */\n children?: ReactNode;\n /** className applied to the outer Accordion root. */\n className?: string;\n /** Whether the accordion can be collapsed (Radix `collapsible`). */\n collapsible?: boolean;\n /** Replaces the default chevron with a custom icon. */\n customActionIcon?: ToggleCardCustomActionIcon;\n /** Whether the accordion is expanded by default. */\n defaultExpanded?: boolean;\n /** Optional secondary line below the title. */\n description?: string;\n /** Disables the entire card (input + trigger). */\n disabled?: boolean;\n /** Inputs (toggle/radio/checkbox) rendered alongside the title. */\n inputProps?: ToggleCardInputProps;\n /** When true, draws a notification dot on the trigger. */\n notification?: boolean;\n /**\n * Click handler for the whole card surface.\n *\n * @deprecated Currently a no-op: attaching onClick to a wrapper that nests\n * interactive children (AccordionTrigger, Switch / Checkbox / RadioGroup)\n * is an a11y anti-pattern. Kept in the type signature for Northstar\n * mechanical-rename parity. A future iteration may re-introduce this with\n * a dedicated click target (e.g. an overlay button) outside the nested\n * interactives.\n */\n onCardClick?: () => void;\n /** Accordion value-change handler. */\n onValueChange?: (value: string | undefined) => void;\n /** Card title — rendered as the primary label inside the trigger. */\n title?: string;\n /** className applied to the trigger row. */\n triggerClassName?: string;\n /** Test id applied to the accordion trigger element. */\n triggerTestId?: string;\n /** Controlled accordion value. */\n value?: string;\n};\n\nconst inputCommon =\n 'shrink-0 touch-manipulation cursor-pointer disabled:cursor-not-allowed disabled:opacity-50';\n\n// Internal helper — two positional params are clearer here than wrapping in\n// an object. Signature is private to this module.\n// eslint-disable-next-line custom-rules/require-single-object-param\nconst renderInput = (\n input: ToggleCardInputProps | undefined,\n id: string\n): ReactElement | null => {\n if (!input || input.hidden) return null;\n // Locked state: render a compact lock badge instead of a switch. Signals to\n // users that the value is fixed by an external constraint (plan tier,\n // global setting, etc.) and cannot be changed via this control.\n if (input.isLocked) {\n return (\n <div\n aria-label=\"Locked\"\n title=\"Locked\"\n className=\"shrink-0 inline-flex items-center justify-center size-5 rounded-full bg-muted text-muted-foreground mt-0.5\"\n >\n <svg\n className=\"size-3\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n >\n <rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0110 0v4\" />\n </svg>\n </div>\n );\n }\n const type = input.type ?? 'toggle';\n // Internal handler — single boolean is the natural shape for an onChange\n // callback. Wrapping in an object would be ceremony.\n // eslint-disable-next-line custom-rules/require-single-object-param\n const handleChange = (next: boolean) => {\n if (!input.onChange) return;\n // Synthesize a minimal ChangeEvent so consumers expecting native event\n // shape keep working.\n input.onChange({\n target: { checked: next, name: input.name ?? '' },\n } as ChangeEvent<HTMLInputElement>);\n };\n if (type === 'toggle') {\n return (\n <Switch\n id={input.id ?? id}\n checked={Boolean(input.checked)}\n disabled={input.disabled}\n onCheckedChange={handleChange}\n className={cn(inputCommon, 'mt-0.5')}\n />\n );\n }\n if (type === 'checkbox') {\n return (\n <Checkbox\n id={input.id ?? id}\n checked={Boolean(input.checked)}\n disabled={input.disabled}\n onCheckedChange={(state) => handleChange(state === true)}\n className={cn(inputCommon, 'mt-1')}\n />\n );\n }\n // radio — wrap in a single-item RadioGroup so semantics are preserved\n return (\n <RadioGroup\n value={input.checked ? input.id ?? id : ''}\n onValueChange={(v) => handleChange(v === (input.id ?? id))}\n disabled={input.disabled}\n className=\"shrink-0 mt-0.5\"\n >\n <RadioGroupItem\n id={input.id ?? id}\n value={input.id ?? id}\n className={inputCommon}\n />\n </RadioGroup>\n );\n};\n\nexport const ToggleCard: FC<ToggleCardProps> = ({\n accordionKey,\n title,\n description,\n // Note: the `Icon` prop is accepted in ToggleCardProps for API parity with\n // Northstar's SingleToggleCard but intentionally not destructured/rendered\n // here (toggle cards do not render a leading icon per droplet design).\n // Drop the prop at the migration sweep when touching each consumer.\n inputProps,\n allowExpand = true,\n defaultExpanded,\n value,\n onValueChange,\n collapsible = true,\n Tags,\n RightSideTags,\n notification,\n actionLink,\n customActionIcon,\n // Intentionally unused — see ToggleCardProps['onCardClick'] JSDoc.\n onCardClick: _onCardClick,\n children,\n disabled,\n triggerTestId,\n className,\n triggerClassName,\n}) => {\n const generatedId = useId();\n const inputId = inputProps?.id ?? generatedId;\n // Parent-with-nested-children mode: the trigger row is the \"section header\"\n // for a group of sub-toggles. Visual hierarchy reads correctly when the\n // header sits on a muted/grey surface and the nested children get the\n // clean white card surface below.\n const isParentMode = !allowExpand && Boolean(children);\n\n // Extracted to keep the main render's cognitive complexity below the\n // Sonar threshold. Content sits inside an AccordionContent when\n // expandable, or directly under the header when not.\n const renderContent = () => {\n const actionLinkButton = actionLink ? (\n <button\n type=\"button\"\n onClick={actionLink.onClick}\n className=\"mt-3 text-sm font-medium text-(--action) hover:underline underline-offset-4 cursor-pointer\"\n >\n {actionLink.text}\n </button>\n ) : null;\n\n if (allowExpand) {\n return (\n <AccordionContent className=\"border-t border-border-divider px-5 py-4\">\n {children}\n {actionLinkButton}\n </AccordionContent>\n );\n }\n\n // When the accordion can't expand, children still render as nested\n // content below the header. Used for the \"parent + sub-toggles\"\n // pattern. Children sit on the clean card surface (white) so the\n // visual contrast with the grey header above signals the hierarchy.\n if (!children && !actionLink) return null;\n return (\n <div className=\"border-t border-border-divider bg-card px-5 py-3 space-y-2\">\n {children}\n {actionLinkButton}\n </div>\n );\n };\n\n return (\n <AccordionRoot\n type=\"single\"\n collapsible={collapsible}\n defaultValue={defaultExpanded ? accordionKey : undefined}\n value={value}\n onValueChange={onValueChange}\n data-slot=\"toggle-card\"\n className={cn(\n 'rounded-xl bg-card shadow-card overflow-hidden',\n disabled && 'opacity-60',\n className\n )}\n >\n <AccordionItem value={accordionKey} className=\"border-0\">\n <AccordionHeader className=\"m-0\">\n {/* The wrapper is intentionally non-interactive. `onCardClick` is\n kept in the API for Northstar parity but currently no-ops —\n attaching an onClick here is an a11y anti-pattern because the\n wrapper nests an AccordionTrigger button and the input control\n (switch / checkbox / radio). Adding role='button' + tabIndex\n would either nest two interactives or trigger Sonar's \"use\n <button> instead of role\" rule. Consumers that need\n whole-card-click should wire it to a specific child instead. */}\n <div\n className={cn(\n 'group flex items-start gap-3 px-5 py-4',\n isParentMode && 'bg-bg-bottom',\n triggerClassName\n )}\n >\n {renderInput(inputProps, inputId)}\n <div className=\"flex-1 min-w-0\">\n {title && (\n <div className=\"flex items-baseline gap-1.5 flex-wrap leading-5\">\n <label\n htmlFor={inputId}\n className={cn(\n 'text-sm font-medium select-none leading-5',\n disabled && 'text-muted-foreground'\n )}\n >\n {title}\n {notification && (\n <span\n aria-hidden\n className=\"inline-block ml-1.5 size-1.5 rounded-full bg-destructive align-middle\"\n />\n )}\n </label>\n {Tags && Tags.length > 0 && (\n <>\n {Tags.map((t) => (\n <span key={t.id} className=\"leading-5\">\n {t.Tag}\n </span>\n ))}\n </>\n )}\n </div>\n )}\n {!title && Tags && Tags.length > 0 && (\n <div className=\"flex items-baseline gap-1.5 mb-1 leading-5\">\n {Tags.map((t) => (\n <span key={t.id} className=\"leading-5\">\n {t.Tag}\n </span>\n ))}\n </div>\n )}\n {description && (\n <p className=\"text-sm text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-2 shrink-0 self-start\">\n {RightSideTags && RightSideTags.length > 0 && (\n <div className=\"flex items-center gap-1.5\">\n {RightSideTags.map((t) => (\n <span key={t.id}>{t.Tag}</span>\n ))}\n </div>\n )}\n {allowExpand && (\n <AccordionTrigger\n data-testid={triggerTestId}\n className={cn(\n 'shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-[transform,background-color] duration-150 hover:bg-overlay-hover [&[data-state=open]>svg]:rotate-180',\n customActionIcon?.className\n )}\n disabled={!allowExpand}\n >\n {customActionIcon ? (\n customActionIcon.Icon\n ) : (\n <svg\n className=\"size-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n )}\n </AccordionTrigger>\n )}\n </div>\n </div>\n </AccordionHeader>\n {renderContent()}\n </AccordionItem>\n </AccordionRoot>\n );\n};\n","'use client';\n\n/**\n * Base wrapper for animated icons. Handles ref (startAnimation/stopAnimation),\n * mouse enter/leave animation, and the outer div. Use via render prop:\n *\n * <AnimatedIcon ref={ref} size={28} {...props}>\n * {(controls, size) => (\n * <svg height={size} ...> or <motion.svg animate={controls} ...>...</motion.svg>\n * )}\n * </AnimatedIcon>\n *\n * Icons with custom handle logic (e.g. triggerCopied, custom startAnimation)\n * keep their own useImperativeHandle and do not use this base.\n */\n\nimport type { HTMLAttributes, MouseEvent, ReactNode } from 'react';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport { useAnimation } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport interface AnimatedIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n}\n\nexport interface AnimatedIconProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n children: (\n controls: ReturnType<typeof useAnimation>,\n size: number,\n ) => ReactNode;\n size?: number;\n}\n\nconst AnimatedIcon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(\n (\n { children, className, onMouseEnter, onMouseLeave, size = 28, ...props },\n ref,\n ) => {\n const controls = useAnimation();\n const isControlledRef = useRef(false);\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true;\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n };\n });\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e);\n } else {\n controls.start('animate').catch(() => undefined);\n }\n },\n [controls, onMouseEnter],\n );\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e);\n } else {\n controls.start('normal').catch(() => undefined);\n }\n },\n [controls, onMouseLeave],\n );\n\n return (\n <div\n aria-hidden='true'\n className={cn('inline-flex items-center justify-center', className)}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n {children(controls, size)}\n </div>\n );\n },\n);\n\nAnimatedIcon.displayName = 'AnimatedIcon';\n\nexport { AnimatedIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ArrowUpRightIconHandle = AnimatedIconHandle;\n\ntype ArrowUpRightIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst ArrowUpRightIcon = forwardRef<ArrowUpRightIconHandle, ArrowUpRightIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M7 17 17 7'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { x: [0, 2, 0], y: [0, -2, 0] }, normal: { x: 0, y: 0 } }}\n />\n <motion.path\n animate={controls}\n d='M7 7h10v10'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { x: [0, 2, 0], y: [0, -2, 0] }, normal: { x: 0, y: 0 } }}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nArrowUpRightIcon.displayName = 'ArrowUpRightIcon';\n\nexport { ArrowUpRightIcon };\n","'use client';\n\nimport type { HTMLAttributes, MouseEvent } from 'react';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport interface ChartBarIncreasingIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n}\n\ninterface ChartBarIncreasingIconProps extends HTMLAttributes<HTMLDivElement> {\n size?: number;\n}\n\nconst LINE_VARIANTS: Variants = {\n hidden: { opacity: 0, pathLength: 0 },\n visible: { opacity: 1, pathLength: 1 },\n};\n\ntype TransitionForResult = { delay: number; duration: number };\n\nconst transitionFor = (i: number): TransitionForResult => ({\n delay: i * 0.1,\n duration: 0.3,\n});\n\nconst ChartBarIncreasingIcon = forwardRef<\n ChartBarIncreasingIconHandle,\n ChartBarIncreasingIconProps\n>(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n const controls = useAnimation();\n const isControlledRef = useRef(false);\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true;\n return {\n startAnimation: async () => {\n await controls.start((i) => ({\n opacity: 0,\n pathLength: 0,\n transition: transitionFor(i),\n }));\n await controls.start((i) => ({\n opacity: 1,\n pathLength: 1,\n transition: transitionFor(i),\n }));\n },\n stopAnimation: () => controls.start('visible'),\n };\n });\n\n const handleMouseEnter = useCallback(\n async (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e);\n } else {\n await controls.start((i) => ({\n opacity: 0,\n pathLength: 0,\n transition: transitionFor(i),\n }));\n await controls.start((i) => ({\n opacity: 1,\n pathLength: 1,\n transition: transitionFor(i),\n }));\n }\n },\n [controls, onMouseEnter]\n );\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e);\n } else {\n controls.start('visible').catch(() => undefined);\n }\n },\n [controls, onMouseLeave]\n );\n\n return (\n <div\n aria-hidden=\"true\"\n className={cn('inline-flex items-center justify-center', className)}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n <svg\n fill=\"none\"\n height={size}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M3 3v16a2 2 0 0 0 2 2h16\" />\n <motion.path\n animate={controls}\n custom={1}\n d=\"M7 11h8\"\n initial=\"visible\"\n variants={LINE_VARIANTS}\n />\n <motion.path\n animate={controls}\n custom={2}\n d=\"M7 16h12\"\n initial=\"visible\"\n variants={LINE_VARIANTS}\n />\n <motion.path\n animate={controls}\n custom={0}\n d=\"M7 6h3\"\n initial=\"visible\"\n variants={LINE_VARIANTS}\n />\n </svg>\n </div>\n );\n});\n\nChartBarIncreasingIcon.displayName = 'ChartBarIncreasingIcon';\n\nexport { ChartBarIncreasingIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ChevronDownIconHandle = AnimatedIconHandle;\n\ntype ChevronDownIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.5,\n times: [0, 0.4, 1],\n};\n\nconst ChevronDownIcon = forwardRef<ChevronDownIconHandle, ChevronDownIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='m6 9 6 6 6-6'\n transition={DEFAULT_TRANSITION}\n variants={{\n animate: { y: [0, 2, 0] },\n normal: { y: 0 },\n }}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nexport { ChevronDownIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ChevronRightIconHandle = AnimatedIconHandle;\n\ntype ChevronRightIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst ChevronRightIcon = forwardRef<ChevronRightIconHandle, ChevronRightIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='m9 18 6-6-6-6'\n transition={{ duration: 0.5, times: [0, 0.4, 1] }}\n variants={{ animate: { x: [0, 2, 0] }, normal: { x: 0 } }}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nChevronRightIcon.displayName = 'ChevronRightIcon';\n\nexport { ChevronRightIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type CopyIconHandle = AnimatedIconHandle;\n\ntype CopyIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst springTransition = {\n damping: 17,\n mass: 1,\n stiffness: 160,\n type: 'spring' as const,\n};\n\nconst CopyIcon = forwardRef<CopyIconHandle, CopyIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.rect\n animate={controls}\n height='14'\n rx='2'\n ry='2'\n transition={springTransition}\n variants={{\n animate: { translateX: -3, translateY: -3 },\n normal: { translateX: 0, translateY: 0 },\n }}\n width='14'\n x='8'\n y='8'\n />\n <motion.path\n animate={controls}\n d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'\n transition={springTransition}\n variants={{\n animate: { x: 3, y: 3 },\n normal: { x: 0, y: 0 },\n }}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nCopyIcon.displayName = 'CopyIcon';\n\nexport { CopyIcon };\n","'use client';\n\nimport type { HTMLAttributes, MouseEvent } from 'react';\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport type { Transition } from 'motion/react';\nimport { AnimatePresence, motion, useAnimation } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport interface CopyCheckIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n triggerCopied: () => void;\n}\n\ninterface CopyCheckIconProps extends HTMLAttributes<HTMLDivElement> {\n size?: number;\n}\n\nconst SPRING_TRANSITION: Transition = {\n damping: 17,\n mass: 1,\n stiffness: 160,\n type: 'spring',\n};\n\nconst CopyCheckIcon = forwardRef<CopyCheckIconHandle, CopyCheckIconProps>(\n ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n const controls = useAnimation();\n const isControlledRef = useRef(false);\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const triggerCopied = useCallback(() => {\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1500);\n }, []);\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true;\n\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n triggerCopied,\n };\n });\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (!copied) {\n if (isControlledRef.current) {\n onMouseEnter?.(e);\n } else {\n controls.start('animate').catch(() => undefined);\n }\n }\n },\n [controls, onMouseEnter, copied],\n );\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (!copied) {\n if (isControlledRef.current) {\n onMouseLeave?.(e);\n } else {\n controls.start('normal').catch(() => undefined);\n }\n }\n },\n [controls, onMouseLeave, copied],\n );\n\n return (\n <div\n aria-hidden='true'\n className={cn(\n 'relative inline-flex items-center justify-center',\n className,\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n <AnimatePresence mode='wait'>\n {copied ? (\n <motion.svg\n key='check'\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={{ duration: 0.15 }}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n className='text-green-500'\n >\n <motion.path\n d='M20 6 9 17l-5-5'\n initial={{ pathLength: 0 }}\n animate={{ pathLength: 1 }}\n transition={{ delay: 0.1, duration: 0.3 }}\n />\n </motion.svg>\n ) : (\n <motion.div\n key='copy'\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={{ duration: 0.15 }}\n >\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.rect\n animate={controls}\n height='14'\n rx='2'\n ry='2'\n transition={SPRING_TRANSITION}\n variants={{\n animate: { translateX: -3, translateY: -3 },\n normal: { translateX: 0, translateY: 0 },\n }}\n width='14'\n x='8'\n y='8'\n />\n <motion.path\n animate={controls}\n d='M8 4V2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.75a2 2 0 0 0-2-2H16a2 2 0 0 0-2-2h-2z'\n transition={SPRING_TRANSITION}\n variants={{\n animate: { x: 3, y: 3 },\n normal: { x: 0, y: 0 },\n }}\n />\n </svg>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n },\n);\n\nCopyCheckIcon.displayName = 'CopyCheckIcon';\n\nexport { CopyCheckIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type DollarSignIconHandle = AnimatedIconHandle;\n\ntype DollarSignIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DOLLAR_MAIN_VARIANTS: Variants = {\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n transition: { duration: 0.6, opacity: { duration: 0.1 } },\n },\n normal: {\n opacity: 1,\n pathLength: 1,\n transition: { duration: 0.4, opacity: { duration: 0.1 } },\n },\n};\n\nconst DOLLAR_SECONDARY_VARIANTS: Variants = {\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n pathOffset: [1, 0],\n transition: {\n delay: 0.5,\n duration: 0.4,\n opacity: { delay: 0.5, duration: 0.1 },\n },\n },\n normal: {\n opacity: 1,\n pathLength: 1,\n pathOffset: 0,\n transition: {\n delay: 0.3,\n duration: 0.3,\n opacity: { delay: 0.3, duration: 0.1 },\n },\n },\n};\n\nconst DollarSignIcon = forwardRef<DollarSignIconHandle, DollarSignIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'\n initial='normal'\n variants={DOLLAR_MAIN_VARIANTS}\n />\n <motion.path\n animate={controls}\n d='M12 22 L12 2'\n initial='normal'\n variants={DOLLAR_SECONDARY_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nDollarSignIcon.displayName = 'DollarSignIcon';\n\nexport { DollarSignIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type DownloadIconHandle = AnimatedIconHandle;\n\ntype DownloadIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DownloadIcon = forwardRef<DownloadIconHandle, DownloadIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M12 15V3'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { y: [0, 2, 0] }, normal: { y: 0 } }}\n />\n <motion.path\n animate={controls}\n d='m8 11 4 4 4-4'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { y: [0, 2, 0] }, normal: { y: 0 } }}\n />\n <path d='M20 21H4' />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nDownloadIcon.displayName = 'DownloadIcon';\n\nexport { DownloadIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type FingerprintIconHandle = AnimatedIconHandle;\n\ntype FingerprintIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n opacity: [0, 0, 1, 1, 1],\n pathLength: [0.1, 0.3, 0.5, 0.7, 0.9, 1],\n transition: { opacity: { duration: 0.5 }, pathLength: { duration: 2 } },\n },\n normal: { opacity: 1, pathLength: 1 },\n};\n\nconst FINGERPRINT_PATHS = [\n { d: 'M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4' },\n { d: 'M14 13.12c0 2.38 0 6.38-1 8.88' },\n { d: 'M17.29 21.02c.12-.6.43-2.3.5-3.02' },\n { d: 'M2 12a10 10 0 0 1 18-6' },\n { d: 'M2 16h.01' },\n { d: 'M21.8 16c.2-2 .131-5.354 0-6' },\n { d: 'M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2' },\n { d: 'M8.65 22c.21-.66.45-1.32.57-2' },\n { d: 'M9 6.8a6 6 0 0 1 9 5.2v2' },\n] as const;\n\nconst FingerprintIcon = forwardRef<FingerprintIconHandle, FingerprintIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n {FINGERPRINT_PATHS.map(({ d }) => (\n <path d={d} key={d} strokeOpacity={0.4} />\n ))}\n {FINGERPRINT_PATHS.map(({ d }) => (\n <motion.path\n animate={controls}\n d={d}\n key={`motion-${d}`}\n variants={PATH_VARIANTS}\n />\n ))}\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nFingerprintIcon.displayName = 'FingerprintIcon';\n\nexport { FingerprintIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type HomeIconHandle = AnimatedIconHandle;\n\ntype HomeIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.6,\n opacity: { duration: 0.2 },\n};\n\nconst PATH_VARIANTS: Variants = {\n animate: { opacity: [0, 1], pathLength: [0, 1] },\n normal: { opacity: 1, pathLength: 1 },\n};\n\nconst HomeIcon = forwardRef<HomeIconHandle, HomeIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z' />\n <motion.path\n animate={controls}\n d='M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nHomeIcon.displayName = 'HomeIcon';\n\nexport { HomeIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type KeyIconHandle = AnimatedIconHandle;\n\ntype KeyIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst KeyIcon = forwardRef<KeyIconHandle, KeyIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n initial='normal'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n style={{ originX: 0.3, originY: 0.7 }}\n variants={{\n animate: {\n rotate: [-3, -33, -25, -28],\n transition: {\n duration: 0.6,\n ease: 'easeInOut',\n times: [0, 0.6, 0.8, 1],\n },\n },\n normal: {\n rotate: 0,\n transition: {\n damping: 14,\n duration: 0.8,\n stiffness: 120,\n type: 'spring',\n },\n },\n }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4' />\n <path d='m21 2-9.6 9.6' />\n <circle cx='7.5' cy='15.5' r='5.5' />\n </motion.svg>\n )}\n </AnimatedIcon>\n));\n\nKeyIcon.displayName = 'KeyIcon';\n\nexport { KeyIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type LayoutPanelTopIconHandle = AnimatedIconHandle;\n\ntype LayoutPanelTopIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst LayoutPanelTopIcon = forwardRef<\n LayoutPanelTopIconHandle,\n LayoutPanelTopIconProps\n>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.rect\n animate={controls}\n height='7'\n initial='normal'\n rx='1'\n variants={{\n animate: {\n opacity: [0, 1],\n transition: {\n duration: 0.5,\n opacity: { duration: 0.5, times: [0.2, 1] },\n },\n translateY: [-5, 0],\n },\n normal: { opacity: 1, translateY: 0 },\n }}\n width='18'\n x='3'\n y='3'\n />\n <motion.rect\n animate={controls}\n height='7'\n initial='normal'\n rx='1'\n variants={{\n animate: {\n opacity: [0, 1],\n transition: {\n duration: 0.5,\n opacity: { duration: 0.7, times: [0.5, 1] },\n translateX: { delay: 0.3 },\n },\n translateX: [-10, 0],\n },\n normal: { opacity: 1, translateX: 0 },\n }}\n width='7'\n x='3'\n y='14'\n />\n <motion.rect\n animate={controls}\n height='7'\n initial='normal'\n rx='1'\n variants={{\n animate: {\n opacity: [0, 1],\n transition: {\n duration: 0.5,\n opacity: { duration: 0.8, times: [0.5, 1] },\n translateX: { delay: 0.4 },\n },\n translateX: [10, 0],\n },\n normal: { opacity: 1, translateX: 0 },\n }}\n width='7'\n x='14'\n y='14'\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nLayoutPanelTopIcon.displayName = 'LayoutPanelTopIcon';\n\nexport { LayoutPanelTopIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type LinkIconHandle = AnimatedIconHandle;\n\ntype LinkIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n pathLength: [1, 0.97, 1, 0.97, 1],\n pathOffset: [0, 0.05, 0, 0.05, 0],\n rotate: [0, -5, 0],\n transition: {\n duration: 1,\n ease: 'easeInOut',\n rotate: { duration: 0.5 },\n times: [0, 0.2, 0.4, 0.6, 1],\n },\n },\n normal: { pathLength: 1, pathOffset: 0, rotate: 0 },\n};\n\nconst LinkIcon = forwardRef<LinkIconHandle, LinkIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'\n variants={PATH_VARIANTS}\n />\n <motion.path\n animate={controls}\n d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nLinkIcon.displayName = 'LinkIcon';\n\nexport { LinkIcon };\n","import { type ReactElement, type SVGProps } from 'react';\n\ninterface IconProps extends SVGProps<SVGSVGElement> {\n size?: number;\n}\n\nexport const ClaudeLogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z\"\n fill=\"#D97757\"\n fillRule=\"nonzero\"\n />\n </svg>\n);\n\nexport const CursorLogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect width=\"24\" height=\"24\" rx=\"5\" fill=\"#F5F5F5\" />\n <path d=\"M12 4L5 8v8l7 4 7-4V8l-7-4z\" fill=\"#E5E5E5\" />\n <path d=\"M12 4L5 8l7 4 7-4-7-4z\" fill=\"#808080\" />\n <path d=\"M12 12l7-4v8l-7 4v-8z\" fill=\"#666\" />\n <path d=\"M12 12L5 8v8l7 4v-8z\" fill=\"#999\" />\n </svg>\n);\n\nexport const VSCodeLogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <mask\n id=\"vsc-mask\"\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n width=\"100\"\n height=\"100\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M70.912 99.317C72.487 99.931 74.283 99.891 75.873 99.126L96.461 89.22C98.624 88.179 100 85.989 100 83.587V16.413C100 14.011 98.624 11.822 96.461 10.781L75.873 0.874C73.786 -0.13 71.345 0.116 69.513 1.447C69.252 1.637 69.003 1.849 68.769 2.083L29.355 38.041L12.187 25.01C10.589 23.797 8.354 23.896 6.869 25.246L1.363 30.255C-0.453 31.906 -0.455 34.763 1.359 36.417L16.247 50L1.359 63.583C-0.455 65.237 -0.453 68.094 1.363 69.745L6.869 74.754C8.354 76.104 10.589 76.204 12.187 74.99L29.355 61.959L68.769 97.917C69.392 98.541 70.125 99.01 70.912 99.317ZM75.015 27.299L45.109 50L75.015 72.701V27.299Z\"\n fill=\"#fff\"\n />\n </mask>\n <g mask=\"url(#vsc-mask)\">\n <path\n d=\"M96.461 10.796L75.857 0.876C73.472 -0.273 70.622 0.212 68.75 2.083L1.299 63.583C-0.516 65.237 -0.514 68.094 1.303 69.745L6.813 74.754C8.298 76.104 10.535 76.204 12.134 74.99L93.361 13.37C96.086 11.303 100 13.246 100 16.667V16.427C100 14.027 98.625 11.838 96.461 10.796Z\"\n fill=\"#0065A9\"\n />\n <path\n d=\"M96.461 89.204L75.857 99.124C73.472 100.273 70.622 99.788 68.75 97.917L1.299 36.417C-0.516 34.763 -0.514 31.906 1.303 30.255L6.813 25.246C8.298 23.896 10.535 23.796 12.134 25.009L93.361 86.63C96.086 88.697 100 86.754 100 83.333V83.573C100 85.974 98.625 88.162 96.461 89.204Z\"\n fill=\"#007ACC\"\n />\n <path\n d=\"M75.858 99.126C73.472 100.274 70.622 99.788 68.75 97.917C71.056 100.223 75 98.59 75 95.328V4.672C75 1.41 71.056 -0.223 68.75 2.083C70.622 0.211 73.472 -0.274 75.858 0.874L96.459 10.781C98.623 11.822 100 14.011 100 16.413V83.587C100 85.989 98.623 88.179 96.459 89.22L75.858 99.126Z\"\n fill=\"#1F9CF0\"\n />\n </g>\n </svg>\n);\n\nexport const OpenAILogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <defs>\n <linearGradient\n gradientUnits=\"userSpaceOnUse\"\n id=\"codex-grad\"\n x1=\"12\"\n x2=\"12\"\n y1=\"3\"\n y2=\"21\"\n >\n <stop stopColor=\"#B1A7FF\" />\n <stop offset=\".5\" stopColor=\"#7A9DFF\" />\n <stop offset=\"1\" stopColor=\"#3941FF\" />\n </linearGradient>\n </defs>\n <path\n d=\"M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z\"\n fill=\"#F0F6FF\"\n />\n <path\n d=\"M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z\"\n fill=\"url(#codex-grad)\"\n />\n </svg>\n);\n\nexport const WindsurfLogo = ({\n size = 32,\n ...props\n}: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 1024 1024\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M897.246 286.869H889.819C850.735 286.808 819.017 318.46 819.017 357.539V515.589C819.017 547.15 792.93 572.716 761.882 572.716C743.436 572.716 725.02 563.433 714.093 547.85L552.673 317.304C539.28 298.16 517.486 286.747 493.895 286.747C457.094 286.747 423.976 318.034 423.976 356.657V515.619C423.976 547.181 398.103 572.746 366.842 572.746C348.335 572.746 329.949 563.463 319.021 547.881L138.395 289.882C134.316 284.038 125.154 286.93 125.154 294.052V431.892C125.154 438.862 127.285 445.619 131.272 451.34L309.037 705.2C319.539 720.204 335.033 731.344 352.9 735.392C397.616 745.557 438.77 711.135 438.77 667.278V508.406C438.77 476.845 464.339 451.279 495.904 451.279H495.995C515.02 451.279 532.857 460.562 543.785 476.145L705.235 706.661C718.659 725.835 739.327 737.218 763.983 737.218C801.606 737.218 833.841 705.9 833.841 667.308V508.376C833.841 476.815 859.41 451.249 890.975 451.249H897.276C901.233 451.249 904.43 448.053 904.43 444.097V294.021C904.43 290.065 901.233 286.869 897.276 286.869H897.246Z\"\n fill=\"#0B100F\"\n />\n </svg>\n);\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type MoonIconHandle = AnimatedIconHandle;\n\ntype MoonIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst SVG_VARIANTS: Variants = {\n animate: { rotate: [0, -10, 10, -5, 5, 0] },\n normal: { rotate: 0 },\n};\n\nconst SVG_TRANSITION: Transition = {\n duration: 1.2,\n ease: 'easeInOut',\n};\n\nconst MoonIcon = forwardRef<MoonIconHandle, MoonIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={SVG_TRANSITION}\n variants={SVG_VARIANTS}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z' />\n </motion.svg>\n )}\n </AnimatedIcon>\n));\n\nMoonIcon.displayName = 'MoonIcon';\n\nexport { MoonIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type PanelLeftCloseIconHandle = AnimatedIconHandle;\n\ntype PanelLeftCloseIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.5,\n times: [0, 0.4, 1],\n};\n\nconst PATH_VARIANTS: Variants = {\n animate: { x: [0, -1.5, 0] },\n normal: { x: 0 },\n};\n\nconst PanelLeftCloseIcon = forwardRef<\n PanelLeftCloseIconHandle,\n PanelLeftCloseIconProps\n>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <rect height='18' rx='2' width='18' x='3' y='3' />\n <path d='M9 3v18' />\n <motion.path\n animate={controls}\n d='m16 15-3-3 3-3'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nPanelLeftCloseIcon.displayName = 'PanelLeftCloseIcon';\n\nexport { PanelLeftCloseIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type PanelLeftOpenIconHandle = AnimatedIconHandle;\n\ntype PanelLeftOpenIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.5,\n times: [0, 0.4, 1],\n};\n\nconst PATH_VARIANTS: Variants = {\n animate: { x: [0, 1.5, 0] },\n normal: { x: 0 },\n};\n\nconst PanelLeftOpenIcon = forwardRef<\n PanelLeftOpenIconHandle,\n PanelLeftOpenIconProps\n>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <rect height='18' rx='2' width='18' x='3' y='3' />\n <path d='M9 3v18' />\n <motion.path\n animate={controls}\n d='m14 9 3 3-3 3'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nPanelLeftOpenIcon.displayName = 'PanelLeftOpenIcon';\n\nexport { PanelLeftOpenIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type PlusIconHandle = AnimatedIconHandle;\n\ntype PlusIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PlusIcon = forwardRef<PlusIconHandle, PlusIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{ damping: 15, stiffness: 100, type: 'spring' }}\n variants={{ animate: { rotate: 180 }, normal: { rotate: 0 } }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M5 12h14' />\n <path d='M12 5v14' />\n </motion.svg>\n )}\n </AnimatedIcon>\n));\n\nPlusIcon.displayName = 'PlusIcon';\n\nexport { PlusIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type RefreshCWIconHandle = AnimatedIconHandle;\n\ntype RefreshCWIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst RefreshCWIcon = forwardRef<RefreshCWIconHandle, RefreshCWIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{ damping: 25, stiffness: 250, type: 'spring' }}\n variants={{ animate: { rotate: '50deg' }, normal: { rotate: '0deg' } }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8' />\n <path d='M21 3v5h-5' />\n <path d='M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16' />\n <path d='M8 16H3v5' />\n </motion.svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nRefreshCWIcon.displayName = 'RefreshCWIcon';\n\nexport { RefreshCWIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type SearchIconHandle = AnimatedIconHandle;\n\ntype SearchIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst SearchIcon = forwardRef<SearchIconHandle, SearchIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{\n bounce: 0.3,\n duration: 1,\n }}\n variants={{\n animate: {\n x: [0, 0, -3, 0],\n y: [0, -4, 0, 0],\n },\n normal: { x: 0, y: 0 },\n }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle cx='11' cy='11' r='8' />\n <path d='m21 21-4.3-4.3' />\n </motion.svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nSearchIcon.displayName = 'SearchIcon';\n\nexport { SearchIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type SettingsIconHandle = AnimatedIconHandle;\n\ntype SettingsIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst SettingsIcon = forwardRef<SettingsIconHandle, SettingsIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{ damping: 10, stiffness: 50, type: 'spring' }}\n variants={{\n animate: { rotate: 180 },\n normal: { rotate: 0 },\n }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z' />\n <circle cx='12' cy='12' r='3' />\n </motion.svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nSettingsIcon.displayName = 'SettingsIcon';\n\nexport { SettingsIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ShieldCheckIconHandle = AnimatedIconHandle;\n\ntype ShieldCheckIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n scale: [0.5, 1],\n transition: { duration: 0.4, opacity: { duration: 0.1 } },\n },\n normal: {\n opacity: 1,\n pathLength: 1,\n scale: 1,\n transition: { duration: 0.3, opacity: { duration: 0.1 } },\n },\n};\n\nconst ShieldCheckIcon = forwardRef<ShieldCheckIconHandle, ShieldCheckIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z' />\n <motion.path\n animate={controls}\n d='m9 12 2 2 4-4'\n initial='normal'\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nShieldCheckIcon.displayName = 'ShieldCheckIcon';\n\nexport { ShieldCheckIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type SunIconHandle = AnimatedIconHandle;\n\ntype SunIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: (i: number) => ({\n opacity: [0, 1],\n transition: { delay: i * 0.1, duration: 0.3 },\n }),\n normal: { opacity: 1 },\n};\n\nconst SUN_PATHS = [\n 'M12 2v2',\n 'm19.07 4.93-1.41 1.41',\n 'M20 12h2',\n 'm17.66 17.66 1.41 1.41',\n 'M12 20v2',\n 'm6.34 17.66-1.41 1.41',\n 'M2 12h2',\n 'm4.93 4.93 1.41 1.41',\n];\n\nconst SunIcon = forwardRef<SunIconHandle, SunIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle cx='12' cy='12' r='4' />\n {SUN_PATHS.map((d, index) => (\n <motion.path\n animate={controls}\n custom={index + 1}\n d={d}\n key={d}\n variants={PATH_VARIANTS}\n />\n ))}\n </svg>\n )}\n </AnimatedIcon>\n));\n\nSunIcon.displayName = 'SunIcon';\n\nexport { SunIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type TerminalIconHandle = AnimatedIconHandle;\n\ntype TerminalIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst LINE_VARIANTS: Variants = {\n animate: {\n opacity: [1, 0, 1],\n transition: { duration: 0.8, ease: 'linear', repeat: Infinity },\n },\n normal: { opacity: 1 },\n};\n\nconst TerminalIcon = forwardRef<TerminalIconHandle, TerminalIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <polyline points='4 17 10 11 4 5' />\n <motion.line\n animate={controls}\n initial='normal'\n variants={LINE_VARIANTS}\n x1='12'\n x2='20'\n y1='19'\n y2='19'\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nTerminalIcon.displayName = 'TerminalIcon';\n\nexport { TerminalIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type UsersIconHandle = AnimatedIconHandle;\n\ntype UsersIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n transition: { damping: 13, delay: 0.1, stiffness: 200, type: 'spring' },\n translateX: [-6, 0],\n },\n normal: {\n transition: { damping: 13, stiffness: 200, type: 'spring' },\n translateX: 0,\n },\n};\n\nconst UsersIcon = forwardRef<UsersIconHandle, UsersIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2' />\n <circle cx='9' cy='7' r='4' />\n <motion.path\n animate={controls}\n d='M22 21v-2a4 4 0 0 0-3-3.87'\n variants={PATH_VARIANTS}\n />\n <motion.path\n animate={controls}\n d='M16 3.13a4 4 0 0 1 0 7.75'\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nUsersIcon.displayName = 'UsersIcon';\n\nexport { UsersIcon };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,WAAS;CAAE,QAAQ;CAAG,UAAU;CAAM,MAAM;CAAmB;AAErE,MAAM,aAAa;AACnB,MAAM,gBAAgB;AAItB,MAAM,gBAAgB,MAAM,KAAK,EAAE,QAAQ,YAAY,QACrD,OAAO,YAAY,CACpB;AAED,MAAM,wBAAsC;CAC1C,MAAM,SAAS;CACf,MAAM,OAAO,KA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f;AAEF,UAAU,cAAc"}
1
+ {"version":3,"file":"index.esm.js","names":["spring","edge: TrayEdge","trayChild: ReactNode","Root","Trigger","Content","spring","Icon","CollapsibleTrigger: FC<CollapsibleTriggerProps>","Root","Trigger","Portal","Overlay","Content","Title","Description","CommandPrimitive","Root","Trigger","Portal","Content","Item","CheckIcon","RadioGroup","Label","Separator","ChevronRightIcon","shaderDefaults: Required<ShaderBorderConfig>","spring","Root","Root","Group","Trigger","Icon","Portal","Content","Label","Item","ItemIndicator","Separator","SHAKE_KEYFRAMES: Keyframe[]","SHAKE_TIMING: KeyframeAnimationOptions","MESSAGE_KEYFRAMES: Keyframe[]","MESSAGE_TIMING: KeyframeAnimationOptions","Field: FC<FieldProps>","ariaDescribedBy: string | undefined","Root","Sonner","Root","firstColumn: HTMLTableCellElement | undefined","createColumnHelper: typeof createTanStackColumnHelper","createTanStackColumnHelper","Icon","RESIZE_STEP: Partial<Record<string, number>>","DefaultEmptyIcon: EmptyStateProps['icon']","updateFilters: OnChangeFn<DataTableFilterState>","handleClientSortingChange: OnChangeFn<SortingState>","sortingState: TableFeatureState<SortingState>","paginationState: TableFeatureState<PaginationState>","next: number","contextValue: ToggleGroupContextValue","Root","Trigger","Portal","Content","aliases: Record<string, string>","iconTransition: Transition","labelTransition: Transition","spring","trendColor: Record<Trend, string>","Icon","value","ToggleCard: FC<ToggleCardProps>","AccordionContent","AccordionRoot","AccordionItem","AccordionHeader","AccordionTrigger","LINE_VARIANTS: Variants","LINE_VARIANTS","DEFAULT_TRANSITION: Transition","DEFAULT_TRANSITION","SPRING_TRANSITION: Transition","DOLLAR_MAIN_VARIANTS: Variants","DOLLAR_SECONDARY_VARIANTS: Variants","PATH_VARIANTS: Variants","PATH_VARIANTS","DEFAULT_TRANSITION: Transition","PATH_VARIANTS: Variants","DEFAULT_TRANSITION","PATH_VARIANTS","PATH_VARIANTS: Variants","PATH_VARIANTS","SVG_VARIANTS: Variants","SVG_TRANSITION: Transition","DEFAULT_TRANSITION: Transition","PATH_VARIANTS: Variants","DEFAULT_TRANSITION","PATH_VARIANTS","DEFAULT_TRANSITION: Transition","PATH_VARIANTS: Variants","PATH_VARIANTS","PATH_VARIANTS: Variants","PATH_VARIANTS","PATH_VARIANTS: Variants","PATH_VARIANTS","LINE_VARIANTS: Variants","PATH_VARIANTS: Variants"],"sources":["../src/lib/utils.ts","../src/components/ui/spinner/spinner.tsx","../src/components/ui/button/button.tsx","../src/components/unsaved-changes-bar/unsaved-changes-bar.tsx","../src/components/ui/accordion/accordion.tsx","../src/components/ui/tray/resolveTrayLayout.tsx","../src/components/ui/tray/renderTrayLayout.tsx","../src/components/ui/alert-dialog/alert-dialog.tsx","../src/components/ui/avatar/avatar.tsx","../src/components/ui/alert/alert.tsx","../src/components/ui/badge/badge.tsx","../src/components/ui/breadcrumb/breadcrumb.tsx","../src/components/ui/card/card.tsx","../src/components/ui/check-icon/check-icon.tsx","../src/components/ui/checkbox/checkbox.tsx","../src/components/ui/collapsible/collapsible.tsx","../src/components/ui/dialog/dialog.tsx","../src/components/ui/command/command.tsx","../src/components/ui/popover/popover.tsx","../src/components/ui/combobox/combobox.tsx","../src/components/ui/dropdown-menu/dropdown-menu.tsx","../src/components/ui/well/well.tsx","../src/components/ui/flush-card-stack/flush-card-stack.tsx","../src/components/icon-config/icon-config.tsx","../src/components/ui/icon/icon.tsx","../src/components/ui/input/input.tsx","../src/components/ui/label/label.tsx","../src/components/ui/field/field-control-context.ts","../src/components/ui/select/select.tsx","../src/components/ui/field/use-field-feedback.ts","../src/components/ui/field/field.tsx","../src/components/ui/kbd/kbd.tsx","../src/components/ui/progress/progress.tsx","../src/components/ui/radio-group/radio-group.tsx","../src/components/ui/pagination/pagination.tsx","../src/components/ui/scroll-area/scroll-area.tsx","../src/components/ui/search-input/search-input.tsx","../src/components/ui/selectable-card/selectable-card.tsx","../src/components/ui/separator/separator.tsx","../src/components/ui/slider/slider.tsx","../src/components/ui/sheet/sheet.tsx","../src/components/ui/skeleton/skeleton.tsx","../src/components/ui/sonner/sonner.tsx","../src/components/ui/stepper/stepper.tsx","../src/components/ui/switch/switch.tsx","../src/components/ui/table/table.tsx","../src/components/ui/data-table/create-column-helper.ts","../src/components/ui/data-table/data-table-context.ts","../src/components/ui/data-table/data-table.tsx","../src/components/ui/data-table/get-column-label.ts","../src/components/ui/data-table/data-table-column-filter.tsx","../src/components/ui/data-table/data-table-active-filters.tsx","../src/components/ui/data-table/data-table-column-visibility.tsx","../src/components/empty-state/empty-state.tsx","../src/components/ui/data-table/data-table-placeholder-rows.tsx","../src/components/ui/data-table/expand-chevron.tsx","../src/components/ui/data-table/get-pinned-cell-props.ts","../src/components/ui/data-table/selection-column.tsx","../src/components/ui/data-table/data-table-rows.tsx","../src/components/ui/data-table/data-table-content.tsx","../src/components/ui/data-table/data-table-pagination.tsx","../src/components/ui/data-table/data-table-search.tsx","../src/components/ui/data-table/use-data-table.ts","../src/components/ui/tabs/tabs.tsx","../src/components/ui/toggle-group/toggle-group.tsx","../src/components/ui/textarea/textarea.tsx","../src/components/ui/tooltip/tooltip.tsx","../src/components/asset-icon/asset-icon.tsx","../src/components/copy-button/copy-button.tsx","../src/components/code-block/code-block.tsx","../src/components/danger-zone/danger-zone.tsx","../src/components/domain-list/domain-list.tsx","../src/components/info-banner/info-banner.tsx","../src/components/loading-skeleton/loading-skeleton.tsx","../src/components/metric-card/metric-card.tsx","../src/components/ask-ai-sheet/ask-ai-sheet.tsx","../src/components/page-actions/page-actions.tsx","../src/components/page-header/page-header.tsx","../src/components/product-page-layout/product-page-layout.tsx","../src/components/settings-section/settings-section.tsx","../src/components/tab-navigation/tab-navigation.tsx","../src/components/toggle-card/toggle-card.tsx","../src/components/toggle-row/toggle-row.tsx","../src/components/icons/animated-icon/animated-icon.tsx","../src/components/icons/arrow-up-right/arrow-up-right.tsx","../src/components/icons/chart-bar-increasing/chart-bar-increasing.tsx","../src/components/icons/chevron-down/chevron-down.tsx","../src/components/icons/chevron-right/chevron-right.tsx","../src/components/icons/copy/copy.tsx","../src/components/icons/copy-check/copy-check.tsx","../src/components/icons/dollar-sign/dollar-sign.tsx","../src/components/icons/download/download.tsx","../src/components/icons/fingerprint/fingerprint.tsx","../src/components/icons/home/home.tsx","../src/components/icons/key/key.tsx","../src/components/icons/layout-panel-top/layout-panel-top.tsx","../src/components/icons/link/link.tsx","../src/components/icons/mcp-tools/mcp-tools.tsx","../src/components/icons/moon/moon.tsx","../src/components/icons/panel-left-close/panel-left-close.tsx","../src/components/icons/panel-left-open/panel-left-open.tsx","../src/components/icons/plus/plus.tsx","../src/components/icons/refresh-cw/refresh-cw.tsx","../src/components/icons/search/search.tsx","../src/components/icons/settings/settings.tsx","../src/components/icons/shield-check/shield-check.tsx","../src/components/icons/sun/sun.tsx","../src/components/icons/terminal/terminal.tsx","../src/components/icons/users/users.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n","import type { ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n/** Maps the `size` prop to Tailwind size utilities. */\nconst sizeMap = {\n lg: 'size-6',\n md: 'size-4',\n sm: 'size-3',\n} as const;\n\ntype SpinnerSize = keyof typeof sizeMap;\n\ntype SpinnerProps = {\n className?: string;\n /** Controls the spinner diameter. Defaults to `md` (size-4). `className` wins over `size`. */\n size?: SpinnerSize;\n};\n\nconst Spinner = ({ className, size = 'md' }: SpinnerProps): ReactElement => (\n <output aria-label=\"Loading\" className=\"inline-flex\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\n 'animate-spin motion-reduce:animate-none',\n sizeMap[size],\n className\n )}\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n </output>\n);\n\nexport { Spinner };\nexport type { SpinnerProps, SpinnerSize };\n","import { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\nimport { Spinner } from '../spinner';\n\nconst buttonVariants = cva(\n \"relative isolate inline-flex items-center justify-center gap-1.5 whitespace-nowrap select-none text-[13px] font-medium leading-[calc(18/13)] touch-manipulation transition-[background-color,color,opacity,box-shadow,transform,filter,scale] duration-150 ease-out active:scale-[0.96] motion-reduce:transition-none cursor-pointer border-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n {\n // Min-width floors so short labels (Done/OK/Save) read as proper buttons and\n // paired footer actions balance — only for solid/outlined TEXT buttons.\n // Excluded by design: `ghost`/`link` (inline text, no button floor) and all\n // `icon*` sizes (square). `min-w-*` (not fixed width) so labels still grow,\n // and `w-full`/`flex-1` usages override it harmlessly.\n compoundVariants: [\n {\n class: 'min-w-16',\n size: 'sm',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n {\n class: 'min-w-20',\n size: 'default',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n {\n class: 'min-w-24',\n size: 'lg',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n ],\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default:\n \"rounded-md px-3 py-1.5 h-8 has-[>svg]:px-2.5 [&_svg:not([class*='size-'])]:size-3.5\",\n icon: 'size-9 rounded-md',\n 'icon-sm':\n \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[8px] before:content-['']\",\n 'icon-xs':\n \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[10px] before:content-['']\",\n lg: \"rounded-md px-5 py-2.5 h-10 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-4\",\n sm: \"rounded-md px-2.5 py-1 h-7 has-[>svg]:px-2 [&_svg:not([class*='size-'])]:size-3 before:absolute before:-inset-y-[6px] before:inset-x-0 before:content-['']\",\n xs: \"rounded-md px-3 py-1 h-7 [&_svg:not([class*='size-'])]:size-3\",\n },\n variant: {\n default:\n 'bg-(--action) text-white shadow-[0_0_0_1px_var(--action),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)]',\n destructive:\n 'bg-destructive text-white shadow-[0_0_0_1px_var(--destructive),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n ghost:\n 'text-muted-foreground hover:bg-[#f8f8f9] hover:text-foreground dark:hover:bg-white/[0.06]',\n link: 'text-(--action) underline-offset-4 hover:underline',\n outline:\n 'bg-white shadow-[var(--shadow-input)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-input-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n secondary:\n 'bg-white shadow-[var(--shadow-secondary)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-secondary-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n },\n },\n }\n);\n\n/**\n * Primary clickable action button.\n *\n * Variants: `default` | `destructive` | `outline` | `secondary` | `ghost` | `link`.\n * Sizes: `default` | `sm` | `xs` | `lg` | `icon` | `icon-sm` | `icon-xs`.\n * Set `asChild` to render the button styles onto a child element (e.g. an anchor) instead of a `<button>`.\n * Set `loading` to show an inline spinner before the label and disable interaction while an async action is pending.\n * When `asChild` is true, `loading` is ignored — the Slot host cannot render an additional spinner child.\n */\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n loading = false,\n disabled,\n children,\n style,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** When true, renders an inline spinner before the label and disables interaction. */\n loading?: boolean;\n }): ReactElement => {\n if (asChild) {\n return (\n <Slot\n data-slot=\"button\"\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...{ ...props, disabled, style }}\n >\n {children}\n </Slot>\n );\n }\n\n return (\n <button\n data-slot=\"button\"\n data-size={size}\n data-variant={variant}\n className={cn(\n buttonVariants({ size, variant }),\n // Loading stays full-strength (not the 50% disabled wash) so it reads as\n // \"working\", not \"disabled\" — interaction is still blocked via `disabled`.\n loading && 'cursor-wait',\n className\n )}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n // Inline opacity wins over the class-level `disabled:opacity-50` so the\n // loading button keeps its color while remaining truly disabled.\n style={loading ? { opacity: 1, ...style } : style}\n {...props}\n >\n {loading && (\n // Size matches the svg sizing the button already applies to icons at each size\n <Spinner className=\"size-3.5\" />\n )}\n {children}\n </button>\n );\n};\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport type { Dispatch, ReactElement, SetStateAction } from 'react';\n\nimport { Button } from '../ui/button';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\nconst BLUR_STEPS = 6;\nconst BLUR_STRENGTH = 32;\n\n// Stable identity keys for the fixed-length blur stack — Sonar flags\n// index-derived keys, and these are computed once at module load.\nconst BLUR_STEP_IDS = Array.from({ length: BLUR_STEPS }, () =>\n crypto.randomUUID()\n);\n\nconst ProgressiveBlur = (): ReactElement => {\n const factor = 0.5;\n const base = Math.pow(BLUR_STRENGTH / factor, 1 / (BLUR_STEPS - 1));\n\n const getBlur = (i: number) => factor * Math.pow(base, BLUR_STEPS - i - 1);\n\n return (\n <div\n className=\"fixed -bottom-10 left-1/2 -translate-x-1/2 pointer-events-none z-40\"\n style={{ height: '160px', width: '900px' }}\n >\n {BLUR_STEP_IDS.map((id, i) => {\n const blur = getBlur(i);\n const spread = 20 + ((BLUR_STEPS - i) / BLUR_STEPS) * 30;\n const mask = `radial-gradient(ellipse ${spread}% ${spread}% at 50% 60%, rgba(0,0,0,1), rgba(0,0,0,0))`;\n return (\n <div\n key={id}\n className=\"absolute inset-0\"\n style={{\n backdropFilter: `blur(${blur}px)`,\n mask,\n WebkitBackdropFilter: `blur(${blur}px)`,\n WebkitMask: mask,\n }}\n />\n );\n })}\n <div\n className=\"absolute inset-0\"\n style={{\n background:\n 'radial-gradient(ellipse 40% 50% at 50% 60%, var(--background), transparent)',\n }}\n />\n </div>\n );\n};\n\ntype BarState = 'unsaved' | 'saved';\n\nconst popTransition = { ...spring, duration: 0.25 };\n\nconst StatusIcon = ({ state }: { state: BarState }): ReactElement => {\n return (\n <div className=\"relative size-[18px] shrink-0\">\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.div\n key={state}\n initial={{ filter: 'blur(4px)', opacity: 0, scale: 0.25 }}\n animate={{ filter: 'blur(0px)', opacity: 1, scale: 1 }}\n exit={{ filter: 'blur(4px)', opacity: 0, scale: 0.25 }}\n transition={popTransition}\n className=\"absolute inset-0 will-change-[opacity,transform,filter]\"\n >\n {state === 'unsaved' && (\n <span className=\"text-zinc-400 dark:text-zinc-400\">\n <HugeiconsIcon icon={InformationCircleIcon} size={18} />\n </span>\n )}\n {state === 'saved' && (\n <span className=\"text-emerald-400 dark:text-emerald-600\">\n <HugeiconsIcon icon={CheckmarkCircle02Icon} size={18} />\n </span>\n )}\n </motion.div>\n </AnimatePresence>\n </div>\n );\n};\n\nconst StatusText = ({ state }: { state: BarState }): ReactElement => {\n const text = state === 'unsaved' ? 'Unsaved changes' : 'Changes saved';\n\n return (\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.span\n key={text}\n initial={{ filter: 'blur(4px)', opacity: 0, scale: 0.95 }}\n animate={{ filter: 'blur(0px)', opacity: 1, scale: 1 }}\n exit={{ filter: 'blur(4px)', opacity: 0, scale: 0.95 }}\n transition={popTransition}\n className=\"text-[13px] font-medium text-white dark:text-zinc-800 whitespace-nowrap will-change-[opacity,transform,filter]\"\n >\n {text}\n </motion.span>\n </AnimatePresence>\n );\n};\n\nexport interface UnsavedChangesBarProps {\n hasChanges: boolean;\n onReset: () => void;\n onSave: () => void;\n /**\n * When true, hide the bar even if there are unsaved changes.\n * Use when a config modal (auto-opened from a toggle) owns its own Save button —\n * keeps save affordance in one place. See feedback_save_pattern_auto_modal.md.\n */\n suppressed?: boolean;\n}\n\nexport const UnsavedChangesBar = ({\n hasChanges,\n onSave,\n onReset,\n suppressed = false,\n}: UnsavedChangesBarProps): ReactElement => {\n const prefersReduced = useReducedMotion();\n const [barState, setBarState] = useState<BarState>('unsaved');\n const [visible, setVisible] = useState(false);\n const shouldRender = visible && !suppressed;\n\n const dismissTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleSave = () => {\n onSave();\n setBarState('saved');\n dismissTimer.current = setTimeout(() => {\n setVisible(false);\n setBarState('unsaved');\n }, 1800);\n };\n\n useEffect(() => {\n if (hasChanges) {\n // If reappearing while dismiss is pending, cancel the dismiss\n if (dismissTimer.current) {\n clearTimeout(dismissTimer.current);\n dismissTimer.current = null;\n }\n setVisible(true);\n setBarState('unsaved');\n } else if (!dismissTimer.current) {\n // Only hide immediately if we're not in a post-save dismiss flow\n setVisible(false);\n }\n }, [hasChanges]);\n\n return (\n <>\n <AnimatePresence>\n {shouldRender && (\n <motion.div\n key=\"blur\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={spring}\n >\n <ProgressiveBlur />\n </motion.div>\n )}\n </AnimatePresence>\n <div className=\"fixed bottom-10 left-1/2 -translate-x-1/2 z-50\">\n <AnimatePresence>\n {shouldRender && (\n <motion.div\n initial={\n prefersReduced\n ? { opacity: 0 }\n : { opacity: 0, scale: 0.95, y: 20 }\n }\n animate={\n prefersReduced ? { opacity: 1 } : { opacity: 1, scale: 1, y: 0 }\n }\n exit={\n prefersReduced\n ? { opacity: 0 }\n : { opacity: 0, scale: 0.95, y: 20 }\n }\n transition={spring}\n style={{ willChange: 'opacity, transform' }}\n className=\"flex items-center gap-1.5 rounded-xl bg-zinc-900 dark:bg-[oklch(0.940_0.008_231)] shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_24px_-4px_rgba(0,0,0,0.25),0_20px_50px_-8px_rgba(0,0,0,0.20)] dark:shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_8px_20px_-4px_rgba(0,0,0,0.10),0_20px_50px_-8px_rgba(0,0,0,0.08)] pl-3 pr-1.5 py-1.5\"\n >\n <StatusIcon state={barState} />\n <StatusText state={barState} />\n\n <motion.div\n animate={{ opacity: barState === 'unsaved' ? 1 : 0 }}\n transition={popTransition}\n className=\"flex items-center gap-1.5 ml-0.5\"\n style={{\n pointerEvents: barState === 'unsaved' ? 'auto' : 'none',\n }}\n >\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"rounded-md text-zinc-400 hover:text-white hover:bg-white/10 dark:text-zinc-500 dark:hover:text-zinc-800 dark:hover:bg-black/[0.06] shrink-0 touch-manipulation\"\n onClick={onReset}\n >\n Reset\n </Button>\n <Button\n size=\"sm\"\n className=\"rounded-md shrink-0 touch-manipulation\"\n onClick={handleSave}\n >\n Save changes\n </Button>\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n </>\n );\n};\n\n// localStorage-backed store — survives page refresh and browser restart\nconst sessionStore = {\n // eslint-disable-next-line custom-rules/require-single-object-param\n get(key: string): { savedValues: unknown; values: unknown } | undefined {\n if (globalThis.window === undefined) return undefined;\n try {\n const stored = localStorage.getItem(`dashboard-${key}`);\n return stored ? JSON.parse(stored) : undefined;\n } catch {\n return undefined;\n }\n },\n // eslint-disable-next-line custom-rules/require-single-object-param\n set(key: string, value: { savedValues: unknown; values: unknown }) {\n if (globalThis.window === undefined) return;\n try {\n localStorage.setItem(`dashboard-${key}`, JSON.stringify(value));\n } catch {\n /* quota exceeded, ignore */\n }\n },\n};\n\ntype UnsavedChanges<T extends Record<string, unknown>> = {\n commit: (partial?: Partial<T>) => T;\n hasChanges: boolean;\n reset: () => void;\n save: () => void;\n setValues: Dispatch<SetStateAction<T>>;\n updateValue: <K extends keyof T>(key: K, value: T[K]) => void;\n values: T;\n};\n\n// Hook to track changes\n// Pass a unique `key` to persist values across client-side navigation.\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const useUnsavedChanges = <T extends Record<string, unknown>>(\n initialValues: T,\n storeKey?: string\n): UnsavedChanges<T> => {\n const cached = storeKey\n ? (sessionStore.get(storeKey) as { savedValues: T; values: T } | undefined)\n : undefined;\n\n const [values, setValues] = useState<T>(cached?.values ?? initialValues);\n const [savedValues, setSavedValues] = useState<T>(\n cached?.savedValues ?? initialValues\n );\n\n // Sync to session store on every change\n useEffect(() => {\n if (storeKey) {\n sessionStore.set(storeKey, { savedValues, values });\n }\n }, [storeKey, values, savedValues]);\n\n const hasChanges = useMemo(() => {\n return JSON.stringify(values) !== JSON.stringify(savedValues);\n }, [values, savedValues]);\n\n // eslint-disable-next-line custom-rules/require-single-object-param\n const updateValue = <K extends keyof T>(key: K, value: T[K]) => {\n setValues((prev) => ({ ...prev, [key]: value }));\n };\n\n const save = () => {\n setSavedValues(values);\n };\n\n const reset = () => {\n setValues(savedValues);\n };\n\n const commit = (partial?: Partial<T>): T => {\n const next = partial ? { ...values, ...partial } : values;\n setValues(next);\n setSavedValues(next);\n return next;\n };\n\n return {\n commit,\n hasChanges,\n reset,\n save,\n setValues,\n updateValue,\n values,\n };\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { ArrowRight01Icon } from '@hugeicons/core-free-icons';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\n\nimport { cn } from '../../../lib/utils';\n\nconst Accordion = ({\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Root>): ReactElement => (\n <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n);\n\nconst AccordionItem = ({\n className,\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Item>): ReactElement => {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\n 'border-b border-[var(--border-divider)] last:border-b-0',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AccordionTrigger = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Trigger>): ReactElement => {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'focus-visible:ring-ring/50 flex flex-1 items-center justify-between gap-4 rounded-md px-1 py-4 text-left text-sm font-medium touch-manipulation transition-[color,background-color,opacity] duration-150 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 cursor-pointer',\n className\n )}\n {...props}\n >\n {children}\n <HugeiconsIcon\n icon={ArrowRight01Icon}\n size={16}\n className=\"text-muted-foreground/60 pointer-events-none shrink-0 transition-transform duration-200 ease-out motion-reduce:transition-none [*[data-state=open]>&]:rotate-90\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n};\n\nconst AccordionContent = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof AccordionPrimitive.Content>): ReactElement => {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down motion-reduce:animate-none overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn('px-1 pt-0 pb-4', className)}>{children}</div>\n </AccordionPrimitive.Content>\n );\n};\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n","import {\n Children,\n type ReactElement,\n type ReactNode,\n isValidElement,\n} from 'react';\n\n/** Which chrome edge carries the muted tray, or `none` for a flat container. */\nexport type TrayEdge = 'header' | 'footer' | 'none';\n\n/** Consumer-facing override; `auto` applies the footer-priority convention. */\nexport type TrayPreference = 'auto' | TrayEdge;\n\nexport type ResolveTrayLayoutParams = {\n /** The container's children (header / body / footer slots in any order). */\n children: ReactNode;\n /** Identifies the footer slot element. */\n isFooter: (el: ReactElement) => boolean;\n /** Identifies the header slot element (e.g. `(el) => el.type === DialogHeader`). */\n isHeader: (el: ReactElement) => boolean;\n /** Override the auto convention. Defaults to `auto`. */\n tray?: TrayPreference;\n};\n\nexport type ResolvedTrayLayout = {\n /** The resolved tray edge after applying the convention/override. */\n edge: TrayEdge;\n /** Children that belong to the raised white shelf (everything except the tray slot). */\n shelf: ReactNode[];\n /** The slot rendered on the muted tray, or `undefined` when `edge === 'none'`. */\n trayChild: ReactNode;\n};\n\n/**\n * Resolves the droplet \"tray\" layout for a container (Dialog/Card/Sheet/AlertDialog).\n *\n * Convention (footer-priority): a container gets exactly one muted tray — the\n * **footer** when actions are present, otherwise the **header** (e.g. Table/CodeBlock).\n * The non-tray slots form the raised white shelf. Pass an explicit `tray` to override.\n *\n * Returns the partitioned pieces so each container can assemble its own shell +\n * shelf markup with the shared `--tray-*` tokens.\n */\nexport const resolveTrayLayout = ({\n children,\n isHeader,\n isFooter,\n tray = 'auto',\n}: ResolveTrayLayoutParams): ResolvedTrayLayout => {\n const elements = Children.toArray(children).filter(isValidElement) as ReactElement[];\n const header = elements.find(isHeader);\n const footer = elements.find(isFooter);\n\n let edge: TrayEdge;\n\n if (tray === 'auto') {\n if (footer) {\n edge = 'footer';\n } else if (header) {\n edge = 'header';\n } else {\n edge = 'none';\n }\n } else {\n edge = tray;\n }\n\n let trayChild: ReactNode = undefined;\n\n if (edge === 'footer') {\n trayChild = footer;\n } else if (edge === 'header') {\n trayChild = header;\n }\n\n const shelf = Children.toArray(children).filter((child) => {\n if (!isValidElement(child)) return true;\n if (edge === 'footer' && isFooter(child)) return false;\n if (edge === 'header' && isHeader(child)) return false;\n return true;\n });\n\n return { edge, shelf, trayChild };\n};\n","import { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport {\n type TrayEdge,\n type TrayPreference,\n resolveTrayLayout,\n} from './resolveTrayLayout';\n\nexport type RenderTrayLayoutParams = {\n /** The container's children (header / body / footer slots in any order). */\n children: ReactNode;\n /** Identifies the footer slot element. */\n isFooter: (el: ReactElement) => boolean;\n /** Identifies the header slot element (e.g. `(el) => el.type === DialogHeader`). */\n isHeader: (el: ReactElement) => boolean;\n /** Extra classes merged onto the white shelf wrapper. */\n shelfClassName?: string;\n /** Override the footer-priority convention. Defaults to `auto`. */\n tray?: TrayPreference;\n};\n\nexport type RenderedTrayLayout = {\n /** The inner JSX (tray slot + wrapped shelf), ready to render inside the shell. */\n content: ReactNode;\n /** The resolved tray edge — spread onto the container root as `data-tray`. */\n edge: TrayEdge;\n /** Layout/surface classes for the container shell — merge onto the container root. */\n shellClassName: string;\n};\n\n/**\n * Builds the shared droplet \"tray\" markup for a container (Dialog/Card/AlertDialog/…).\n *\n * Centralizes BOTH the convention (via {@link resolveTrayLayout}) and the render —\n * the muted shell classes + the raised white shelf wrapper + the tray-slot\n * placement — so every container (and new ones like Table/CodeBlock) shares one\n * implementation and can't drift. Each container keeps its own root element\n * (portal, animations, `shadow-elevated` vs `shadow-card`) and just merges\n * `shellClassName` + renders `content`.\n *\n * Note: this composes the tray treatment; it does **not** make any container\n * depend on `Card`. Containers stay independent primitives sharing a treatment.\n */\nexport const renderTrayLayout = ({\n children,\n isHeader,\n isFooter,\n tray = 'auto',\n shelfClassName,\n}: RenderTrayLayoutParams): RenderedTrayLayout => {\n const { edge, shelf, trayChild } = resolveTrayLayout({\n children,\n isFooter,\n isHeader,\n tray,\n });\n\n // Flat container — no shell, no shelf; render children as-is.\n if (edge === 'none') {\n return { content: children, edge, shellClassName: 'bg-card' };\n }\n\n // Muted shell: insets the shelf on top+sides (footer tray) or bottom+sides\n // (header tray), leaving the tray edge flush.\n const shellClassName = cn(\n 'flex flex-col bg-[var(--tray-chrome)] px-[var(--tray-inset)]',\n edge === 'footer' ? 'pt-[var(--tray-inset)]' : 'pb-[var(--tray-inset)]',\n );\n\n const content = (\n <>\n {edge === 'header' && trayChild}\n <div\n data-slot='tray-shelf'\n className={cn(\n // flex-1 so short content in equal-height grids fills white (no void).\n 'flex flex-1 flex-col overflow-hidden bg-card rounded-[var(--tray-shelf-radius)] shadow-[var(--tray-shelf-shadow)]',\n shelfClassName,\n )}\n >\n {shelf}\n </div>\n {edge === 'footer' && trayChild}\n </>\n );\n\n return { content, edge, shellClassName };\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport {\n Action,\n Cancel,\n Content,\n Description,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n} from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button';\nimport { type TrayPreference } from '../tray/resolveTrayLayout';\nimport { renderTrayLayout } from '../tray/renderTrayLayout';\n\nconst AlertDialog = Root;\nconst AlertDialogTrigger = Trigger;\nconst AlertDialogPortal = Portal;\n\nconst AlertDialogOverlay = ({\n className,\n ...props\n}: ComponentProps<typeof Overlay>): ReactElement => (\n <Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogContent = ({\n className,\n size = 'default',\n tray = 'auto',\n children,\n ...props\n}: ComponentProps<typeof Content> & {\n size?: 'default' | 'sm';\n /** Tray edge. `auto` = footer-priority (actions → footer tray). */\n tray?: TrayPreference;\n}): ReactElement => {\n const { edge, shellClassName, content } = renderTrayLayout({\n children,\n isFooter: (el) => el.type === AlertDialogFooter,\n isHeader: (el) => el.type === AlertDialogHeader,\n tray,\n });\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n data-tray={edge}\n className={cn(\n 'overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-[var(--shadow-elevated)] duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none',\n shellClassName,\n className\n )}\n {...props}\n >\n {content}\n </Content>\n </AlertDialogPortal>\n );\n};\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 px-5 py-4 bg-card text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn('grid grid-cols-2 gap-2 px-5 py-4 bg-muted', className)}\n {...props}\n />\n);\n\nconst AlertDialogTitle = ({\n className,\n ...props\n}: ComponentProps<typeof Title>): ReactElement => (\n <Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n 'text-[17px] font-semibold text-balance sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogDescription = ({\n className,\n ...props\n}: ComponentProps<typeof Description>): ReactElement => (\n <Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-muted-foreground text-sm text-pretty', className)}\n {...props}\n />\n);\n\nconst AlertDialogMedia = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className\n )}\n {...props}\n />\n);\n\nconst AlertDialogAction = ({\n className,\n variant = 'destructive',\n size = 'default',\n ...props\n}: ComponentProps<typeof Action> &\n Pick<ComponentProps<typeof Button>, 'variant' | 'size'>): ReactElement => (\n <Button variant={variant} size={size} asChild>\n <Action\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n </Button>\n);\n\nconst AlertDialogCancel = ({\n className,\n variant = 'outline',\n size = 'default',\n ...props\n}: ComponentProps<typeof Cancel> &\n Pick<ComponentProps<typeof Button>, 'variant' | 'size'>): ReactElement => (\n <Button variant={variant} size={size} asChild>\n <Cancel\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n {...props}\n />\n </Button>\n);\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\n\nimport { cn } from '../../../lib/utils';\n\nconst Avatar = ({\n className,\n size = 'default',\n ...props\n}: ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: 'default' | 'sm' | 'lg';\n}): ReactElement => {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n className={cn(\n 'group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarImage = ({\n className,\n ...props\n}: ComponentProps<typeof AvatarPrimitive.Image>): ReactElement => {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\n 'aspect-square size-full outline-1 -outline-offset-1 outline-black/10',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarFallback = ({\n className,\n ...props\n}: ComponentProps<typeof AvatarPrimitive.Fallback>): ReactElement => {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n 'bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarBadge = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n 'bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none',\n 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',\n 'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2',\n 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarGroup = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n '*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2',\n className\n )}\n {...props}\n />\n );\n};\n\nconst AvatarGroupCount = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n 'bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3',\n className\n )}\n {...props}\n />\n );\n};\n\nexport {\n Avatar,\n AvatarImage,\n AvatarFallback,\n AvatarBadge,\n AvatarGroup,\n AvatarGroupCount,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useState } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { motion, useReducedMotion } from 'motion/react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Alert01Icon,\n AlertCircleIcon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\n\nimport { cn } from '../../../lib/utils';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\nconst alertVariants = cva(\n 'flex gap-3 rounded-xl border px-3.5 py-3 text-sm transition-[color,background-color,border-color] duration-150 motion-reduce:transition-none',\n {\n defaultVariants: {\n variant: 'neutral',\n },\n variants: {\n variant: {\n danger:\n 'bg-[var(--danger-light)] text-[var(--text-danger)] border-[var(--border-danger)]/30',\n info: 'bg-[var(--brand-light)] text-[var(--text-link)] border-[var(--border-selected)]/30',\n neutral:\n 'bg-secondary text-secondary-foreground border-[var(--border-default)]',\n success:\n 'bg-[var(--success-light)] text-[var(--text-success)] border-[var(--border-success)]/30',\n warning:\n 'bg-[var(--warning-light)] text-[var(--text-warning)] border-[var(--border-warning)]/30',\n },\n },\n }\n);\n\n/** Maps each semantic variant to its Hugeicons icon. */\nconst variantIcons = {\n danger: AlertCircleIcon,\n info: InformationCircleIcon,\n neutral: InformationCircleIcon,\n success: CheckmarkCircle02Icon,\n warning: Alert01Icon,\n} as const;\n\n/** Semantic variant names for the inline Alert component. */\ntype AlertVariant = 'neutral' | 'info' | 'success' | 'warning' | 'danger';\n\n/** Props accepted by the Alert component. */\ntype AlertProps = ComponentProps<'div'> &\n VariantProps<typeof alertVariants> & {\n /** Body content of the alert. */\n children: ReactNode;\n /**\n * When true, a dismiss button is shown. The alert removes itself from the\n * DOM on dismissal (controlled via local state).\n */\n dismissible?: boolean;\n /** Called after the user dismisses the alert. */\n onDismiss?: () => void;\n /** Optional short heading rendered above the body. */\n title?: string;\n };\n\n/**\n * An inline semantic callout for contextual feedback.\n *\n * Variants mirror the Badge semantic system: `neutral` (default) | `info` |\n * `success` | `warning` | `danger`. Each variant carries a matching background\n * tint, border, and leading icon drawn from the design-token set.\n *\n * - `danger` and `warning` use `role=\"alert\"` (assertive); others use\n * `role=\"status\"` (polite) to avoid interrupting screen-reader flow.\n * - Use `dismissible` + `onDismiss` for user-closeable callouts.\n *\n * @example\n * <Alert variant=\"warning\" title=\"Quota almost reached\">\n * You have used 90% of your monthly API calls.\n * </Alert>\n */\nconst Alert = ({\n variant = 'neutral',\n title,\n children,\n dismissible = false,\n onDismiss,\n className,\n ...props\n}: AlertProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n const shouldReduceMotion = useReducedMotion();\n\n if (dismissed) return null;\n\n const Icon = variantIcons[variant as AlertVariant];\n\n // danger and warning need assertive role so screen readers announce immediately\n const role =\n variant === 'danger' || variant === 'warning' ? 'alert' : 'status';\n\n return (\n <div\n role={role}\n data-slot=\"alert\"\n data-variant={variant}\n className={cn(alertVariants({ variant }), className)}\n {...props}\n >\n {/* Leading icon — shrinks to a fixed size to stay aligned with the first line of text */}\n <span className=\"shrink-0 mt-0.5 opacity-80\">\n <HugeiconsIcon icon={Icon} size={16} />\n </span>\n\n <div className=\"flex-1 min-w-0\">\n {title && (\n <p className=\"font-medium leading-snug mb-0.5 text-pretty\">{title}</p>\n )}\n <div className=\"leading-relaxed text-pretty\">{children}</div>\n </div>\n\n {dismissible && (\n <motion.button\n type=\"button\"\n aria-label=\"Dismiss\"\n whileTap={shouldReduceMotion ? undefined : { scale: 0.96 }}\n transition={spring}\n onClick={() => {\n setDismissed(true);\n onDismiss?.();\n }}\n className=\"relative before:absolute before:-inset-[13px] before:content-[''] shrink-0 mt-0.5 rounded-sm p-0.5 opacity-60 hover:opacity-100 transition-[opacity] duration-150 ease-out motion-reduce:transition-none touch-manipulation cursor-pointer\"\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </motion.button>\n )}\n </div>\n );\n};\n\nexport { Alert };\nexport type { AlertProps, AlertVariant };\n","import { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-[5px] border border-transparent px-1.5 py-0.5 text-xs font-medium tabular-nums w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 [&>svg]:[stroke-width:2.5] gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow,background-color] duration-150 motion-reduce:transition-none overflow-hidden',\n {\n defaultVariants: {\n variant: 'neutral',\n },\n variants: {\n variant: {\n brand:\n 'bg-[var(--brand-light)] text-[var(--brand-accented)] dark:text-[oklch(0.650_0.085_256)] border-[var(--brand-default)]/20 dark:border-[oklch(0.450_0.070_256)]/30 [a&]:hover:bg-[var(--brand-light)]/80',\n danger:\n 'bg-[var(--danger-light)] text-[var(--text-danger)] border-[var(--border-danger)]/20 [a&]:hover:bg-[var(--danger-light)]/80',\n dashed:\n 'border-dashed border-[var(--border-default)] text-muted-foreground bg-transparent',\n 'dashed-brand':\n 'border-dashed border-[var(--brand-default)] text-[var(--brand-accented)] bg-transparent',\n default: 'bg-primary text-primary-foreground [a&]:hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n 'gradient-brand':\n 'bg-gradient-to-r from-[var(--brand-default)] to-[var(--process-default)] text-white border-transparent',\n 'gradient-premium':\n 'bg-gradient-to-r from-amber-500 to-orange-400 text-white border-transparent',\n inactive:\n 'bg-[var(--inactive-light)] text-muted-foreground border-[var(--border-inactive)]/40 [a&]:hover:bg-[var(--inactive-light)]/80',\n link: 'text-primary underline-offset-4 hover:underline [a&]:hover:underline',\n neutral:\n 'bg-secondary text-secondary-foreground border-border [a&]:hover:bg-secondary/90',\n outline:\n 'border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n process:\n 'bg-[var(--process-light)] text-[var(--text-process)] border-[var(--border-process)]/20 [a&]:hover:bg-[var(--process-light)]/80',\n secondary:\n 'bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',\n success:\n 'bg-[var(--success-light)] text-[var(--text-success)] border-[var(--border-success)]/20 [a&]:hover:bg-[var(--success-light)]/80',\n warning:\n 'bg-[var(--warning-light)] text-[var(--text-warning)] border-[var(--border-warning)]/20 [a&]:hover:bg-[var(--warning-light)]/80',\n },\n },\n }\n);\n\n/**\n * A small status/label badge.\n *\n * Semantic variants (preferred): `neutral` (grey — the default), `brand`, `success`,\n * `warning`, `danger`, `process`, `inactive`. Pick the variant by meaning.\n *\n * The shadcn-style variants (`default`, `secondary`, `outline`, `ghost`, `link`,\n * `destructive`, `dashed`, `dashed-brand`, `gradient-brand`, `gradient-premium`) are\n * kept as deprecated aliases for backwards compatibility — prefer the semantic ones.\n */\nconst Badge = ({\n className,\n variant = 'neutral',\n asChild = false,\n ...props\n}: ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }): ReactElement => {\n const Comp = asChild ? Slot : 'span';\n\n return (\n <Comp\n data-slot=\"badge\"\n data-variant={variant}\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n};\n\nexport { Badge, badgeVariants };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport {\n ArrowRight01Icon,\n MoreHorizontalIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\n/**\n * Root nav wrapper for a breadcrumb trail.\n * Renders a semantic `<nav>` with `aria-label=\"breadcrumb\"` so assistive\n * technologies identify it as the site breadcrumb landmark.\n */\nconst Breadcrumb = ({\n className,\n ...props\n}: ComponentProps<'nav'>): ReactElement => (\n <nav\n data-slot=\"breadcrumb\"\n aria-label=\"breadcrumb\"\n className={cn('', className)}\n {...props}\n />\n);\n\n/**\n * Ordered list that holds `BreadcrumbItem` children.\n * Flex-wraps so long trails reflow gracefully on narrow viewports.\n */\nconst BreadcrumbList = ({\n className,\n ...props\n}: ComponentProps<'ol'>): ReactElement => (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n 'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',\n className\n )}\n {...props}\n />\n);\n\n/**\n * A single step in the breadcrumb trail.\n * Renders as an `<li>` with inline-flex layout so icon separators stay\n * vertically centered next to link text.\n */\nconst BreadcrumbItem = ({\n className,\n ...props\n}: ComponentProps<'li'>): ReactElement => (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn('inline-flex items-center gap-1.5', className)}\n {...props}\n />\n);\n\ntype BreadcrumbLinkProps = ComponentProps<'a'> & {\n /**\n * When true, the component merges its props onto its direct child element\n * rather than rendering an `<a>` tag itself.\n * Use this to pass a framework router `<Link>` component (e.g. Next.js, React Router).\n */\n asChild?: boolean;\n};\n\n/**\n * A navigable breadcrumb step.\n *\n * Supports `asChild` (Radix Slot) so consumers can swap in a router `<Link>`:\n * ```tsx\n * <BreadcrumbLink asChild>\n * <Link href='/settings'>Settings</Link>\n * </BreadcrumbLink>\n * ```\n *\n * Inherits `text-muted-foreground` from `BreadcrumbList` and upgrades to\n * `text-foreground` on hover with an `ease-out` transition.\n */\nconst BreadcrumbLink = ({\n asChild = false,\n className,\n children,\n ...props\n}: BreadcrumbLinkProps): ReactElement => {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"breadcrumb-link\"\n className={cn(\n 'transition-colors duration-150 ease-out hover:text-foreground motion-reduce:transition-none',\n className\n )}\n {...props}\n >\n {children}\n </Comp>\n );\n};\n\n/**\n * The current page indicator — the last (non-navigable) step in the trail.\n *\n * Renders as a `<span>` with `aria-current=\"page\"` so screen readers announce\n * it as the current location. Not styled as a link; uses `text-foreground` to\n * visually distinguish it from the ancestor links.\n */\nconst BreadcrumbPage = ({\n className,\n children,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n className={cn('font-normal text-foreground', className)}\n {...props}\n >\n {children}\n </span>\n);\n\ntype BreadcrumbSeparatorProps = ComponentProps<'li'> & {\n /**\n * Custom separator content.\n * Defaults to a `ChevronRight` (`ArrowRight01`) Hugeicon when omitted.\n */\n children?: ReactNode;\n};\n\n/**\n * Visual divider between breadcrumb steps.\n *\n * Hidden from assistive technologies via `aria-hidden`.\n * Accepts custom `children` to replace the default chevron with any icon or character.\n */\nconst BreadcrumbSeparator = ({\n className,\n children,\n ...props\n}: BreadcrumbSeparatorProps): ReactElement => (\n <li\n data-slot=\"breadcrumb-separator\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? (\n <HugeiconsIcon\n icon={ArrowRight01Icon}\n size={14}\n className=\"text-muted-foreground/60\"\n aria-hidden=\"true\"\n />\n )}\n </li>\n);\n\n/**\n * Collapsed-steps indicator for long breadcrumb trails.\n *\n * Renders a `MoreHorizontal` icon with a screen-reader-only \"More\" label.\n * Hidden from the accessibility tree via `aria-hidden` — the surrounding\n * visible crumbs provide sufficient context.\n */\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n aria-hidden=\"true\"\n className={cn('flex size-6 items-center justify-center', className)}\n {...props}\n >\n <HugeiconsIcon icon={MoreHorizontalIcon} size={14} aria-hidden=\"true\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\n\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n};\nexport type { BreadcrumbLinkProps, BreadcrumbSeparatorProps };\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { type TrayPreference } from '../tray/resolveTrayLayout';\nimport { renderTrayLayout } from '../tray/renderTrayLayout';\n\nconst Card = ({\n className,\n interactive = false,\n selected = false,\n tray = 'none',\n children,\n ...props\n}: ComponentProps<'div'> & {\n /** Hover-elevation + press feedback for clickable cards. */\n interactive?: boolean;\n /** Brand ring for the selected state (e.g. a chosen plan). */\n selected?: boolean;\n /**\n * Tray treatment. `none` (default) = flat card. `auto` = footer-priority\n * convention (footer → footer tray, else header tray). Or force `header`/`footer`.\n */\n tray?: TrayPreference;\n}): ReactElement => {\n const { edge, shellClassName, content } = renderTrayLayout({\n children,\n isFooter: (el) => el.type === CardFooter,\n isHeader: (el) => el.type === CardHeader,\n tray,\n });\n return (\n <div\n data-slot=\"card\"\n data-selected={selected || undefined}\n data-tray={edge}\n className={cn(\n 'text-card-foreground flex flex-col rounded-[16px] border-0 shadow-[var(--shadow-card)] overflow-hidden',\n shellClassName,\n interactive &&\n 'cursor-pointer transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none hover:shadow-[var(--shadow-elevated)] active:scale-[0.99]',\n selected && 'shadow-[0_0_0_2px_var(--action),var(--shadow-card)]',\n className\n )}\n {...props}\n >\n {content}\n </div>\n );\n};\n\nconst CardHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-header\"\n className={cn(\n '@container/card-header relative flex flex-col gap-0.5 px-4 py-3.5 bg-card border-b border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n);\n\nconst CardTitle = ({\n className,\n children,\n ...props\n}: ComponentProps<'h3'>): ReactElement => (\n <h3\n data-slot=\"card-title\"\n className={cn(\n 'text-base leading-none font-semibold text-balance',\n className\n )}\n {...props}\n >\n {children}\n </h3>\n);\n\nconst CardDescription = ({\n className,\n ...props\n}: ComponentProps<'p'>): ReactElement => (\n <p\n data-slot=\"card-description\"\n className={cn('text-muted-foreground text-sm text-pretty', className)}\n {...props}\n />\n);\n\nconst CardAction = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-action\"\n className={cn('absolute top-3.5 right-4', className)}\n {...props}\n />\n);\n\nconst CardContent = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-content\"\n className={cn('flex-1 px-4 py-3 bg-card', className)}\n {...props}\n />\n);\n\nconst CardFooter = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"card-footer\"\n className={cn(\n 'mt-auto flex items-center justify-end gap-2 px-4 py-3.5 border-t border-[var(--border-divider)] bg-muted',\n className\n )}\n {...props}\n />\n);\n\nexport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n};\n","import { type ReactElement, type SVGProps } from 'react';\n\nconst CheckIcon = ({\n size = 14,\n strokeWidth = 3,\n className,\n ...props\n}: {\n // Pass null to let the parent's CSS size the icon instead of an inline size.\n size?: number | null;\n strokeWidth?: number;\n} & Omit<SVGProps<SVGSVGElement>, 'strokeWidth'>): ReactElement => (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={size === null ? undefined : { height: size, width: size }}\n className={className}\n {...props}\n >\n <path d=\"M4 12L9 17L20 6\" pathLength={1} strokeWidth={strokeWidth} />\n </svg>\n);\n\nexport { CheckIcon };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\n\nimport { cn } from '../../../lib/utils';\n\nconst Checkbox = ({\n className,\n ...props\n}: ComponentProps<typeof CheckboxPrimitive.Root>): ReactElement => {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"group peer dark:bg-input/30 data-[state=checked]:bg-[var(--action)] data-[state=checked]:text-white dark:data-[state=checked]:bg-[var(--action)] data-[state=indeterminate]:bg-[var(--action)] data-[state=indeterminate]:text-white relative size-4 shrink-0 touch-manipulation rounded-[4px] border-0 shadow-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] hover:data-[state=unchecked]:shadow-[var(--shadow-control-hover)] dark:hover:data-[state=unchecked]:shadow-[var(--shadow-control-hover)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] data-[state=indeterminate]:shadow-[var(--shadow-control-checked)] dark:data-[state=indeterminate]:shadow-[var(--shadow-control-checked)] transition-[color,box-shadow,background-color] duration-200 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer after:absolute after:-inset-[14px] after:content-['']\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"relative grid place-content-center text-current size-full\"\n forceMount\n >\n {/* Minus for indeterminate */}\n <svg\n aria-hidden=\"true\"\n className=\"size-3.5 text-current absolute inset-0 m-auto transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none opacity-0 scale-[0.25] blur-[4px] group-data-[state=indeterminate]:opacity-100 group-data-[state=indeterminate]:scale-100 group-data-[state=indeterminate]:blur-none\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M5 12L19 12\" pathLength={1} strokeWidth={3} />\n </svg>\n {/* Checkmark for checked */}\n <svg\n aria-hidden=\"true\"\n className=\"size-3.5 text-current absolute inset-0 m-auto transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none opacity-0 scale-[0.25] blur-[4px] group-data-[state=checked]:opacity-100 group-data-[state=checked]:scale-100 group-data-[state=checked]:blur-none\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M4 12L9 17L20 6\" pathLength={1} strokeWidth={3} />\n </svg>\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n};\n\nexport { Checkbox };\n","'use client';\n\nimport {\n type ComponentProps,\n type FC,\n type ReactElement,\n type ReactNode,\n isValidElement,\n} from 'react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\n\nimport { cn } from '../../../lib/utils';\n\nconst Collapsible = ({\n ...props\n}: ComponentProps<typeof CollapsiblePrimitive.Root>): ReactElement => (\n <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n);\n\n/*\n * `active:scale-100` cancels the press-scale a Button brings when used as the trigger via\n * `asChild`. Button's `active:scale-[0.96]` is good feedback on a button-shaped control, but\n * a disclosure row is typically `w-full`, so scaling shrinks the whole header — the text\n * visibly jumps inward on every click. Height is already animating; scale on top reads as\n * the section flinching.\n */\nconst PRESS_SCALE_CANCEL_CLASS_NAME = 'active:scale-100';\n\nconst PRESS_SCALE_CLASS_NAME_PATTERN = /(^|[\\s:])active:scale-/;\n\n/*\n * A caller that asks for a press-scale — on the trigger or on its `asChild` child — gets it.\n * Emitting the cancel alongside it would leave the winner to stylesheet order for a plain\n * element child, since Radix's Slot concatenates a child's className instead of running it\n * through twMerge.\n */\nconst hasPressScale = (className: string | undefined): boolean =>\n className !== undefined && PRESS_SCALE_CLASS_NAME_PATTERN.test(className);\n\nconst hasChildPressScale = (children: ReactNode): boolean => {\n if (!isValidElement<{ className?: string }>(children)) {\n return false;\n }\n\n return hasPressScale(children.props.className);\n};\n\nexport type CollapsibleTriggerProps = ComponentProps<\n typeof CollapsiblePrimitive.CollapsibleTrigger\n>;\n\n/**\n * The clickable header that opens and closes a `Collapsible`.\n *\n * Pass `asChild` to render your own element. The trigger suppresses the press-scale a\n * `Button` child would otherwise bring, unless an `active:scale-*` is set explicitly on the\n * trigger or on that child.\n */\nconst CollapsibleTrigger: FC<CollapsibleTriggerProps> = ({\n className,\n children,\n ...props\n}) => {\n const keepsCallerPressScale =\n hasPressScale(className) || hasChildPressScale(children);\n\n let pressScaleClassName = PRESS_SCALE_CANCEL_CLASS_NAME;\n if (keepsCallerPressScale) {\n pressScaleClassName = '';\n }\n\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot=\"collapsible-trigger\"\n className={cn('touch-manipulation', pressScaleClassName, className)}\n {...props}\n >\n {children}\n </CollapsiblePrimitive.CollapsibleTrigger>\n );\n};\n\nconst CollapsibleContent = ({\n className,\n ...props\n}: ComponentProps<\n typeof CollapsiblePrimitive.CollapsibleContent\n>): ReactElement => (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot=\"collapsible-content\"\n className={cn(\n 'overflow-hidden',\n 'data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up',\n 'motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n);\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport {\n Close,\n Content,\n Description,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n} from '@radix-ui/react-dialog';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Cancel01Icon } from '@hugeicons/core-free-icons';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button';\nimport { type TrayPreference } from '../tray/resolveTrayLayout';\nimport { renderTrayLayout } from '../tray/renderTrayLayout';\n\n/**\n * Modal dialog (popup) overlaying the page.\n *\n * Compose with `DialogTrigger`, `DialogContent`, `DialogHeader`, `DialogTitle`,\n * `DialogDescription`, `DialogBody`, `DialogFooter`, and `DialogClose`.\n */\nconst Dialog = Root;\nconst DialogTrigger = Trigger;\nconst DialogPortal = Portal;\nconst DialogClose = Close;\n\nconst DialogOverlay = ({\n className,\n ...props\n}: ComponentProps<typeof Overlay>): ReactElement => (\n <Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n);\n\nconst DialogContent = ({\n className,\n children,\n tray = 'auto',\n ...props\n}: ComponentProps<typeof Content> & {\n /** Tray edge. `auto` = footer-priority convention; override with `header`/`footer`/`none`. */\n tray?: TrayPreference;\n}): ReactElement => {\n const { edge, shellClassName, content } = renderTrayLayout({\n children,\n isFooter: (el) => el.type === DialogFooter,\n isHeader: (el) => el.type === DialogHeader,\n tray,\n });\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <Content\n data-slot=\"dialog-content\"\n data-tray={edge}\n className={cn(\n 'overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-[var(--shadow-elevated)] duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in outline-none sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none',\n shellClassName,\n className\n )}\n {...props}\n >\n {content}\n </Content>\n </DialogPortal>\n );\n};\n\n/**\n * The close button is pinned to the top-right corner, matching Sheet's `top-3 right-3`.\n * A fixed inset keeps it in the corner whatever the header's height, so a title plus a\n * wrapping description cannot push it down over the text.\n *\n * top-3 (12px) puts the 28px button's centre at 26px; the 17px leading-none title starts\n * after the header's 16px padding, so its centre is 24.5px. 1.5px low is imperceptible and\n * consistency with Sheet is worth more than the half-pixel.\n */\nconst CLOSE_BUTTON_CLASS_NAME =\n 'absolute top-3 right-3 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground opacity-70 transition-[opacity,background-color] duration-150 ease-out motion-reduce:transition-none hover:opacity-100 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus:outline-hidden cursor-pointer touch-manipulation before:absolute before:-inset-[8px] before:content-[\"\"]';\n\nconst DialogHeader = ({\n className,\n showCloseButton = true,\n children,\n ...props\n}: ComponentProps<'div'> & { showCloseButton?: boolean }): ReactElement => (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n // px 16 / py 16 — symmetric, per the Dialog tuner spec.\n 'relative flex flex-col gap-0.5 px-4 py-4 border-b border-[var(--border-hairline)] bg-card sm:text-left',\n // Reserve the close button's column so a long title or description wraps before it\n // rather than running underneath — the button is 28px wide at a 12px inset, so 48px\n // clears it with breathing room. twMerge lets this win over the px-4 above.\n showCloseButton && 'pr-12',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <Close\n data-slot=\"dialog-close\"\n className={CLOSE_BUTTON_CLASS_NAME}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n <span className=\"sr-only\">Close</span>\n </Close>\n )}\n </div>\n);\n\nconst DialogBody = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"dialog-body\"\n className={cn('px-4 py-[18px] bg-card', className)}\n {...props}\n />\n);\n\nconst DialogFooter = ({\n className,\n showCloseButton = false,\n children,\n ...props\n}: ComponentProps<'div'> & { showCloseButton?: boolean }): ReactElement => (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end px-3 py-3.5 border-t border-[var(--border-divider)] bg-muted',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <Close asChild>\n <Button variant=\"outline\">Close</Button>\n </Close>\n )}\n </div>\n);\n\nconst DialogTitle = ({\n className,\n ...props\n}: ComponentProps<typeof Title>): ReactElement => (\n <Title\n data-slot=\"dialog-title\"\n className={cn(\n 'text-[17px] leading-none font-semibold text-balance',\n className\n )}\n {...props}\n />\n);\n\nconst DialogDescription = ({\n className,\n ...props\n}: ComponentProps<typeof Description>): ReactElement => (\n <Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm text-pretty', className)}\n {...props}\n />\n);\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../dialog';\n\nconst Command = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive>): ReactElement => (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n);\n\nconst CommandDialog = ({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n ...props\n}: ComponentProps<typeof Dialog> & {\n className?: string;\n description?: string;\n title?: string;\n}): ReactElement => (\n <Dialog {...props}>\n <DialogContent className={cn('overflow-hidden p-0', className)}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n);\n\nconst CommandInput = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Input>): ReactElement => (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <HugeiconsIcon\n icon={Search01Icon}\n size={16}\n className=\"shrink-0 text-muted-foreground/70\"\n />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n);\n\nconst CommandList = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.List>): ReactElement => (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto p-1',\n className\n )}\n {...props}\n />\n);\n\nconst CommandEmpty = ({\n ...props\n}: ComponentProps<typeof CommandPrimitive.Empty>): ReactElement => (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n);\n\nconst CommandGroup = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Group>): ReactElement => (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n);\n\nconst CommandSeparator = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Separator>): ReactElement => (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n);\n\nconst CommandItem = ({\n className,\n ...props\n}: ComponentProps<typeof CommandPrimitive.Item>): ReactElement => (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n);\n\nconst CommandShortcut = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n);\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '../../../lib/utils';\n\nconst Popover = ({\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Root>): ReactElement => (\n <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n);\n\nconst PopoverTrigger = ({\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Trigger>): ReactElement => (\n <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n);\n\nconst PopoverContent = ({\n className,\n align = 'center',\n sideOffset = 8,\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Content>): ReactElement => {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-xl border-0 p-4 shadow-[var(--shadow-elevated)] outline-hidden will-change-[opacity,transform] motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n};\n\nconst PopoverAnchor = ({\n ...props\n}: ComponentProps<typeof PopoverPrimitive.Anchor>): ReactElement => (\n <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n);\n\nconst PopoverHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn('flex flex-col gap-1 text-sm', className)}\n {...props}\n />\n );\n};\n\nconst PopoverTitle = ({\n className,\n children,\n ...props\n}: ComponentProps<'h2'>): ReactElement => {\n return (\n <h2\n data-slot=\"popover-title\"\n className={cn('font-medium text-balance', className)}\n {...props}\n >\n {children}\n </h2>\n );\n};\n\nconst PopoverDescription = ({\n className,\n ...props\n}: ComponentProps<'p'>): ReactElement => {\n return (\n <p\n data-slot=\"popover-description\"\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n );\n};\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverHeader,\n PopoverTitle,\n PopoverDescription,\n};\n","'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport type { CheckedState } from '@radix-ui/react-checkbox';\nimport { ArrowDown01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\nimport { CheckIcon } from '../check-icon';\nimport { Checkbox } from '../checkbox';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '../command';\nimport { Popover, PopoverContent, PopoverTrigger } from '../popover';\n\n/** A single selectable option rendered inside the Combobox dropdown. */\ntype ComboboxOption = {\n /** The human-readable label shown in the trigger and list. */\n label: string;\n /** The machine-readable value passed to `onValueChange`. */\n value: string;\n};\n\n/** Props shared by the single- and multi-select `Combobox`. */\ntype ComboboxBaseProps = {\n /** Additional class names forwarded to the trigger button. */\n className?: string;\n /** When true the trigger is rendered in a disabled state and the popover cannot open. */\n disabled?: boolean;\n /** Text shown when the search query matches no options. Defaults to \"No results.\" */\n emptyText?: string;\n /** The list of options to search and select from. */\n options: ComboboxOption[];\n /** Text shown in the trigger when no option is selected. Defaults to \"Select…\". */\n placeholder?: string;\n /** Placeholder text shown inside the search input. Defaults to \"Search…\". */\n searchPlaceholder?: string;\n};\n\n/** Props for the single-select `Combobox` (the default). */\ntype ComboboxSingleProps = ComboboxBaseProps & {\n /** Omit or pass `false` for single-select. */\n multiple?: false;\n /** Called with the newly selected option's value when the user picks an item. */\n onValueChange: (value: string) => void;\n /** The currently selected value. Pass `undefined` to show the placeholder. */\n value?: string;\n};\n\n/** Props for the multi-select `Combobox`. Options render a `Checkbox`. */\ntype ComboboxMultipleProps = ComboboxBaseProps & {\n /**\n * Formats the trigger text from the selected labels, in option order. Only\n * called when at least one option is selected. Defaults to joining them\n * with \", \". Use it to switch to a count, e.g. \"3 chains\", once the list\n * would get cut off.\n */\n formatSelected?: (labels: string[]) => ReactNode;\n /** Turns on multi-select: the list stays open and each option toggles. */\n multiple: true;\n /** Called with the full list of selected values after each toggle. */\n onValueChange: (value: string[]) => void;\n /**\n * Label for an optional row above the options that selects or clears all\n * of them. Its checkbox is indeterminate while only some are selected.\n * Hidden while the user is searching. Omit to leave the row out.\n */\n selectAllLabel?: string;\n /** The currently selected values, in any order. */\n value: string[];\n};\n\n/** Props for the controlled `Combobox` component. */\ntype ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;\n\n/** cmdk value of the select-all row; never matches a real option. */\nconst SELECT_ALL_VALUE = '__droplet-combobox-select-all__';\n\n/**\n * Decorative `Checkbox` inside a multi-select option. The option row is the\n * control: it owns focus, the click target and the checked state for\n * assistive tech, so the checkbox is hidden from them and ignores pointer\n * events to avoid a second tab stop or a second announcement.\n */\nconst OptionCheckbox = ({\n checked,\n}: {\n checked: CheckedState;\n}): ReactElement => (\n <Checkbox\n checked={checked}\n aria-hidden\n tabIndex={-1}\n // `pointer-events-none` turns off the Checkbox's own hover ring, so the\n // unchecked box darkens when its row is highlighted (by pointer or\n // keyboard) instead, matching the selection-control hover rule.\n // The row is the hit area, so the Checkbox's enlarged `::after` hit area\n // is dropped: it reaches past the last row and makes the list scroll.\n className=\"pointer-events-none after:hidden in-data-[selected=true]:data-[state=unchecked]:shadow-[var(--shadow-control-hover)]\"\n />\n);\n\n/** Checkbox state of the select-all row: indeterminate while only some are selected. */\nconst getSelectAllState = ({\n selectedCount,\n totalCount,\n}: {\n selectedCount: number;\n totalCount: number;\n}): CheckedState => {\n if (selectedCount === 0) return false;\n if (selectedCount === totalCount) return true;\n return 'indeterminate';\n};\n\n/**\n * Searchable Combobox, single-select by default or multi-select with `multiple`.\n *\n * Composes `Popover`, `Command` and `Checkbox` from the droplet design system.\n * The trigger is styled like `SelectTrigger` with a rotating chevron that\n * signals open/closed state.\n *\n * - Single-select: picking an item closes the popover, fires `onValueChange`\n * and shows a check mark next to the active selection.\n * - Multi-select: each option shows a `Checkbox`, picking an item toggles it\n * and keeps the popover open, and the trigger lists the selected labels.\n *\n * @example\n * ```tsx\n * const [chain, setChain] = useState('');\n * <Combobox\n * options={[{ value: 'eth', label: 'Ethereum' }, { value: 'sol', label: 'Solana' }]}\n * value={chain}\n * onValueChange={setChain}\n * placeholder=\"Select a chain\"\n * />\n *\n * const [chains, setChains] = useState<string[]>([]);\n * <Combobox\n * multiple\n * options={[{ value: 'eth', label: 'Ethereum' }, { value: 'sol', label: 'Solana' }]}\n * value={chains}\n * onValueChange={setChains}\n * selectAllLabel=\"All chains\"\n * />\n * ```\n */\nconst Combobox = (props: ComboboxProps): ReactElement => {\n const {\n options,\n placeholder = 'Select…',\n searchPlaceholder = 'Search…',\n emptyText = 'No results.',\n className,\n disabled = false,\n } = props;\n\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState('');\n\n const selectedValues = props.multiple ? props.value : [props.value];\n const selectedOptions = options.filter((opt) =>\n selectedValues.includes(opt.value)\n );\n const selectedLabels = selectedOptions.map((opt) => opt.label);\n const selectedLabel =\n props.multiple && props.formatSelected && selectedLabels.length > 0\n ? props.formatSelected(selectedLabels)\n : selectedLabels.join(', ') || undefined;\n\n const selectAllState = getSelectAllState({\n selectedCount: selectedOptions.length,\n totalCount: options.length,\n });\n const showSelectAll =\n props.multiple && props.selectAllLabel !== undefined && search === '';\n\n // eslint-disable-next-line custom-rules/require-single-object-param -- internal cmdk onSelect handler; receives a single string value, not a named-args object\n const handleSelect = (selectedValue: string) => {\n if (!props.multiple) {\n props.onValueChange(selectedValue);\n // Routed through the same close path as Escape so the query resets.\n handleOpenChange(false);\n return;\n }\n\n // Multi-select toggles in place and keeps the list open for the next pick.\n props.onValueChange(\n props.value.includes(selectedValue)\n ? props.value.filter((v) => v !== selectedValue)\n : [...props.value, selectedValue]\n );\n };\n\n const handleSelectAll = () => {\n if (!props.multiple) return;\n\n props.onValueChange(\n selectAllState === true ? [] : options.map((opt) => opt.value)\n );\n };\n\n // eslint-disable-next-line custom-rules/require-single-object-param -- Radix onOpenChange handler; receives a single boolean\n const handleOpenChange = (nextOpen: boolean) => {\n setOpen(nextOpen);\n // The query lives here, not in the list, so it would outlive the popover\n // and reopen pre-filtered with the select-all row hidden.\n if (!nextOpen) setSearch('');\n };\n\n return (\n <Popover open={open} onOpenChange={handleOpenChange}>\n <PopoverTrigger asChild>\n {/*\n * Styled to be visually identical to SelectTrigger (a field, not a\n * button) so Combobox and Select read as the same kind of control.\n * `aria-haspopup=\"listbox\"` signals it opens a searchable list.\n */}\n <button\n type=\"button\"\n data-slot=\"combobox-trigger\"\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n disabled={disabled}\n className={cn(\n 'flex h-8 w-full touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-background px-3 text-[13px] whitespace-nowrap dark:bg-input/30',\n 'shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)]',\n 'transition-[color,box-shadow] duration-100 ease-out motion-reduce:transition-none',\n 'outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo)]',\n 'cursor-pointer disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n >\n <span\n className={cn(\n 'truncate',\n !selectedLabel && 'text-muted-foreground/60'\n )}\n >\n {selectedLabel ?? placeholder}\n </span>\n {/* Chevron rotates 180° on open — matches SelectTrigger exactly. */}\n <HugeiconsIcon\n icon={ArrowDown01Icon}\n size={16}\n className={cn(\n 'shrink-0 opacity-50 transition-transform duration-150 ease-out motion-reduce:transition-none',\n open && 'rotate-180'\n )}\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n align=\"start\"\n sideOffset={4}\n >\n <Command className=\"rounded-[inherit]\">\n <CommandInput\n placeholder={searchPlaceholder}\n value={search}\n onValueChange={setSearch}\n />\n <CommandList aria-multiselectable={props.multiple || undefined}>\n <CommandEmpty>{emptyText}</CommandEmpty>\n {showSelectAll && (\n <>\n <CommandItem\n // Keeps the row from colliding with a real option value.\n value={SELECT_ALL_VALUE}\n aria-checked={\n selectAllState === 'indeterminate'\n ? 'mixed'\n : selectAllState\n }\n onSelect={handleSelectAll}\n >\n <OptionCheckbox checked={selectAllState} />\n {props.selectAllLabel}\n </CommandItem>\n <CommandSeparator className=\"my-1\" />\n </>\n )}\n {options.map((opt) => {\n const isSelected = selectedValues.includes(opt.value);\n return (\n <CommandItem\n key={opt.value}\n value={opt.value}\n // cmdk filters on `value` only unless keywords are given, so\n // labels like \"Nigeria\" stay unsearchable when the value is a\n // code like \"NG\".\n keywords={[opt.label]}\n // cmdk owns `aria-selected` (it marks the highlighted row),\n // so multi-select exposes the checked state with\n // `aria-checked`, which ARIA allows on options in a\n // multi-selectable listbox.\n aria-checked={props.multiple ? isSelected : undefined}\n onSelect={handleSelect}\n >\n {props.multiple ? (\n <OptionCheckbox checked={isSelected} />\n ) : (\n /*\n * The check icon occupies a fixed slot so all labels stay\n * horizontally aligned regardless of selection state.\n */\n <CheckIcon\n className={cn(\n 'shrink-0',\n isSelected ? 'opacity-100' : 'opacity-0'\n )}\n />\n )}\n {opt.label}\n </CommandItem>\n );\n })}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n};\n\nexport { Combobox };\nexport type {\n ComboboxMultipleProps,\n ComboboxOption,\n ComboboxProps,\n ComboboxSingleProps,\n};\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef, HTMLAttributes, ReactElement } from 'react';\nimport { forwardRef } from 'react';\nimport {\n CheckboxItem,\n Content,\n Group,\n Item,\n ItemIndicator,\n Label,\n Portal,\n RadioGroup,\n RadioItem,\n Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n Trigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '../../../lib/utils';\n\nconst DropdownMenu = Root;\n\nconst DropdownMenuTrigger = Trigger;\n\nconst DropdownMenuGroup = Group;\n\nconst DropdownMenuSub = Sub;\n\nconst DropdownMenuContent = forwardRef<\n ComponentRef<typeof Content>,\n ComponentPropsWithoutRef<typeof Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <Portal>\n <Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-[var(--shadow-elevated)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n </Portal>\n));\nDropdownMenuContent.displayName = Content.displayName;\n\nconst DropdownMenuItem = forwardRef<\n ComponentRef<typeof Item>,\n ComponentPropsWithoutRef<typeof Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = Item.displayName;\n\nconst DropdownMenuCheckboxItem = forwardRef<\n ComponentRef<typeof CheckboxItem>,\n ComponentPropsWithoutRef<typeof CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ItemIndicator>\n <CheckIcon className=\"size-3.5\" />\n </ItemIndicator>\n </span>\n {children}\n </CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = RadioGroup;\n\nconst DropdownMenuRadioItem = forwardRef<\n ComponentRef<typeof RadioItem>,\n ComponentPropsWithoutRef<typeof RadioItem>\n>(({ className, children, ...props }, ref) => (\n <RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </ItemIndicator>\n </span>\n {children}\n </RadioItem>\n));\nDropdownMenuRadioItem.displayName = RadioItem.displayName;\n\nconst DropdownMenuLabel = forwardRef<\n ComponentRef<typeof Label>,\n ComponentPropsWithoutRef<typeof Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <Label\n ref={ref}\n data-slot=\"dropdown-menu-label\"\n className={cn(\n 'px-2 py-1.5 text-sm font-medium',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = Label.displayName;\n\nconst DropdownMenuSeparator = forwardRef<\n ComponentRef<typeof Separator>,\n ComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n <Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>): ReactElement => (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground',\n className\n )}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nconst DropdownMenuSubTrigger = forwardRef<\n ComponentRef<typeof SubTrigger>,\n ComponentPropsWithoutRef<typeof SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = SubTrigger.displayName;\n\nconst DropdownMenuSubContent = forwardRef<\n ComponentRef<typeof SubContent>,\n ComponentPropsWithoutRef<typeof SubContent>\n>(({ className, ...props }, ref) => (\n <SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\n/** The Well's one look plus the rhythm knobs (`gap`, `spacing`). */\nconst wellVariants = cva('rounded-xl flex flex-col bg-muted/50 border border-border', {\n defaultVariants: {\n gap: 'sm',\n spacing: 'default',\n },\n variants: {\n gap: {\n default: 'gap-4',\n lg: 'gap-5',\n none: '',\n // sm is the Well's canonical row rhythm — tokenized so pages can tune\n // it without `> * + *` margin overrides.\n sm: 'gap-[var(--well-row-gap,12px)]',\n },\n spacing: {\n default: 'p-4',\n lg: 'p-5',\n none: 'p-0',\n sm: 'p-3',\n },\n },\n});\n\ntype WellProps = ComponentProps<'div'> & VariantProps<typeof wellVariants>;\n\n/**\n * The muted surface that holds the settings a toggle reveals. Put it inside `WellReveal`\n * or a `FlushCardStack.Item`. It has one look; `gap` and `spacing` only tune its rhythm.\n *\n * @example\n * ```tsx\n * <WellReveal open={emailOn}>\n * <Well>{rows}</Well>\n * </WellReveal>\n * ```\n * @returns The rendered surface.\n * @see WellReveal\n * @see FlushCardStack\n */\nconst Well = ({\n className,\n gap,\n spacing,\n ...props\n}: WellProps): ReactElement => (\n <div\n data-slot=\"well\"\n data-spacing={spacing ?? 'default'}\n className={cn(wellVariants({ gap, spacing }), className)}\n {...props}\n />\n);\n\nconst WellReveal = ({\n children,\n className,\n open,\n}: {\n children: ReactNode;\n className?: string;\n open: boolean;\n}): ReactElement => (\n <div\n data-slot=\"well-reveal\"\n className=\"grid transition-[grid-template-rows] duration-[220ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none\"\n style={{ gridTemplateRows: open ? '1fr' : '0fr' }}\n aria-hidden={!open}\n // inert removes the content from the accessibility tree and tab order when collapsed\n inert={!open}\n >\n <div className=\"overflow-hidden\">\n <div\n className={cn(\n 'px-0.5 pb-0.5 [&>[data-slot=well]:not([data-spacing=none])]:p-[22px]',\n // Only direct Card reveals share its 16px corners and 2px inset.\n // Standalone or separately padded reveals keep the normal Well radius.\n '[[data-slot=card]>[data-slot=well-reveal]>div>&>[data-slot=well]]:rounded-2xl',\n className\n )}\n >\n {children}\n </div>\n </div>\n </div>\n);\n\nexport { Well, WellReveal };\n","'use client';\n\nimport { Children, Fragment, type ReactElement, type ReactNode, isValidElement } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\nimport { Card } from '../card';\nimport { WellReveal } from '../well';\n\n// The vertical gap (px) that opens at a seam when an item detaches. Kept here so\n// consumers never reproduce the spring/gap math the pattern used to require.\nconst DETACH_GAP_PX = 12;\n\n/**\n * One row of a {@link FlushCardStack}. Purely declarative — the parent stack\n * reads these props to compute every item's fuse/detach geometry and renders the\n * card, so an `Item` used outside a `FlushCardStack` renders nothing.\n */\nexport type FlushCardStackItemProps = {\n /** Optional reveal content (e.g. a `Well`). An item with none never detaches. */\n children?: ReactNode;\n /** Extra classes merged onto this item's card. */\n className?: string;\n /** Always-visible row content (e.g. a `ToggleRow`). */\n header: ReactNode;\n /**\n * Drives BOTH the inline reveal and the detach. When `true` and the item has\n * reveal content (`children`), the item floats free of its neighbours with a\n * spring gap; otherwise the toggle state has no effect on the layout.\n */\n open?: boolean;\n};\n\n/**\n * Declarative item marker for {@link FlushCardStack}. Renders nothing on its own;\n * the stack consumes its props.\n */\nconst FlushCardStackItem = (_props: FlushCardStackItemProps): null => null;\n\n/**\n * Props for {@link FlushCardStack}.\n */\nexport type FlushCardStackProps = {\n /** `FlushCardStack.Item` children. */\n children: ReactNode;\n /** Extra classes merged onto the stack wrapper. */\n className?: string;\n};\n\nconst isStackItem = (\n child: ReactNode\n): child is ReactElement<FlushCardStackItemProps> =>\n isValidElement(child) && child.type === FlushCardStackItem;\n\nconst hasReveal = (item: ReactElement<FlushCardStackItemProps>): boolean =>\n Boolean(item.props.children);\n\n// An item detaches (floats) only when it has reveal content AND is open. This is\n// the single rule that drives every seam: toggle state alone is never enough.\nconst detaches = (item: ReactElement<FlushCardStackItemProps>): boolean =>\n hasReveal(item) && Boolean(item.props.open);\n\n/**\n * A vertical stack of settings cards that fuse into one block by default and\n * detach with a spring gap when an item's reveal is opened.\n *\n * Composed from {@link Card} + {@link WellReveal} (+ `motion`); it encapsulates\n * the `-mt-px` / `rounded-[16px]` / gap math so consumers pass only per-item\n * `open` + content:\n *\n * ```tsx\n * <FlushCardStack>\n * <FlushCardStack.Item open={emailOn} header={<ToggleRow … />}>\n * <Well gap='sm'>{/* checkbox rows *\\/}</Well>\n * </FlushCardStack.Item>\n * <FlushCardStack.Item header={<ToggleRow … />} />\n * </FlushCardStack>\n * ```\n *\n * Rule: a seam (12px spring gap + facing edges rounding to `rounded-[16px]`)\n * opens between two cards when EITHER side is an open reveal item — so an open\n * middle item floats free on both sides, while an open first/last item produces a\n * single inner split. Items with no reveal, or closed reveals, always fuse.\n */\nconst FlushCardStack = ({\n children,\n className,\n}: FlushCardStackProps): ReactElement => {\n const prefersReducedMotion = useReducedMotion();\n const items = Children.toArray(children).filter(isStackItem);\n const lastIndex = items.length - 1;\n\n // Reduced motion snaps the gap open/closed instead of springing it.\n const gapTransition = prefersReducedMotion\n ? { duration: 0 }\n : { bounce: 0, duration: 0.4, type: 'spring' as const };\n\n return (\n <div data-slot=\"flush-card-stack\" className={className}>\n {items.map((item, index) => {\n const prev = items[index - 1];\n const next = items[index + 1];\n const isFirst = index === 0;\n const isLast = index === lastIndex;\n\n // A seam opens between two cards when either side is a floating item.\n const splitAbove = !isFirst && (detaches(item) || detaches(prev));\n const splitBelow = !isLast && (detaches(item) || detaches(next));\n\n const roundTop = isFirst || splitAbove;\n const roundBottom = isLast || splitBelow;\n\n // Render a gap below whenever a seam is *possible* here (either neighbour\n // can reveal), so opening animates the gap growing from 0 to 12px.\n const gapPossible = !isLast && (hasReveal(item) || hasReveal(next));\n\n return (\n <Fragment key={item.key ?? index}>\n <Card\n data-detached={detaches(item) || undefined}\n className={cn(\n 'gap-0 py-0 transition-[border-radius] duration-300',\n // Fused top: square the corner and pull up 1px so the shared\n // shadow ring isn't doubled. Post-seam tops stay rounded.\n !roundTop && 'rounded-t-none -mt-px',\n !roundBottom && 'rounded-b-none',\n item.props.className\n )}\n >\n <div className=\"px-5 py-4\">{item.props.header}</div>\n {hasReveal(item) && (\n <WellReveal open={Boolean(item.props.open)}>\n {item.props.children}\n </WellReveal>\n )}\n </Card>\n {gapPossible && (\n <motion.div\n aria-hidden\n data-slot=\"flush-card-gap\"\n data-open={splitBelow || undefined}\n initial={false}\n animate={{ height: splitBelow ? DETACH_GAP_PX : 0 }}\n transition={gapTransition}\n />\n )}\n </Fragment>\n );\n })}\n </div>\n );\n};\n\nFlushCardStack.Item = FlushCardStackItem;\n\nexport { FlushCardStack };\n","'use client';\n\nimport { type ReactElement, type ReactNode, createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\ninterface IconConfig {\n // undefined = icon's built-in default\n setStrokeWidth: (v: number | undefined) => void;\n strokeWidth: number | undefined;\n}\n\nconst IconConfigContext = createContext<IconConfig>({\n setStrokeWidth: () => {},\n strokeWidth: undefined,\n});\n\nexport const IconConfigProvider = ({\n children,\n}: {\n children: ReactNode;\n}): ReactElement => {\n const [strokeWidth, setStrokeWidth] = useState<number | undefined>(() => {\n if (globalThis.window === undefined) return undefined;\n const stored = localStorage.getItem('icon-stroke-width');\n if (stored === 'default') return undefined;\n const n = Number.parseFloat(stored ?? '');\n return Number.isNaN(n) ? undefined : n;\n });\n\n // Sync to CSS variable so all HugeiconsIcon instances respond (not just <Icon> wrapper)\n useEffect(() => {\n document.documentElement.style.setProperty(\n '--icon-stroke-width',\n String(strokeWidth ?? 1.75)\n );\n }, [strokeWidth]);\n\n const applyStrokeWidth = useCallback((v: number | undefined) => {\n setStrokeWidth(v);\n localStorage.setItem(\n 'icon-stroke-width',\n v === undefined ? 'default' : String(v)\n );\n }, []);\n\n // Memoize the context value so consumers don't re-render on every parent render.\n const value = useMemo(\n () => ({ setStrokeWidth: applyStrokeWidth, strokeWidth }),\n [applyStrokeWidth, strokeWidth]\n );\n\n return (\n <IconConfigContext.Provider value={value}>\n {children}\n </IconConfigContext.Provider>\n );\n};\n\nexport const useIconConfig = (): IconConfig => useContext(IconConfigContext);\n","'use client';\n\nimport type { ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport type { HugeiconsIconProps } from '@hugeicons/react';\n\nimport { useIconConfig } from '../../icon-config';\n\n/** Drop-in replacement for HugeiconsIcon — reads global strokeWidth from IconConfigContext */\nexport const Icon = (props: HugeiconsIconProps): ReactElement => {\n const { strokeWidth } = useIconConfig();\n return <HugeiconsIcon strokeWidth={strokeWidth ?? 1.75} {...props} />;\n};\n","'use client';\n\nimport type { ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { PulsingBorder } from '@paper-design/shaders-react';\n\nimport { cn } from '../../../lib/utils';\n\ntype ShaderBorderConfig = {\n bloom?: number;\n colors?: string[];\n inset?: number;\n intensity?: number;\n pulse?: number;\n roundness?: number;\n scale?: number;\n smoke?: number;\n smokeSize?: number;\n softness?: number;\n speed?: number;\n spotSize?: number;\n spots?: number;\n thickness?: number;\n};\n\nconst shaderDefaults: Required<ShaderBorderConfig> = {\n bloom: 0,\n colors: ['#BDDCFF', '#57A7FF', '#DEEAFC'],\n inset: 1,\n intensity: 0,\n pulse: 0.3,\n roundness: 0.6,\n scale: 1,\n smoke: 0.75,\n smokeSize: 0.7,\n softness: 0.6,\n speed: 2.2,\n spots: 8,\n spotSize: 0.75,\n thickness: 0.04,\n};\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype InputProps = ComponentProps<'input'> & {\n shaderBorder?: boolean | ShaderBorderConfig;\n};\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, shaderBorder, style, ...props }, ref) => {\n const prefersReducedMotion = useReducedMotion();\n const inputClassName = cn(\n 'file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 h-8 w-full min-w-0 touch-manipulation rounded-md border-0 bg-background px-3 py-1 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)] dark:aria-invalid:shadow-[0_0_0_1px_var(--destructive)]',\n className,\n );\n\n const isActive = !!shaderBorder;\n const config =\n typeof shaderBorder === 'object'\n ? { ...shaderDefaults, ...shaderBorder }\n : shaderDefaults;\n const inset = config.inset;\n\n if (shaderBorder !== undefined) {\n return (\n <div className='relative'>\n <AnimatePresence initial={false}>\n {isActive && (\n <motion.div\n key='shader-border'\n initial={prefersReducedMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={prefersReducedMotion ? { duration: 0 } : spring}\n className='absolute pointer-events-none z-20'\n style={{\n borderRadius: `${8 + inset}px`,\n inset: `-${inset}px`,\n willChange: 'opacity',\n }}\n >\n <PulsingBorder\n colorBack='#00000000'\n colors={config.colors}\n speed={config.speed}\n scale={config.scale}\n roundness={config.roundness}\n thickness={config.thickness}\n softness={config.softness}\n intensity={config.intensity}\n bloom={config.bloom}\n spots={config.spots}\n spotSize={config.spotSize}\n pulse={config.pulse}\n smoke={config.smoke}\n smokeSize={config.smokeSize}\n webGlContextAttributes={{\n alpha: true,\n premultipliedAlpha: true,\n }}\n className='size-full'\n style={{ borderRadius: `${8 + inset}px` }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={cn(\n inputClassName,\n isActive && 'animate-shimmer motion-reduce:animate-none',\n isActive && 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--ring)]',\n )}\n style={\n isActive\n ? {\n backgroundClip: 'text',\n backgroundImage: `linear-gradient(to right, color-mix(in srgb, ${config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[1] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[2] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[0]} 70%, #000))`,\n backgroundSize: '200% 100%',\n boxShadow: 'none',\n color: 'transparent',\n WebkitBackgroundClip: 'text',\n ...style,\n }\n : style\n }\n {...props}\n />\n </div>\n );\n }\n\n return (\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={inputClassName}\n style={style}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\nexport type { ShaderBorderConfig };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\n/**\n * The text label for a form control.\n *\n * `Label` carries no spacing of its own. To label a form control, wrap the\n * control in `Field` and pass `label`: `Field` sets the gap between the label\n * and the control and wires up `htmlFor`. A bare `Label` placed next to a\n * control ends up at whatever gap its parent happens to use.\n *\n * @example\n * ```tsx\n * <Field label=\"Email\">\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nconst Label = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = Root.displayName;\n\nexport { Label };\n","import { createContext } from 'react';\n\n/**\n * The attributes `Field` hands to the element that receives focus inside it.\n */\ntype FieldControlProps = {\n 'aria-describedby'?: string;\n 'aria-invalid'?: true;\n id: string;\n};\n\n/**\n * Carries a `Field`'s control attributes to a control that renders its focusable\n * element deeper than `Field`'s direct child.\n *\n * `Field` injects `id` and the `aria-*` attributes onto its direct child. That\n * works for `Input` and `Textarea`, but `Select` renders no element of its own,\n * so `SelectTrigger` reads them from here instead.\n */\nconst FieldControlContext = createContext<FieldControlProps | null>(null);\n\nexport { FieldControlContext };\nexport type { FieldControlProps };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, useContext } from 'react';\nimport {\n ArrowDown01Icon,\n ArrowUp01Icon,\n Tick01Icon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Content,\n Group,\n Icon,\n Item,\n ItemIndicator,\n ItemText,\n Label,\n Portal,\n Root,\n ScrollDownButton,\n ScrollUpButton,\n Separator,\n Trigger,\n Value,\n Viewport,\n} from '@radix-ui/react-select';\n\nimport { cn } from '../../../lib/utils';\nimport { FieldControlContext } from '../field/field-control-context';\n\nconst Select = ({ ...props }: ComponentProps<typeof Root>): ReactElement => (\n <Root data-slot=\"select\" {...props} />\n);\n\nconst SelectGroup = ({\n ...props\n}: ComponentProps<typeof Group>): ReactElement => (\n <Group data-slot=\"select-group\" {...props} />\n);\n\nconst SelectValue = ({\n ...props\n}: ComponentProps<typeof Value>): ReactElement => (\n <Value data-slot=\"select-value\" {...props} />\n);\n\nconst SelectTrigger = ({\n className,\n size = 'default',\n children,\n ...props\n}: ComponentProps<typeof Trigger> & {\n size?: 'sm' | 'default';\n}): ReactElement => {\n // Inside a Field, the trigger is the element its label and messages belong to, because Select\n // renders no element of its own. The Field's id wins so its label always points here; set it\n // with the Field's `htmlFor`.\n const fieldControlProps = useContext(FieldControlContext);\n\n return (\n <Trigger\n {...fieldControlProps}\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"data-[placeholder]:text-muted-foreground/60 [&_svg:not([class*='text-'])]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-transparent px-3 py-2 text-[13px] whitespace-nowrap shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)] transition-[color,box-shadow] duration-100 ease-out outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)] aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:text-[13px] data-[size=sm]:px-2.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[state=open]:[&>svg:last-of-type]:rotate-180\",\n className\n )}\n {...props}\n {...(fieldControlProps ? { id: fieldControlProps.id } : {})}\n >\n {children}\n <Icon asChild>\n <HugeiconsIcon\n icon={ArrowDown01Icon}\n size={16}\n className=\"opacity-50 transition-transform duration-150 ease-out motion-reduce:transition-none\"\n />\n </Icon>\n </Trigger>\n );\n};\n\nconst SelectContent = ({\n className,\n children,\n position = 'popper',\n align = 'start',\n ...props\n}: ComponentProps<typeof Content>): ReactElement => (\n <Portal>\n <Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground will-change-[opacity,transform] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border-0 shadow-[var(--shadow-elevated)]',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'\n )}\n >\n {children}\n </Viewport>\n <SelectScrollDownButton />\n </Content>\n </Portal>\n);\n\nconst SelectLabel = ({\n className,\n ...props\n}: ComponentProps<typeof Label>): ReactElement => (\n <Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n);\n\nconst SelectItem = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof Item>): ReactElement => (\n <Item\n data-slot=\"select-item\"\n className={cn(\n \"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:font-medium [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <ItemIndicator>\n <HugeiconsIcon icon={Tick01Icon} size={14} />\n </ItemIndicator>\n </span>\n <ItemText>{children}</ItemText>\n </Item>\n);\n\nconst SelectSeparator = ({\n className,\n ...props\n}: ComponentProps<typeof Separator>): ReactElement => (\n <Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n);\n\nconst SelectScrollUpButton = ({\n className,\n ...props\n}: ComponentProps<typeof ScrollUpButton>): ReactElement => (\n <ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowUp01Icon} size={16} aria-hidden={true} />\n </ScrollUpButton>\n);\n\nconst SelectScrollDownButton = ({\n className,\n ...props\n}: ComponentProps<typeof ScrollDownButton>): ReactElement => (\n <ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowDown01Icon} size={16} aria-hidden={true} />\n </ScrollDownButton>\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","'use client';\n\nimport { type ReactNode, type RefObject, useEffect, useRef } from 'react';\nimport { useReducedMotion } from 'motion/react';\n\n/*\n Strong ease-out (DESIGN.md › Motion): direct feedback lands fast and settles.\n*/\nconst EASE_OUT = 'cubic-bezier(0.215, 0.61, 0.355, 1)';\n\n/*\n On-screen movement eases in and out (DESIGN.md › Motion). Applied per swing, not across the\n whole shake: one ease-out over all of it crammed the swings into the first third and left a\n slow, weak tail.\n*/\nconst EASE_IN_OUT = 'cubic-bezier(0.645, 0.045, 0.355, 1)';\n\n/*\n A soft, decaying nudge: two and a half swings from 4px. Each reversal gets ~60ms; at ~40ms the\n reversals read as jitter rather than \"no\". Transform only, so it stays on the compositor.\n*/\nconst SHAKE_KEYFRAMES: Keyframe[] = [0, -4, 3.5, -2, 1, 0].map((offset) => ({\n easing: EASE_IN_OUT,\n transform: `translateX(${offset}px)`,\n}));\n\n/*\n Linear across the whole run so each swing gets an even slice and its own easing.\n*/\nconst SHAKE_TIMING: KeyframeAnimationOptions = {\n duration: 300,\n easing: 'linear',\n};\n\n/*\n The message slides down from under the control, the direction it reads from.\n*/\nconst MESSAGE_KEYFRAMES: Keyframe[] = [\n { opacity: 0, transform: 'translateY(-4px)' },\n { opacity: 1, transform: 'translateY(0)' },\n];\n\nconst MESSAGE_TIMING: KeyframeAnimationOptions = {\n duration: 150,\n easing: EASE_OUT,\n};\n\n/*\n One short tick on phones that support vibration: felt, not buzzed.\n*/\nconst ERROR_HAPTIC_MS = 12;\n\n/*\n Field's own rows carry `data-slot=\"field-*\"`; everything else in the wrapper is the control.\n*/\nconst CONTROL_SELECTOR = ':scope > :not([data-slot^=\"field-\"])';\nconst ERROR_SELECTOR = ':scope > [data-slot=\"field-error\"]';\nconst MESSAGE_SELECTOR = `${ERROR_SELECTOR}, :scope > [data-slot=\"field-description\"]`;\n\nconst tickHaptics = (): void => {\n if (window.matchMedia?.('(pointer: coarse)').matches) {\n navigator.vibrate?.(ERROR_HAPTIC_MS);\n }\n};\n\nconst shakeControl = (wrapper: HTMLElement): void => {\n wrapper.querySelectorAll(CONTROL_SELECTOR).forEach((control) => {\n control.animate?.(SHAKE_KEYFRAMES, SHAKE_TIMING);\n });\n};\n\ntype UseFieldFeedbackParams = {\n /** The field's current error. Feedback plays when it appears. */\n error: ReactNode;\n};\n\n/**\n * Plays a field's validation feedback and returns the ref for its wrapper.\n *\n * When an error appears, the control shakes, the message under it slides in,\n * and touch devices get a short haptic tick. Each later submit of the\n * surrounding `<form>` that leaves the error in place shakes and ticks again,\n * so every failed attempt is acknowledged. When the error clears, the\n * description slides back in. A change to the error's text alone swaps\n * instantly: it usually comes from re-validating while the user types, and\n * motion on every keystroke reads as noise. Nothing plays on first render, and\n * motion is skipped under `prefers-reduced-motion`.\n *\n * Uses the Web Animations API, so the feedback needs no stylesheet.\n *\n * @see Field\n * @see FieldControlContext\n */\nexport const useFieldFeedback = ({\n error,\n}: UseFieldFeedbackParams): RefObject<HTMLDivElement | null> => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const hasError = Boolean(error);\n // Starts at the mounted value so nothing plays on first render, including StrictMode's re-run.\n const previousHasErrorRef = useRef(hasError);\n const prefersReducedMotion = useReducedMotion();\n // Latest value, read inside the effects so a preference change never replays feedback.\n const prefersReducedMotionRef = useRef(prefersReducedMotion);\n prefersReducedMotionRef.current = prefersReducedMotion;\n\n // The error appears or clears.\n useEffect(() => {\n if (previousHasErrorRef.current === hasError) return;\n previousHasErrorRef.current = hasError;\n\n const wrapper = wrapperRef.current;\n if (!wrapper) return;\n\n if (hasError) tickHaptics();\n\n if (prefersReducedMotionRef.current) return;\n\n wrapper.querySelectorAll(MESSAGE_SELECTOR).forEach((message) => {\n message.animate?.(MESSAGE_KEYFRAMES, MESSAGE_TIMING);\n });\n\n if (hasError) shakeControl(wrapper);\n }, [hasError]);\n\n // A repeated failed submit: the error was already showing and is still showing afterwards, so\n // the effect above sees no change. An error that first appears on a submit is left to it.\n useEffect(() => {\n const form = wrapperRef.current?.closest('form');\n if (!form) return undefined;\n\n const handleSubmit = (): void => {\n const wrapper = wrapperRef.current;\n // This listener sits on the form, so it runs before a React onSubmit handler re-validates.\n if (!wrapper?.querySelector(ERROR_SELECTOR)) return;\n\n // The next frame sees the DOM after that handler's re-render.\n requestAnimationFrame(() => {\n if (!wrapper.querySelector(ERROR_SELECTOR)) return;\n\n tickHaptics();\n if (!prefersReducedMotionRef.current) shakeControl(wrapper);\n });\n };\n\n form.addEventListener('submit', handleSubmit);\n return () => form.removeEventListener('submit', handleSubmit);\n }, []);\n\n return wrapperRef;\n};\n","'use client';\n\nimport { Children, type FC, type ReactNode, cloneElement, isValidElement, useId, useMemo } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Label } from '../label';\nimport { Select } from '../select';\nimport { FieldControlContext } from './field-control-context';\nimport { useFieldFeedback } from './use-field-feedback';\n\ntype FieldProps = {\n /** The form control(s) to render inside the field wrapper. */\n children: ReactNode;\n /**\n * Extra class names merged onto the outer grid wrapper. The label, the\n * control(s), the description and the error stay direct children of that\n * wrapper, so column, flex and direct-child utilities apply to each of them.\n */\n className?: string;\n /**\n * Helper text rendered below the control, hidden while `error` is set.\n *\n * @deprecated Don't add helper text to fields. The label carries the\n * meaning and the error is the only message under a control.\n */\n description?: ReactNode;\n /**\n * Validation error message. When present, renders with `role=\"alert\"` and\n * `text-[var(--text-danger)]`, and injects `aria-invalid` onto a single\n * child element.\n */\n error?: ReactNode;\n /**\n * Override the auto-generated control id. Useful when the consumer already\n * manages a stable id. When omitted, a React-stable id is generated via\n * `useId()` and injected onto the single child element (if applicable). A\n * single child that already has an `id` keeps it, and the label points at it.\n */\n htmlFor?: string;\n /** Visible label rendered above the control and linked via `htmlFor`. */\n label?: ReactNode;\n /**\n * When true, appends a red asterisk to the label to signal that the field\n * is required. Does not inject the `required` attribute on the control — set\n * that on the control itself.\n */\n required?: boolean;\n};\n\n/*\n Field owns its spacing: the gaps are custom properties set on its own wrapper, not theme tokens.\n A consumer that does not load droplet's stylesheet gets no droplet theme tokens, so a token-backed\n gap silently compiled to nothing there and labels sat flush against their controls.\n\n Row gap (6px) separates the control, description and error: supplemental messages read as\n belonging to the control. Label gap (10px) separates the label from the control; the label is\n 14px with `leading-none`, so its box hugs the glyphs and this gap is the only separation there is.\n*/\nconst FIELD_GAP_CLASS_NAME =\n 'grid [--field-gap:6px] [--label-gap:10px] gap-[var(--field-gap)]';\n\n/*\n The wider label gap is a margin under the label rather than a gap on a label/control wrapper:\n every row stays a direct child of the field wrapper, so the layout utilities a caller passes\n through `className` still reach each of them.\n*/\nconst LABEL_GAP_CLASS_NAME = 'mb-[calc(var(--label-gap)-var(--field-gap))]';\n\n/**\n * A generic labeled form-field wrapper.\n *\n * Wires a `<Label>`, an arbitrary form control, an optional description, and\n * an error message together with the correct `id`/`htmlFor`/`aria-describedby`\n * associations so callers don't have to hand-assemble these.\n *\n * Always wrap a form control in `Field` rather than pairing a bare `<Label>`\n * with it: `Field` owns the label-to-control gap (10px) and the gap to the\n * error (6px). Don't add helper text: the error is the only message under a\n * control.\n *\n * When there is exactly one child element, `Field` uses `cloneElement` to\n * inject:\n * - `id` — links the label's `htmlFor` to the control\n * - `aria-labelledby` — names group controls such as `RadioGroup`, which a\n * `<label for>` cannot name\n * - `aria-describedby` — references the description and/or error paragraph ids\n * - `aria-invalid` — `true` when `error` is present\n *\n * When an error appears, the control shakes, the message slides in, and\n * touch devices get a short haptic tick. Motion is skipped under\n * `prefers-reduced-motion` and never plays on first render.\n *\n * `Select` renders no element of its own, so `SelectTrigger` picks up `id`,\n * `aria-describedby` and `aria-invalid` from `Field` instead.\n *\n * @example\n * ```tsx\n * <Field label=\"Email\" required>\n * <Input type=\"email\" required />\n * </Field>\n *\n * <Field label=\"Email\" error=\"Enter a valid email address.\">\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nconst Field: FC<FieldProps> = ({\n label,\n description,\n error,\n required,\n htmlFor,\n children,\n className,\n}) => {\n // Inject accessibility props onto the single child element when possible.\n // We only attempt cloneElement when there is exactly one React element child\n // to avoid ambiguous multi-control scenarios.\n const childArray = Children.toArray(children);\n const singleChild =\n childArray.length === 1 && isValidElement(childArray[0])\n ? childArray[0]\n : null;\n\n // A control that already has an id keeps it, so the label must point at that id, not ours.\n const childId = (singleChild?.props as Record<string, unknown> | undefined)?.id;\n const generatedId = useId();\n const wrapperRef = useFieldFeedback({ error });\n const controlId =\n (typeof childId === 'string' ? childId : undefined) ?? htmlFor ?? generatedId;\n\n const descriptionId = `${controlId}-description`;\n const errorId = `${controlId}-error`;\n const labelId = label ? `${controlId}-label` : undefined;\n\n // The error replaces the description, so at most one message describes the control.\n const showDescription = Boolean(description) && !error;\n let ariaDescribedBy: string | undefined;\n if (error) {\n ariaDescribedBy = errorId;\n } else if (showDescription) {\n ariaDescribedBy = descriptionId;\n }\n\n // For controls whose focusable element sits below Field's direct child (SelectTrigger).\n // Memoized because it is a context value: a new object each render re-renders every consumer.\n const hasError = Boolean(error);\n const controlProps = useMemo(\n () => ({\n 'aria-describedby': ariaDescribedBy,\n id: controlId,\n ...(hasError ? { 'aria-invalid': true as const } : {}),\n }),\n [ariaDescribedBy, controlId, hasError],\n );\n\n const enrichedChild = singleChild\n ? cloneElement(singleChild as React.ReactElement<Record<string, unknown>>, {\n 'aria-describedby':\n (singleChild.props as Record<string, unknown>)['aria-describedby'] ??\n ariaDescribedBy,\n // `<label for>` only names native form controls; a group such as RadioGroup needs\n // `aria-labelledby` to get an accessible name.\n 'aria-labelledby':\n (singleChild.props as Record<string, unknown>)['aria-labelledby'] ??\n labelId,\n id: controlId,\n // Only set aria-invalid when there is an error; avoids overwriting an\n // explicit aria-invalid={false} the consumer may have set deliberately.\n ...(error ? { 'aria-invalid': true } : {}),\n })\n : null;\n\n return (\n <div ref={wrapperRef} className={cn(FIELD_GAP_CLASS_NAME, className)}>\n {label && (\n <Label\n id={labelId}\n htmlFor={controlId}\n data-slot=\"field-label\"\n className={LABEL_GAP_CLASS_NAME}\n >\n {label}\n {required && (\n // The asterisk is presentational; the label text already\n // communicates the field is required via `required` on the control.\n <span aria-hidden className=\"ml-0.5 text-[var(--text-danger)]\">\n *\n </span>\n )}\n </Label>\n )}\n\n {/* Render the enriched single child or the original children as-is. */}\n {/* Only a direct Select child gets the context: a SelectTrigger nested in another control */}\n {/* (a phone input's country picker) would take the id already cloned onto that control. */}\n <FieldControlContext.Provider\n value={singleChild?.type === Select ? controlProps : null}\n >\n {enrichedChild ?? children}\n </FieldControlContext.Provider>\n\n {showDescription && (\n <p\n id={descriptionId}\n data-slot=\"field-description\"\n className=\"text-sm text-muted-foreground\">\n {description}\n </p>\n )}\n\n {error && (\n <p\n id={errorId}\n data-slot=\"field-error\"\n role=\"alert\"\n className=\"text-sm text-[var(--text-danger)]\"\n >\n {error}\n </p>\n )}\n </div>\n );\n};\n\nField.displayName = 'Field';\n\nexport { Field };\nexport type { FieldProps };\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst Kbd = ({ className, ...props }: ComponentProps<'kbd'>): ReactElement => {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none',\n \"[&_svg:not([class*='size-'])]:size-3\",\n '[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10',\n className\n )}\n {...props}\n />\n );\n};\n\nconst KbdGroup = ({\n className,\n ...props\n}: ComponentProps<'kbd'>): ReactElement => {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn('inline-flex items-center gap-1', className)}\n {...props}\n />\n );\n};\n\nexport { Kbd, KbdGroup };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst progressVariants = cva(\n 'h-full w-full flex-1 transition-transform duration-500 ease-out motion-reduce:transition-none',\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n brand: 'bg-[var(--brand-default)]',\n danger: 'bg-[var(--danger-default)]',\n default: 'bg-primary',\n process: 'bg-[var(--process-default)]',\n success: 'bg-[var(--success-default)]',\n warning: 'bg-[var(--warning-default)]',\n },\n },\n }\n);\n\nexport type ProgressProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof progressVariants> & {\n indeterminate?: boolean;\n value?: number;\n };\n\nconst Progress = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className,\n indeterminate = false,\n value,\n variant,\n ...props\n}: ProgressProps & {\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}): ReactElement => {\n // Clamp to [0, 100] so out-of-range values never overflow the track.\n const clamped = Math.min(100, Math.max(0, value ?? 0));\n return (\n <div\n data-slot=\"progress\"\n className={cn(\n 'bg-primary/20 relative h-2 w-full overflow-hidden rounded-full',\n className\n )}\n {...props}\n >\n {/* Native semantic element drives screen-reader announcements; the styled\n bars below are visual only. */}\n <progress\n aria-label={ariaLabel ?? 'Progress'}\n aria-labelledby={ariaLabelledBy}\n className=\"sr-only\"\n max={100}\n value={indeterminate ? undefined : clamped}\n />\n <div\n data-slot=\"progress-indicator\"\n className={cn(\n progressVariants({ variant }),\n indeterminate &&\n 'animate-progress-indeterminate motion-reduce:animate-none'\n )}\n style={\n indeterminate\n ? undefined\n : { transform: `translateX(-${100 - clamped}%)` }\n }\n />\n </div>\n );\n};\n\nexport { Progress };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useId } from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\n\nimport { cn } from '../../../lib/utils';\nimport { Label } from '../label';\n\nconst RadioGroup = ({\n className,\n ...props\n}: ComponentProps<typeof RadioGroupPrimitive.Root>): ReactElement => {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n};\n\nconst RadioGroupItem = ({\n className,\n ...props\n}: ComponentProps<typeof RadioGroupPrimitive.Item>): ReactElement => {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"text-[var(--action)] dark:bg-input/30 relative aspect-square size-4 shrink-0 touch-manipulation rounded-full border border-[rgba(31,41,55,0.30)] dark:border-[rgba(255,255,255,0.20)] hover:data-[state=unchecked]:border-[rgba(31,41,55,0.45)] dark:hover:data-[state=unchecked]:border-[rgba(255,255,255,0.35)] data-[state=checked]:border-[var(--action)] shadow-[var(--shadow-radio)] dark:shadow-[var(--shadow-radio)] transition-[color,box-shadow,border-color] duration-100 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-[var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer after:absolute after:-inset-[14px] after:content-['']\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"group/indicator relative flex items-center justify-center\"\n forceMount\n >\n <span className=\"bg-[var(--action)] absolute top-1/2 left-1/2 size-2 rounded-full -translate-x-1/2 -translate-y-1/2 transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none group-data-[state=unchecked]/indicator:scale-0 group-data-[state=unchecked]/indicator:opacity-0\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n};\n\n/**\n * Alias for `RadioGroupItem` for use in labeled-row patterns.\n *\n * A radio is inherently part of a group — it must always live inside a\n * `RadioGroup`. For a standalone on/off toggle, prefer `Checkbox` or `Switch`.\n * `Radio` is the labeled-usage alias that signals \"I'm pairing this with a\n * `<Label>`\" rather than constructing raw item markup.\n */\nconst Radio = RadioGroupItem;\n\ntype RadioFieldProps = {\n /** Extra class names merged onto the outer wrapper element. */\n className?: string;\n /** Optional secondary line rendered below the label. */\n description?: ReactNode;\n /** Whether this field is non-interactive. */\n disabled?: boolean;\n /**\n * Override the generated element `id`. Useful when the parent already\n * manages a stable id. When omitted, a React-stable id is generated.\n */\n id?: string;\n /** Visible label text or element rendered next to the radio button. */\n label: ReactNode;\n /** The value this radio represents within its parent `RadioGroup`. */\n value: string;\n};\n\n/**\n * A convenience labeled-radio row for use inside a `RadioGroup`.\n *\n * Renders a `RadioGroupItem` paired with an associated `<Label>` (and an\n * optional description line) so callers don't have to wire up `id`/`htmlFor`\n * by hand. The `id` is stable across renders via `React.useId` unless\n * overridden.\n *\n * @example\n * ```tsx\n * <RadioGroup value={val} onValueChange={setVal}>\n * <RadioField value=\"a\" label=\"Option A\" description=\"First choice\" />\n * <RadioField value=\"b\" label=\"Option B\" />\n * </RadioGroup>\n * ```\n */\nconst RadioField = ({\n value,\n label,\n description,\n disabled,\n id: idProp,\n className,\n}: RadioFieldProps): ReactElement => {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n\n return (\n <div\n className={cn(\n 'flex items-start gap-3',\n disabled && 'opacity-50',\n className\n )}\n >\n <RadioGroupItem\n value={value}\n id={id}\n disabled={disabled}\n className=\"mt-0.5\"\n />\n <div className=\"grid gap-0.5\">\n <Label\n htmlFor={id}\n className={cn(\n 'cursor-pointer transition-colors duration-100 ease-out motion-reduce:transition-none',\n disabled && 'cursor-not-allowed'\n )}\n >\n {label}\n </Label>\n {description && (\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n </div>\n );\n};\n\nexport { RadioGroup, RadioGroupItem, Radio, RadioField };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport {\n ArrowLeft01Icon,\n ArrowRight01Icon,\n MoreHorizontalIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\nimport { Button, buttonVariants } from '../button/button';\n\n/** The 4px pagination gap permits 2px per link; retain the full vertical hit area. */\nconst PAGINATION_HIT_AREA = 'before:-inset-x-0.5';\n\n/**\n * Root nav wrapper for a pagination control set.\n * Renders a semantic `<nav>` with the ARIA `navigation` landmark.\n */\nconst Pagination = ({\n className,\n ...props\n}: ComponentProps<'nav'>): ReactElement => (\n <nav\n data-slot=\"pagination\"\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n);\n\n/**\n * Flex row that holds `PaginationItem` children.\n * Renders as a `<ul>` for correct list semantics inside the nav landmark.\n */\nconst PaginationContent = ({\n className,\n ...props\n}: ComponentProps<'ul'>): ReactElement => (\n <ul\n data-slot=\"pagination-content\"\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n);\n\n/**\n * A single `<li>` slot inside `PaginationContent`.\n * Acts as a structural wrapper — pair with `PaginationLink`, `PaginationPrevious`, or `PaginationNext`.\n */\nconst PaginationItem = ({\n className,\n ...props\n}: ComponentProps<'li'>): ReactElement => (\n <li data-slot=\"pagination-item\" className={cn('', className)} {...props} />\n);\n\ntype PaginationLinkProps = ComponentProps<'a'> & {\n /** When true, renders the link with the `outline` variant and sets `aria-current=\"page\"`. */\n isActive?: boolean;\n};\n\n/**\n * An individual page link.\n * Applies `buttonVariants` — `outline` when active, `ghost` when inactive — so focus rings,\n * `ease-out` transitions, and `motion-reduce` suppression are all inherited from Button's CVA base.\n */\nconst PaginationLink = ({\n className,\n isActive = false,\n children,\n ...props\n}: PaginationLinkProps): ReactElement => (\n <a\n data-slot=\"pagination-link\"\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n buttonVariants({\n size: 'icon-sm',\n variant: isActive ? 'outline' : 'ghost',\n }),\n PAGINATION_HIT_AREA,\n className\n )}\n {...props}\n >\n {children}\n </a>\n);\n\n/**\n * Previous-page control.\n * Disabled when the consumer passes `aria-disabled=\"true\"` or the native `disabled` attribute.\n * Keeps a 44px-tall target while fitting the horizontal expansion between adjacent links.\n */\nconst PaginationPrevious = ({\n className,\n children,\n ...props\n}: ComponentProps<'a'>): ReactElement => (\n <a\n data-slot=\"pagination-previous\"\n aria-label=\"Go to previous page\"\n className={cn(\n // Use `icon-sm` for the icon hit area; pair with an explicit label alongside for context\n buttonVariants({ size: 'icon-sm', variant: 'ghost' }),\n PAGINATION_HIT_AREA,\n 'gap-1 pl-2.5',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowLeft01Icon} size={14} aria-hidden=\"true\" />\n <span className=\"sr-only\">{children ?? 'Previous'}</span>\n </a>\n);\n\n/**\n * Next-page control.\n * Keeps a 44px-tall target while fitting the horizontal expansion between adjacent links.\n */\nconst PaginationNext = ({\n className,\n children,\n ...props\n}: ComponentProps<'a'>): ReactElement => (\n <a\n data-slot=\"pagination-next\"\n aria-label=\"Go to next page\"\n className={cn(\n buttonVariants({ size: 'icon-sm', variant: 'ghost' }),\n PAGINATION_HIT_AREA,\n 'gap-1 pr-2.5',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={ArrowRight01Icon} size={14} aria-hidden=\"true\" />\n <span className=\"sr-only\">{children ?? 'Next'}</span>\n </a>\n);\n\n/**\n * Ellipsis placeholder shown between non-contiguous page ranges.\n * Hidden from assistive technologies via `aria-hidden` — screen readers hear the surrounding page\n * numbers and can infer that pages are omitted.\n */\nconst PaginationEllipsis = ({\n className,\n ...props\n}: ComponentProps<'span'>): ReactElement => (\n <span\n data-slot=\"pagination-ellipsis\"\n aria-hidden=\"true\"\n className={cn(\n 'flex size-7 items-center justify-center text-muted-foreground',\n className\n )}\n {...props}\n >\n <HugeiconsIcon icon={MoreHorizontalIcon} size={14} />\n <span className=\"sr-only\">More pages</span>\n </span>\n);\n\n// ---------------------------------------------------------------------------\n// CursorPagination — convenience wrapper for cursor-based / infinite lists\n// ---------------------------------------------------------------------------\n\ntype CursorPaginationProps = {\n className?: string;\n /** Whether a next page exists; disables the next button when false. */\n hasNext: boolean;\n /** Whether a previous page exists; disables the previous button when false. */\n hasPrevious: boolean;\n /**\n * Optional content rendered before the navigation buttons.\n * Commonly used for a \"Page N of M\" or record-range label.\n */\n label?: ReactNode;\n /** Fired when the user requests the next page. */\n onNext: () => void;\n /** Fired when the user requests the previous page. */\n onPrevious: () => void;\n};\n\n/**\n * Pre-assembled cursor-based pagination bar.\n *\n * Renders an optional label, such as a record range, followed by previous and next arrow buttons, aligned to the end.\n * Each button is disabled automatically when there is no page in that direction.\n * Designed for dashboard tables and lists that use cursor/keyset pagination rather\n * than numbered pages — which is the dominant pattern in the Redcoast design system.\n *\n * @example\n * ```tsx\n * <CursorPagination\n * hasPrevious={!!cursor.before}\n * hasNext={!!cursor.after}\n * onPrevious={loadPrevious}\n * onNext={loadNext}\n * label={`${startIndex}–${endIndex} of ${total}`}\n * />\n * ```\n */\nconst CursorPagination = ({\n hasPrevious,\n hasNext,\n onPrevious,\n onNext,\n label,\n className,\n}: CursorPaginationProps): ReactElement => (\n <nav\n aria-label=\"Pagination\"\n data-slot=\"cursor-pagination\"\n className={cn('flex items-center justify-end gap-3', className)}\n >\n {label !== undefined && (\n // Tabular digits keep a range label from jiggling as the page changes.\n <span className=\"text-[13px] text-muted-foreground tabular-nums\">\n {label}\n </span>\n )}\n\n {/* 32px to match toolbar buttons; each 4px hit-area bleed meets the next in the 8px gap without overlapping. */}\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n className=\"size-8 before:-inset-1\"\n disabled={!hasPrevious}\n onClick={onPrevious}\n aria-label=\"Go to previous page\"\n >\n <HugeiconsIcon icon={ArrowLeft01Icon} size={16} aria-hidden=\"true\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n className=\"size-8 before:-inset-1\"\n disabled={!hasNext}\n onClick={onNext}\n aria-label=\"Go to next page\"\n >\n <HugeiconsIcon icon={ArrowRight01Icon} size={16} aria-hidden=\"true\" />\n </Button>\n </div>\n </nav>\n);\n\nexport {\n CursorPagination,\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\nexport type { CursorPaginationProps, PaginationLinkProps };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\n\nimport { cn } from '../../../lib/utils';\n\nconst ScrollArea = ({\n className,\n children,\n ...props\n}: ComponentProps<typeof ScrollAreaPrimitive.Root>): ReactElement => {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] motion-reduce:transition-none outline-none focus-visible:ring-[3px]\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n};\n\nconst ScrollBar = ({\n className,\n orientation = 'vertical',\n ...props\n}: ComponentProps<\n typeof ScrollAreaPrimitive.ScrollAreaScrollbar\n>): ReactElement => {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none touch-manipulation p-px transition-[background-color] motion-reduce:transition-none select-none',\n orientation === 'vertical' &&\n 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' &&\n 'h-2.5 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"bg-border relative flex-1 rounded-full\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n};\n\nexport { ScrollArea, ScrollBar };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Search01Icon } from '@hugeicons/core-free-icons';\n\nimport { Kbd } from '../kbd';\nimport { cn } from '../../../lib/utils';\n\nconst SearchInput = ({\n className,\n placeholder = 'Search...',\n shortcut = '⌘K',\n onClick,\n ...props\n}: ComponentProps<'button'> & {\n placeholder?: string;\n shortcut?: string;\n}): ReactElement => {\n return (\n <button\n type=\"button\"\n data-slot=\"search-input\"\n className={cn(\n // Matches Input exactly: borderless, shadow-based field + halo focus.\n 'h-8 w-full touch-manipulation rounded-md border-0 bg-background dark:bg-input/30 shadow-[var(--shadow-input)]',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'transition-[color,box-shadow] duration-100 ease-out motion-reduce:transition-none',\n 'outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]',\n 'flex items-center gap-2 px-2',\n 'text-sm text-muted-foreground/60 cursor-pointer',\n className\n )}\n onClick={onClick}\n {...props}\n >\n <HugeiconsIcon\n icon={Search01Icon}\n size={16}\n className=\"shrink-0 text-muted-foreground/70\"\n />\n <span className=\"flex-1 text-left\">{placeholder}</span>\n {shortcut && <Kbd>{shortcut}</Kbd>}\n </button>\n );\n};\n\nexport { SearchInput };\n","'use client';\n\nimport { type ButtonHTMLAttributes, type ReactElement, type ReactNode } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { CheckIcon } from '../check-icon';\nimport { cn } from '../../../lib/utils';\n\ntype IconComponent = Parameters<typeof HugeiconsIcon>[0]['icon'];\n\ninterface SelectableCardProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {\n badge?: ReactNode;\n description: string;\n icon?: IconComponent;\n iconSize?: number;\n label: string;\n selected: boolean;\n}\n\nconst SelectableCard = ({\n badge,\n className,\n description,\n icon,\n iconSize = 20,\n label,\n selected,\n ...props\n}: SelectableCardProps): ReactElement => (\n <button\n data-slot=\"selectable-card\"\n data-selected={selected}\n className={cn(\n 'group/card relative flex flex-col items-start gap-2.5 p-4 rounded-xl text-left transition-[box-shadow,background-color,scale] duration-150 motion-reduce:transition-none touch-manipulation active:scale-[0.96] cursor-pointer w-full outline-none focus-visible:shadow-[0_0_0_1.5px_var(--action),0_0_0_4px_oklch(from_var(--action)_l_c_h_/_0.25)]',\n selected\n ? 'bg-[var(--action)]/5 shadow-[0_0_0_1.5px_var(--action)]'\n : 'shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.12)] hover:shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.20)]',\n className\n )}\n {...props}\n >\n {icon && (\n <HugeiconsIcon\n icon={icon}\n size={iconSize}\n className=\"text-[var(--action)]\"\n />\n )}\n <div className=\"w-full pr-7\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium text-balance\">{label}</p>\n {badge && <span className=\"shrink-0\">{badge}</span>}\n </div>\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n </div>\n <div className=\"absolute top-4 right-4\">\n <div\n className={cn(\n 'relative size-4 shrink-0 rounded-[4px] transition-[color,box-shadow,background-color] duration-200 ease-out motion-reduce:transition-none',\n selected\n ? 'bg-[var(--action)] text-white shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_oklch(1_0_0_/_0.07)_inset,0px_2px_3px_0px_oklch(0.278_0.03_256.85_/_0.20),0px_1px_1px_0px_oklch(0_0_0_/_0.24)]'\n : 'shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.20),0_1px_2px_0_oklch(0_0_0_/_0.06),0_0_1px_0_oklch(0_0_0_/_0.02)] group-hover/card:shadow-[0_0_0_1px_oklch(0.278_0.03_256.85_/_0.30),0_1px_2px_0_oklch(0_0_0_/_0.06),0_0_1px_0_oklch(0_0_0_/_0.02)]'\n )}\n >\n <CheckIcon\n size={14}\n className={cn(\n 'absolute inset-0 m-auto text-current transition-[opacity,transform,filter] duration-200 motion-reduce:transition-none',\n selected\n ? 'opacity-100 scale-100 blur-none'\n : 'opacity-0 scale-[0.25] blur-[4px]'\n )}\n />\n </div>\n </div>\n </button>\n);\n\nexport { SelectableCard };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-separator';\n\nimport { cn } from '../../../lib/utils';\n\nconst Separator = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root>\n>(\n (\n { className, orientation = 'horizontal', decorative = true, ...props },\n ref,\n ) => (\n <Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n ),\n);\nSeparator.displayName = Root.displayName;\n\nexport { Separator };\n","'use client';\n\nimport type { ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype SliderProps = {\n /** Additional class names forwarded to the wrapper element. */\n className?: string;\n /** When true, the slider is non-interactive and visually dimmed. */\n disabled?: boolean;\n /** Maximum value (inclusive). Defaults to 100. */\n max?: number;\n /** Minimum value (inclusive). Defaults to 0. */\n min?: number;\n /** Callback fired when the user moves the slider. */\n onValueChange: (value: number) => void;\n /** Granularity of each step. Defaults to 1. */\n step?: number;\n /** Current value of the slider. */\n value: number;\n};\n\n/**\n * Controlled range slider built on a native `<input type=\"range\">`.\n *\n * Zero-dependency — all styling is done with Tailwind arbitrary variants so\n * no Radix/Headless UI install is needed. The filled portion is rendered via an\n * inline CSS custom property so the gradient stays in sync with the value without\n * any JS animation loop.\n */\nconst Slider = ({\n value,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n className,\n}: SliderProps): ReactElement => {\n // Clamp so the gradient never overflows or goes negative.\n const clamped = Math.min(max, Math.max(min, value));\n\n // Express the filled portion as a percentage for the CSS gradient.\n const range = max - min;\n const fillPercent = range === 0 ? 0 : ((clamped - min) / range) * 100;\n\n return (\n <div\n data-slot=\"slider\"\n className={cn(\n 'relative flex w-full touch-manipulation items-center',\n className\n )}\n >\n <input\n type=\"range\"\n data-slot=\"slider-input\"\n min={min}\n max={max}\n step={step}\n value={clamped}\n disabled={disabled}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={clamped}\n onChange={(e) => onValueChange(Number(e.target.value))}\n className={cn(\n // Reset browser defaults so we can style from scratch.\n 'w-full appearance-none bg-transparent outline-none',\n // Cursor\n 'cursor-pointer disabled:cursor-not-allowed disabled:opacity-50',\n // --- WebKit track ---\n // The track is split into \"filled\" (left of thumb) and \"unfilled\" using a\n // linear-gradient that is driven by the --slider-fill CSS custom property\n // set via the inline style below.\n '[&::-webkit-slider-runnable-track]:h-1.5',\n '[&::-webkit-slider-runnable-track]:w-full',\n '[&::-webkit-slider-runnable-track]:rounded-full',\n '[&::-webkit-slider-runnable-track]:bg-[linear-gradient(to_right,var(--action)_var(--slider-fill,0%),var(--bg-accented)_var(--slider-fill,0%))]',\n '[&::-webkit-slider-runnable-track]:transition-[background-size] [&::-webkit-slider-runnable-track]:duration-150 [&::-webkit-slider-runnable-track]:ease-out',\n '[&::-webkit-slider-runnable-track]:motion-reduce:transition-none',\n // --- WebKit thumb ---\n '[&::-webkit-slider-thumb]:appearance-none',\n '[&::-webkit-slider-thumb]:size-4',\n '[&::-webkit-slider-thumb]:rounded-full',\n '[&::-webkit-slider-thumb]:bg-background',\n '[&::-webkit-slider-thumb]:border',\n '[&::-webkit-slider-thumb]:border-[var(--action)]',\n '[&::-webkit-slider-thumb]:shadow-[var(--shadow-control-thumb)]',\n // Vertically center the thumb on the track (track is 6px tall, thumb is 16px).\n '[&::-webkit-slider-thumb]:-mt-[5px]',\n // Smooth thumb travel\n '[&::-webkit-slider-thumb]:transition-[box-shadow] [&::-webkit-slider-thumb]:duration-150 [&::-webkit-slider-thumb]:ease-out',\n '[&::-webkit-slider-thumb]:motion-reduce:transition-none',\n // Focus-visible ring on the thumb (keyboard users)\n 'focus-visible:[&::-webkit-slider-thumb]:shadow-[0_0_0_3px_var(--ring-halo),var(--shadow-control-thumb)]',\n // --- Firefox track ---\n '[&::-moz-range-track]:h-1.5',\n '[&::-moz-range-track]:w-full',\n '[&::-moz-range-track]:rounded-full',\n '[&::-moz-range-track]:bg-[var(--bg-accented)]',\n // --- Firefox filled portion (uses the native progress pseudo-element) ---\n '[&::-moz-range-progress]:h-1.5',\n '[&::-moz-range-progress]:rounded-full',\n '[&::-moz-range-progress]:bg-[var(--action)]',\n // --- Firefox thumb ---\n '[&::-moz-range-thumb]:size-4',\n '[&::-moz-range-thumb]:rounded-full',\n '[&::-moz-range-thumb]:border',\n '[&::-moz-range-thumb]:border-[var(--action)]',\n '[&::-moz-range-thumb]:bg-background',\n '[&::-moz-range-thumb]:shadow-[var(--shadow-control-thumb)]',\n '[&::-moz-range-thumb]:transition-[box-shadow] [&::-moz-range-thumb]:duration-150 [&::-moz-range-thumb]:ease-out',\n '[&::-moz-range-thumb]:motion-reduce:transition-none',\n 'focus-visible:[&::-moz-range-thumb]:shadow-[0_0_0_3px_var(--ring-halo),var(--shadow-control-thumb)]'\n )}\n // The CSS custom property drives the WebKit gradient split point.\n // This avoids any JS animation loop — the browser re-paints directly.\n style={{ '--slider-fill': `${fillPercent}%` } as React.CSSProperties}\n />\n </div>\n );\n};\n\nexport { Slider };\nexport type { SliderProps };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Cancel01Icon } from '@hugeicons/core-free-icons';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\n\nimport { cn } from '../../../lib/utils';\n\nconst Sheet = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Root>): ReactElement => (\n <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n);\n\nconst SheetTrigger = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Trigger>): ReactElement => (\n <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n);\n\nconst SheetClose = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Close>): ReactElement => (\n <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n);\n\nconst SheetPortal = ({\n ...props\n}: ComponentProps<typeof SheetPrimitive.Portal>): ReactElement => (\n <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n);\n\nconst SheetOverlay = ({\n className,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Overlay>): ReactElement => {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] will-change-[opacity] data-[state=closed]:duration-100 data-[state=open]:duration-150 [animation-timing-function:cubic-bezier(0.16,1,0.3,1)] motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n );\n};\n\nconst SheetContent = ({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n overlayClassName,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Content> & {\n overlayClassName?: string;\n showCloseButton?: boolean;\n side?: 'top' | 'right' | 'bottom' | 'left';\n}): ReactElement => {\n return (\n <SheetPortal>\n <SheetOverlay className={overlayClassName} />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 border-0 shadow-[var(--shadow-elevated)] [animation-timing-function:cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:duration-150 data-[state=open]:duration-200 will-change-[opacity,transform] motion-reduce:animate-none',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 sm:max-w-sm rounded-l-xl rounded-r-md',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 sm:max-w-sm rounded-r-xl rounded-l-md',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto rounded-b-md',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto rounded-t-md',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close className=\"absolute top-3 right-3 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground opacity-70 transition-[opacity,background-color] duration-150 ease-out motion-reduce:transition-none hover:opacity-100 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus:outline-hidden disabled:pointer-events-none cursor-pointer touch-manipulation before:absolute before:-inset-2 before:content-['']\">\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n};\n\nconst SheetHeader = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\n 'flex flex-col gap-0.5 px-4 py-3.5 border-b border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst SheetFooter = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n 'mt-auto flex flex-col gap-2 px-4 py-3.5 border-t border-[var(--border-divider)] bg-muted',\n className\n )}\n {...props}\n />\n );\n};\n\nconst SheetTitle = ({\n className,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Title>): ReactElement => {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n};\n\nconst SheetDescription = ({\n className,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Description>): ReactElement => {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n};\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst Skeleton = ({\n className,\n ...props\n}: ComponentProps<'output'>): ReactElement => {\n return (\n <output\n aria-label=\"Loading\"\n data-slot=\"skeleton\"\n className={cn(\n 'block bg-accent animate-shimmer motion-reduce:animate-none rounded-md bg-[length:200%_100%] bg-gradient-to-r from-accent via-accent/50 to-accent dark:via-accent/70',\n className\n )}\n {...props}\n />\n );\n};\n\nexport { Skeleton };\n","'use client';\n\nimport { type CSSProperties, type ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Alert01Icon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport { useTheme } from 'next-themes';\nimport { Toaster as Sonner, type ToasterProps } from 'sonner';\n\nconst Toaster = ({ ...props }: ToasterProps): ReactElement => {\n const { theme = 'system' } = useTheme();\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className=\"toaster group\"\n icons={{\n error: <HugeiconsIcon icon={Cancel01Icon} size={16} />,\n info: <HugeiconsIcon icon={InformationCircleIcon} size={16} />,\n loading: (\n <svg className=\"size-4 animate-spin\" viewBox=\"0 0 24 24\" fill=\"none\">\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n ),\n success: <HugeiconsIcon icon={CheckmarkCircle02Icon} size={16} />,\n warning: <HugeiconsIcon icon={Alert01Icon} size={16} />,\n }}\n style={\n {\n '--border-radius': 'var(--radius)',\n '--normal-bg': 'var(--popover)',\n '--normal-border': 'var(--border)',\n '--normal-text': 'var(--popover-foreground)',\n } as CSSProperties\n }\n {...props}\n />\n );\n};\n\nexport { Toaster };\n","'use client';\n\nimport { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { CheckIcon } from '../check-icon/check-icon';\n\ntype StepperStep = {\n /** Optional supporting text rendered below the label. */\n description?: string;\n /** The visible label shown beneath the step indicator. */\n label: string;\n};\n\ntype StepperProps = {\n /** Additional class names forwarded to the root `<ol>`. */\n className?: string;\n /**\n * Zero-based index of the currently active step.\n * Steps with a lower index are treated as COMPLETED; higher as UPCOMING.\n */\n currentStep: number;\n /** Ordered list of steps to render. */\n steps: StepperStep[];\n} & Omit<ComponentProps<'ol'>, 'children'>;\n\n/**\n * Horizontal step indicator that renders an ordered sequence of steps with\n * connector lines between them.\n *\n * - **COMPLETED** (index < currentStep): filled action-coloured circle + white checkmark.\n * - **CURRENT** (index === currentStep): action-coloured border + step number; label is font-medium.\n * - **UPCOMING** (index > currentStep): muted border + step number.\n *\n * Connector lines between adjacent steps are action-coloured when the segment\n * is completed (both endpoints are ≤ currentStep) and divider-coloured otherwise.\n *\n * @example\n * <Stepper steps={[{ label: 'Account' }, { label: 'Details' }, { label: 'Review' }]} currentStep={1} />\n */\nconst Stepper = ({\n steps,\n currentStep,\n className,\n ...props\n}: StepperProps): ReactElement => (\n <ol\n aria-label=\"Progress\"\n className={cn('flex w-full items-start', className)}\n {...props}\n >\n {steps.map((step, index) => {\n const isCompleted = index < currentStep;\n const isCurrent = index === currentStep;\n // A segment is completed when both the step and the preceding step are done.\n const connectorCompleted = index > 0 && index <= currentStep;\n\n return (\n // Each list item is a flex row: [connector?] [indicator + text]\n <li\n key={step.label}\n className={cn(\n 'flex flex-1 items-start',\n // Remove flex-1 growth on the last step so the final item doesn't push right.\n index === steps.length - 1 && 'flex-none'\n )}\n aria-current={isCurrent ? 'step' : undefined}\n >\n {/* Connector line before this step (absent for the first step) */}\n {index > 0 && (\n <div\n aria-hidden=\"true\"\n className={cn(\n 'mt-3.5 h-px flex-1 transition-colors duration-300 ease-out motion-reduce:transition-none',\n connectorCompleted\n ? 'bg-[var(--action)]'\n : 'bg-[var(--border-divider)]'\n )}\n />\n )}\n\n {/* Step body: indicator circle + label/description */}\n <div className=\"flex flex-col items-center gap-1.5\">\n {/* Circular indicator */}\n <div\n aria-hidden=\"true\"\n className={cn(\n 'flex size-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-[background-color,border-color,color] duration-300 ease-out motion-reduce:transition-none select-none',\n isCompleted && 'bg-[var(--action)] text-white',\n isCurrent &&\n 'border-2 border-[var(--action)] text-[var(--action)]',\n !isCompleted &&\n !isCurrent &&\n 'border border-[var(--border-default)] text-muted-foreground'\n )}\n >\n {isCompleted ? (\n <CheckIcon size={13} strokeWidth={3} />\n ) : (\n String(index + 1)\n )}\n </div>\n\n {/* Step label */}\n <span\n className={cn(\n 'max-w-[6rem] text-center text-xs leading-tight transition-colors duration-300 ease-out motion-reduce:transition-none',\n isCurrent\n ? 'font-medium text-foreground'\n : 'text-muted-foreground'\n )}\n >\n {step.label}\n </span>\n\n {/* Optional description */}\n {step.description && (\n <span className=\"max-w-[6rem] text-center text-[10px] leading-tight text-muted-foreground\">\n {step.description}\n </span>\n )}\n </div>\n\n {/* Connector line after this step (absent for the last step) */}\n {index < steps.length - 1 && (\n <div\n aria-hidden=\"true\"\n className={cn(\n 'mt-3.5 h-px flex-1 transition-colors duration-300 ease-out motion-reduce:transition-none',\n // This connector is completed when the next step is already done.\n index + 1 <= currentStep\n ? 'bg-[var(--action)]'\n : 'bg-[var(--border-divider)]'\n )}\n />\n )}\n </li>\n );\n })}\n </ol>\n);\n\nexport { Stepper };\nexport type { StepperProps, StepperStep };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\nimport { Root, Thumb } from '@radix-ui/react-switch';\n\nimport { cn } from '../../../lib/utils';\n\nconst Switch = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & {\n size?: 'sm' | 'default';\n }\n>(({ className, size = 'default', ...props }, ref) => (\n <Root\n ref={ref}\n data-slot='switch'\n data-size={size}\n className={cn(\n \"peer data-[state=checked]:bg-(--action) data-[state=unchecked]:bg-input hover:data-[state=unchecked]:bg-[rgba(31,41,55,0.16)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.16)] focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 dark:hover:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] dark:group-hover/toggle:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] relative group/switch inline-flex shrink-0 touch-manipulation items-center rounded-full border-0 shadow-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] transition-[color,background-color,box-shadow] duration-200 ease-out motion-reduce:transition-none outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer data-[size=default]:h-[18px] data-[size=default]:w-[30px] data-[size=sm]:h-3.5 data-[size=sm]:w-[22px] before:absolute before:-inset-[15px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n 'pointer-events-none relative block ring-0',\n // travel only — slides between off/on with ease-out (Emil's blueprint)\n 'transition-transform duration-200 ease-out motion-reduce:transition-none',\n 'group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5',\n 'data-[state=unchecked]:translate-x-0.5 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px]',\n )}\n >\n {/* Inner pill carries the appearance + the press stretch. It animates WIDTH\n (not scaleX, which would oval the round caps) and is pinned to the edge\n nearest the track wall — right when checked, left when unchecked — so it\n only ever grows inward toward the track centre, never past the wall. */}\n <span\n className={cn(\n 'absolute top-0 h-full rounded-full',\n 'bg-background dark:group-data-[state=checked]/switch:bg-white dark:group-data-[state=unchecked]/switch:bg-[oklch(0.500_0.013_253)]',\n 'shadow-[var(--shadow-control-thumb)] dark:shadow-[var(--shadow-control-thumb)]',\n 'group-data-[size=default]/switch:w-3.5 group-data-[size=sm]/switch:w-2.5',\n 'group-data-[state=checked]/switch:right-0 group-data-[state=unchecked]/switch:left-0',\n // press stretch (1.2×) — ease-out, quick, direct-manipulation feedback\n 'group-[&[data-size=default]:active]/switch:w-[17px] group-[&[data-size=sm]:active]/switch:w-3',\n 'transition-[width,background-color] duration-[120ms] ease-out motion-reduce:transition-none',\n )}\n />\n </Thumb>\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client';\n\nimport {\n type CSSProperties,\n type ComponentProps,\n type ReactElement,\n type Ref,\n type RefCallback,\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\n\nimport { cn } from '../../../lib/utils';\n\ntype TableProps = ComponentProps<'table'> & {\n /** Stretch to the height the parent gives it, with one scroller and a pinned header. The parent must be a flex column with a bounded height. */\n fill?: boolean;\n /** Customize the native scroll viewport, including an optional max-height. */\n scrollAreaProps?: Omit<\n ComponentProps<'div'>,\n 'children' | 'ref' | 'role' | 'tabIndex'\n >;\n /** Pin the first column at inline-start; cells spanning multiple columns stay unpinned. */\n stickyFirstColumn?: boolean;\n /** Receives the scroll viewport element, for code that follows its scrolling such as row virtualization. */\n viewportRef?: Ref<HTMLDivElement>;\n};\n\n/** Keep overlay tracks clear of the shelf's rounded corners. */\nconst SCROLLBAR_INSET = 8;\n/** A wider drag target lets the visible thumb stay visually quiet. */\nconst SCROLLBAR_HIT_AREA = 12;\n\n/** Point several refs, function or object, at the same element. */\nconst mergeRefs =\n <T,>(...refs: Array<Ref<T> | undefined>): RefCallback<T> =>\n (node) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n });\n };\n\n/** Collect a row group's leading cells, skipping rows covered by an earlier rowSpan. */\nconst collectSectionPinnedCells = ({\n pinnedCells,\n section,\n}: {\n pinnedCells: Set<HTMLTableCellElement>;\n section: HTMLTableSectionElement;\n}): void => {\n let occupiedRows = 0;\n for (const row of Array.from(section.rows)) {\n if (occupiedRows > 0) {\n occupiedRows -= 1;\n continue;\n }\n const cell = row.cells[0];\n if (!cell) continue;\n // A zero rowSpan occupies the rest of its row group, not zero rows.\n occupiedRows = cell.rowSpan === 0 ? section.rows.length : cell.rowSpan - 1;\n if (cell.colSpan === 1) pinnedCells.add(cell);\n }\n};\n\n/** Collect the leading cells that pin, skipping rows covered by an earlier rowSpan. */\nconst collectPinnedCells = (\n table: HTMLTableElement\n): Set<HTMLTableCellElement> => {\n const pinnedCells = new Set<HTMLTableCellElement>();\n // DOM child order differs from column order when an earlier cell spans rows.\n for (const section of [\n ...Array.from(table.tBodies),\n table.tHead,\n table.tFoot,\n ]) {\n if (section) collectSectionPinnedCells({ pinnedCells, section });\n }\n return pinnedCells;\n};\n\n/** Measure where the body begins in content coordinates; top captions shift it down. */\nconst measureShelfTop = ({\n scrollArea,\n table,\n}: {\n scrollArea: HTMLDivElement;\n table: HTMLTableElement | null;\n}): number => {\n const body = table?.tBodies[0];\n // Content coordinates include top captions and stay stable after native scrolling.\n return body\n ? body.getBoundingClientRect().top -\n scrollArea.getBoundingClientRect().top +\n scrollArea.scrollTop\n : 0;\n};\n\n/**\n * Render a table in a stable tray with keyboard access only when content overflows.\n * For any list of records, use `DataTable`, which is built on this. Use `Table` directly\n * only for static layout: a short fixed grid of values that nobody sorts, filters, pages or selects.\n *\n * @deprecated For lists of records, use `DataTable`. Direct use is only for static layout.\n */\nconst Table = ({\n className,\n fill = false,\n scrollAreaProps = {},\n stickyFirstColumn = false,\n viewportRef,\n ...props\n}: TableProps): ReactElement => {\n const scrollAreaRef = useRef<HTMLDivElement>(null);\n // A stable callback keeps React from detaching and reattaching the viewport refs on every render.\n const setViewportRef = useMemo(\n () => mergeRefs(scrollAreaRef, viewportRef),\n [viewportRef]\n );\n const [overflow, setOverflow] = useState({\n horizontal: false,\n vertical: false,\n });\n const [isTouchPrimary, setIsTouchPrimary] = useState(false);\n const [direction, setDirection] = useState<'ltr' | 'rtl'>('ltr');\n const [headerHeight, setHeaderHeight] = useState(0);\n const [topCaptionHeight, setTopCaptionHeight] = useState(0);\n const [shelfTop, setShelfTop] = useState(0);\n const [firstColumnWidth, setFirstColumnWidth] = useState(0);\n const {\n className: scrollAreaClassName,\n style: scrollAreaStyle,\n 'aria-label': scrollAreaLabel = props['aria-label'] ?? 'Scrollable table',\n ...viewportProps\n } = scrollAreaProps;\n const isScrollable = overflow.horizontal || overflow.vertical;\n const useNativeScrollbars =\n isTouchPrimary || typeof ResizeObserver === 'undefined';\n\n useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;\n const pointerQuery = window.matchMedia('(pointer: coarse)');\n const updatePointer = () => setIsTouchPrimary(pointerQuery.matches);\n updatePointer();\n if (typeof pointerQuery.addEventListener === 'function') {\n pointerQuery.addEventListener('change', updatePointer);\n return () => pointerQuery.removeEventListener('change', updatePointer);\n }\n // Safari < 14 only supports the legacy addListener/removeListener API\n pointerQuery.addListener(updatePointer); // NOSONAR\n return () => pointerQuery.removeListener(updatePointer); // NOSONAR\n }, []);\n\n useEffect(() => {\n const scrollArea = scrollAreaRef.current;\n if (!scrollArea) return;\n\n const table = scrollArea.querySelector('table');\n let pinnedCells = new Set<HTMLTableCellElement>();\n let firstColumn: HTMLTableCellElement | undefined;\n const updatePinnedEdge = () => {\n // A CSS value keeps this high-frequency feedback out of React renders.\n scrollArea.parentElement?.style.setProperty(\n '--table-pinned-edge-visible',\n stickyFirstColumn &&\n firstColumn &&\n scrollArea.scrollWidth > scrollArea.clientWidth &&\n Math.abs(scrollArea.scrollLeft) > 0\n ? '1'\n : '0'\n );\n };\n const updatePinnedCells = () => {\n const nextPinnedCells =\n stickyFirstColumn && table\n ? collectPinnedCells(table)\n : new Set<HTMLTableCellElement>();\n pinnedCells.forEach((cell) => {\n if (!nextPinnedCells.has(cell)) delete cell.dataset.tablePinned;\n });\n nextPinnedCells.forEach((cell) => {\n if (!pinnedCells.has(cell)) cell.dataset.tablePinned = 'true';\n });\n pinnedCells = nextPinnedCells;\n const nextFirstColumn = pinnedCells.values().next().value;\n if (firstColumn !== nextFirstColumn) {\n if (firstColumn) observer?.unobserve(firstColumn);\n if (nextFirstColumn) observer?.observe(nextFirstColumn);\n firstColumn = nextFirstColumn;\n }\n };\n const updateLayout = () => {\n updatePinnedCells();\n // Radix drag math follows the same DOM-inherited direction as the table.\n setDirection(\n getComputedStyle(scrollArea).direction === 'rtl' ? 'rtl' : 'ltr'\n );\n setOverflow({\n horizontal: scrollArea.scrollWidth > scrollArea.clientWidth,\n vertical: scrollArea.scrollHeight > scrollArea.clientHeight,\n });\n setHeaderHeight(table?.tHead?.offsetHeight ?? 0);\n // Native focus scrolling must reveal content beyond the pinned column.\n setFirstColumnWidth(firstColumn?.offsetWidth ?? 0);\n const caption = table?.caption;\n setTopCaptionHeight(\n caption && getComputedStyle(caption).captionSide === 'top'\n ? caption.offsetHeight\n : 0\n );\n setShelfTop(measureShelfTop({ scrollArea, table }));\n updatePinnedEdge();\n };\n // Captions and row groups can resize without changing the total table height.\n const observer =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(updateLayout);\n const contentObserver = new MutationObserver(updateLayout);\n observer?.observe(scrollArea);\n if (table) {\n observer?.observe(table);\n Array.from(table.children).forEach((child) => observer?.observe(child));\n if (stickyFirstColumn) {\n // Child components can load or regroup rows without rerendering Table.\n contentObserver.observe(table, {\n attributeFilter: ['colspan', 'rowspan'],\n attributes: true,\n childList: true,\n subtree: true,\n });\n }\n }\n // Preserve keyboard overflow detection in environments without ResizeObserver.\n window.addEventListener('resize', updateLayout);\n scrollArea.addEventListener('scroll', updatePinnedEdge, { passive: true });\n updateLayout();\n return () => {\n window.removeEventListener('resize', updateLayout);\n scrollArea.removeEventListener('scroll', updatePinnedEdge);\n observer?.disconnect();\n contentObserver.disconnect();\n pinnedCells.forEach((cell) => delete cell.dataset.tablePinned);\n };\n // scrollAreaProps.dir reaches the viewport without rerunning Table, so it is a dep.\n }, [\n props.children,\n props.dir,\n scrollAreaProps.dir,\n isTouchPrimary,\n stickyFirstColumn,\n ]);\n\n return (\n <ScrollAreaPrimitive.Root asChild type=\"always\" dir={direction}>\n <div\n data-slot=\"table-container\"\n data-tray=\"header\"\n data-fill={fill || undefined}\n // An absent dir must inherit from the DOM, not Radix's default LTR value.\n dir={props.dir}\n className={cn(\n // Clipping plus inline-size containment keeps a wide table from widening its host, so overflow stays detectable.\n 'group/table relative min-w-0 w-full overflow-hidden [container-type:inline-size] [--table-radius:16px] [--table-shelf-radius:calc(var(--table-radius)_-_var(--tray-inset))] rounded-[var(--table-radius)] bg-[var(--tray-chrome)] px-[var(--tray-inset)] pb-[var(--tray-inset)]',\n fill && 'flex min-h-0 flex-1 flex-col'\n )}\n >\n {/* The shelf belongs to the tray, not the moving rows. */}\n <div\n aria-hidden=\"true\"\n data-slot=\"table-shelf\"\n className=\"pointer-events-none absolute inset-x-[var(--tray-inset)] bottom-[var(--tray-inset)] rounded-[var(--table-shelf-radius)] bg-card\"\n style={{ top: shelfTop }}\n />\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={setViewportRef}\n data-slot=\"table-scroll-area\"\n data-caption-top={topCaptionHeight > 0}\n data-native-scrollbars={useNativeScrollbars}\n role={isScrollable ? 'region' : undefined}\n aria-label={isScrollable ? scrollAreaLabel : undefined}\n tabIndex={isScrollable ? 0 : undefined}\n style={\n {\n '--table-caption-height': `${topCaptionHeight}px`,\n // Native overflow keeps wheel, trackpad and keyboard scrolling on the viewport.\n overflowX: isScrollable ? 'auto' : 'visible',\n overflowY: isScrollable ? 'auto' : 'visible',\n scrollPaddingInlineStart: `${firstColumnWidth}px`,\n scrollPaddingTop: headerHeight + topCaptionHeight,\n ...scrollAreaStyle,\n } as CSSProperties\n }\n className={cn(\n 'relative min-w-0 overflow-auto overscroll-none rounded-[var(--table-shelf-radius)] data-[native-scrollbars=true]:[scrollbar-width:auto] data-[native-scrollbars=true]:[&::-webkit-scrollbar]:block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ring)]',\n fill && 'min-h-0 flex-1',\n scrollAreaClassName\n )}\n >\n <table\n data-slot=\"table\"\n data-sticky-first-column={stickyFirstColumn || undefined}\n className={cn(\n 'w-full caption-bottom border-separate border-spacing-0 text-sm',\n stickyFirstColumn && [\n '[&>*>tr>[data-table-pinned]]:sticky [&>*>tr>[data-table-pinned]]:start-0 [&>*>tr>[data-table-pinned]]:z-10',\n '[&>*>tr>[data-table-pinned]]:bg-card',\n '[&>thead>tr>[data-table-pinned]]:bg-[var(--tray-chrome)]',\n // An opaque base blocks passing text; the overlay still matches its row state.\n '[&>:is(tbody,tfoot)>tr>[data-table-pinned]]:bg-[linear-gradient(var(--table-row-overlay,transparent),var(--table-row-overlay,transparent))]',\n ],\n className\n )}\n {...props}\n />\n </ScrollAreaPrimitive.Viewport>\n {stickyFirstColumn && firstColumnWidth > 0 && overflow.horizontal && (\n <div\n aria-hidden=\"true\"\n data-slot=\"table-pinned-edge\"\n dir={direction}\n className=\"pointer-events-none absolute top-0 bottom-[var(--tray-inset)] z-30 w-px bg-[var(--border-divider)] forced-colors:bg-[CanvasText]\"\n style={{\n insetInlineStart: `calc(var(--tray-inset) + ${firstColumnWidth}px)`,\n opacity: 'var(--table-pinned-edge-visible,0)',\n }}\n />\n )}\n {/* Mask only the fixed shelf corners, so row hover fills cannot square them off. */}\n <div\n aria-hidden=\"true\"\n data-slot=\"table-shelf-edge\"\n className=\"pointer-events-none absolute inset-x-[var(--tray-inset)] bottom-[var(--tray-inset)] z-30 rounded-[var(--table-shelf-radius)] border border-[var(--border-divider)] shadow-[0_0_0_var(--table-radius)_var(--tray-chrome)] [clip-path:inset(0)]\"\n style={{ top: shelfTop }}\n />\n {/* Separate tracks sit above the corner mask and never run through the header. */}\n {!useNativeScrollbars &&\n (['vertical', 'horizontal'] as const).map(\n (orientation) =>\n overflow[orientation] && (\n <ScrollAreaPrimitive.Scrollbar\n key={orientation}\n aria-hidden=\"true\"\n data-slot=\"table-scrollbar\"\n dir={direction}\n orientation={orientation}\n className=\"group/scrollbar pointer-events-none z-40 flex touch-none select-none opacity-0 group-hover/table:pointer-events-auto group-hover/table:opacity-100 group-focus-within/table:pointer-events-auto group-focus-within/table:opacity-100\"\n style={\n orientation === 'vertical'\n ? {\n bottom: `calc(var(--tray-inset) + ${SCROLLBAR_INSET}px)`,\n insetInlineEnd: 'var(--tray-inset)',\n left: 'auto',\n right: 'auto',\n top: shelfTop + SCROLLBAR_INSET,\n width: SCROLLBAR_HIT_AREA,\n }\n : {\n bottom: 'var(--tray-inset)',\n height: SCROLLBAR_HIT_AREA,\n insetInlineEnd: `calc(var(--tray-inset) + ${\n overflow.vertical\n ? SCROLLBAR_INSET + SCROLLBAR_HIT_AREA\n : SCROLLBAR_INSET\n }px)`,\n insetInlineStart: `calc(var(--tray-inset) + ${SCROLLBAR_INSET}px)`,\n left: 'auto',\n right: 'auto',\n }\n }\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"table-scrollbar-thumb\"\n // Keep the hit area stable while only the visible 4px thumb widens on hover.\n style={\n orientation === 'vertical'\n ? { width: '100%' }\n : { height: '100%' }\n }\n // Alpha lets row colors show through without fading the content itself.\n className={cn(\n 'relative [--table-scrollbar-thumb:color-mix(in_oklab,var(--foreground)_25%,transparent)] [--table-scrollbar-thumb-hover:color-mix(in_oklab,var(--foreground)_35%,transparent)] before:pointer-events-none before:absolute before:rounded-full before:bg-[var(--table-scrollbar-thumb)] group-hover/scrollbar:before:bg-[var(--table-scrollbar-thumb-hover)] contrast-more:before:bg-[var(--border-strong)] contrast-more:group-hover/scrollbar:before:bg-[var(--border-strong)] forced-colors:before:bg-[CanvasText] forced-colors:group-hover/scrollbar:before:bg-[CanvasText]',\n orientation === 'vertical'\n ? 'before:inset-y-0 before:left-1/2 before:w-1 before:-translate-x-1/2 group-hover/scrollbar:before:w-1.5'\n : 'before:inset-x-0 before:top-1/2 before:h-1 before:-translate-y-1/2 group-hover/scrollbar:before:h-1.5'\n )}\n />\n </ScrollAreaPrimitive.Scrollbar>\n )\n )}\n </div>\n </ScrollAreaPrimitive.Root>\n );\n};\n\nconst TableHeader = ({\n className,\n ...props\n}: ComponentProps<'thead'>): ReactElement => {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\n 'sticky top-[var(--table-caption-height,0px)] z-20 bg-[var(--tray-chrome)] [&_tr]:border-0 [&_tr]:hover:bg-transparent',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableBody = ({\n className,\n ...props\n}: ComponentProps<'tbody'>): ReactElement => {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\n '[&>tr:not(:last-child)>*]:border-b [&>tr:not(:last-child)>*]:border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableFooter = ({\n className,\n ...props\n}: ComponentProps<'tfoot'>): ReactElement => {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n 'font-medium [&>tr>*]:border-t [&>tr>*]:border-[var(--border-divider)]',\n className\n )}\n {...props}\n />\n );\n};\n\n// forwardRef rather than a ref prop, so code that measures rows, such as row virtualization, gets the <tr> on React 18 as well as 19.\nconst TableRow = forwardRef<HTMLTableRowElement, ComponentProps<'tr'>>(\n ({ className, ...props }, ref): ReactElement => (\n <tr\n ref={ref}\n data-slot=\"table-row\"\n className={cn(\n 'hover:bg-[var(--overlay-hover)] data-[state=selected]:bg-[var(--table-row-selected)] data-[state=selected]:hover:bg-[var(--table-row-selected-hover)] border-b border-[var(--border-divider)]',\n // Hover is instant: sweeping across rows happens constantly, and pinned cells paint it through this variable, which can't fade in step with the row's own background.\n 'hover:[--table-row-overlay:var(--overlay-hover)] data-[state=selected]:[--table-row-overlay:var(--table-row-selected)] data-[state=selected]:hover:[--table-row-overlay:var(--table-row-selected-hover)]',\n className\n )}\n {...props}\n />\n )\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = ({\n className,\n scope,\n ...props\n}: ComponentProps<'th'>): ReactElement => {\n return (\n <th\n data-slot=\"table-head\"\n scope={scope ?? 'col'}\n className={cn(\n 'text-foreground/75 h-[38px] px-4 text-left align-middle text-xs font-medium whitespace-nowrap tabular-nums [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableCell = ({\n className,\n ...props\n}: ComponentProps<'td'>): ReactElement => {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'px-4 py-2.5 align-middle whitespace-nowrap tabular-nums [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TableCaption = ({\n className,\n ...props\n}: ComponentProps<'caption'>): ReactElement => {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\n 'text-muted-foreground mt-4 text-sm [[data-caption-top=true]_&]:sticky [[data-caption-top=true]_&]:top-0 [[data-caption-top=true]_&]:z-20 [[data-caption-top=true]_&]:mt-0 [[data-caption-top=true]_&]:bg-[var(--tray-chrome)]',\n className\n )}\n {...props}\n />\n );\n};\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n};\n","import { createColumnHelper as createTanStackColumnHelper } from '@tanstack/react-table';\n\n/**\n * Creates a helper that builds typed column definitions for rows of type `TData`. Its `accessor`, `display` and `group` methods infer each column's value type.\n *\n * @example\n * ```tsx\n * const columnHelper = createColumnHelper<User>();\n *\n * const columns = [\n * columnHelper.accessor('name', { header: 'Name' }),\n * columnHelper.accessor('email', { header: 'Email' }),\n * ];\n * ```\n * @returns A column helper for rows of type `TData`.\n * @see ColumnDef\n * @see useDataTable\n */\nconst createColumnHelper: typeof createTanStackColumnHelper =\n createTanStackColumnHelper;\n\nexport { createColumnHelper };\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport type { DataTableInstance } from './use-data-table';\n\n// Parts render any row shape; the row type stays checked where the app calls useDataTable.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype DataTableContextValue = DataTableInstance<any> & { fill: boolean };\n\nconst DataTableContext = createContext<DataTableContextValue | null>(null);\n\n/**\n * Read the state of the nearest `DataTable`, for building custom table parts.\n * Throws when called outside a `DataTable`.\n */\nconst useDataTableContext = (): DataTableContextValue => {\n const context = useContext(DataTableContext);\n if (!context) {\n // eslint-disable-next-line no-restricted-syntax -- dev-time invariant guard; a \"used outside provider\" check doesn't warrant a domain BaseError class\n throw new Error('DataTable parts must be used inside a DataTable');\n }\n return context;\n};\n\nexport { DataTableContext, useDataTableContext };\nexport type { DataTableContextValue };\n","'use client';\n\nimport { type ComponentProps, type ReactElement, useMemo } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { DataTableContext } from './data-table-context';\nimport type { DataTableInstance } from './use-data-table';\n\n/**\n * Props for {@link DataTable}: the `table` from `useDataTable`, an optional `fill` layout mode, and any `div` props.\n *\n * @example\n * ```tsx\n * const props: DataTableProps<User> = { table: dataTable, fill: true };\n * ```\n * @see DataTable\n * @see useDataTable\n */\ntype DataTableProps<TData> = ComponentProps<'div'> & {\n /** Stretch to the height the parent gives it, with a pinned header and one scrollbar. The parent must be a flex column with a bounded height. */\n fill?: boolean;\n /** The result of `useDataTable`. */\n table: DataTableInstance<TData>;\n};\n\n/**\n * Root of a data table. Holds the table state for `DataTableContent`, `DataTablePagination` and the other parts.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({ columns, data });\n *\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableColumnVisibility />\n * </DataTableToolbar>\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered data table root element.\n * @see useDataTable\n * @see DataTableContent\n * @see DataTableToolbar\n */\nconst DataTable = <TData,>({\n children,\n className,\n fill = false,\n table,\n ...props\n}: DataTableProps<TData>): ReactElement => {\n const contextValue = useMemo(() => ({ ...table, fill }), [table, fill]);\n\n return (\n <DataTableContext.Provider value={contextValue}>\n <div\n data-slot=\"data-table\"\n data-fill={fill || undefined}\n className={cn(\n 'flex min-w-0 flex-col gap-3',\n fill && 'min-h-0 flex-1',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </DataTableContext.Provider>\n );\n};\n\n/**\n * Row above the table for search, filters and actions.\n *\n * @example\n * ```tsx\n * <DataTableToolbar>\n * <Input placeholder=\"Search users\" />\n * <DataTableColumnVisibility />\n * </DataTableToolbar>\n * ```\n * @returns The rendered toolbar element.\n * @see DataTable\n * @see DataTableColumnVisibility\n */\nconst DataTableToolbar = ({\n className,\n ...props\n}: ComponentProps<'div'>): ReactElement => (\n <div\n data-slot=\"data-table-toolbar\"\n className={cn('flex flex-wrap items-center gap-2', className)}\n {...props}\n />\n);\n\nexport { DataTable, DataTableToolbar };\nexport type { DataTableProps };\n","import type { Column } from '@tanstack/react-table';\n\n/**\n * Read a column the way users see it, so menus and handles name it: its `meta.label`, then a plain-text header, then its id.\n */\nconst getColumnLabel = <TData>(column: Column<TData, unknown>): string => {\n const { header, meta } = column.columnDef;\n const fallback = typeof header === 'string' ? header : column.id;\n // meta and its label are optional; a column without them falls back to its header or id.\n return meta?.label ?? fallback;\n};\n\nexport { getColumnLabel };\n","'use client';\n\nimport { FilterIcon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport type { Column, Table } from '@tanstack/react-table';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button/button';\nimport { Checkbox } from '../checkbox/checkbox';\nimport { Input } from '../input/input';\nimport { Label } from '../label/label';\nimport { Popover, PopoverContent, PopoverTrigger } from '../popover/popover';\nimport { useDataTableContext } from './data-table-context';\nimport { getColumnLabel } from './get-column-label';\n\nconst TEXT_FILTER_PLACEHOLDER = 'Contains';\nconst EMPTY_OPTIONS_TEXT = 'No values';\n\n/**\n * Turn cell values into checklist options. List-valued cells count as one value each in TanStack's facets, so their items are\n * spread out first: a tags column then offers each tag rather than each combination. Empty values offer nothing to check.\n */\nconst toOptions = ({ values }: { values: unknown[] }): string[] => {\n const items = values\n .flatMap((value): unknown[] => (Array.isArray(value) ? value : [value]))\n .filter((value) => value !== undefined && value !== null && value !== '')\n .map(String);\n return [...new Set(items)].sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));\n};\n\n/**\n * The values a `values` filter offers: the column's `filterOptions`, else the values in the data.\n * Client filtering reads TanStack's facets, which leave out the column's own filter so unchecked values stay offered.\n * Manual filtering has no facets, so it falls back to the values in the rows currently loaded.\n * Checked values stay listed even when other filters hide every row that holds them, so they can be unchecked.\n */\nconst getFilterOptions = <TData,>({\n column,\n selected,\n table,\n}: {\n column: Column<TData, unknown>;\n selected: string[];\n table: Table<TData>;\n}): string[] => {\n const filterOptions = column.columnDef.meta?.filterOptions;\n if (filterOptions) return filterOptions;\n const values = table.options.manualFiltering\n ? table.getCoreRowModel().flatRows.map((row) => row.getValue(column.id))\n : [...column.getFacetedUniqueValues().keys()];\n return toOptions({ values: [...values, ...selected] });\n};\n\n/** The checklist of a `values` filter. The checked values are the filter value; unchecking the last one removes the filter. */\nconst DataTableValuesFilter = <TData,>({\n column,\n filterValue,\n}: {\n column: Column<TData, unknown>;\n filterValue: unknown;\n}): ReactElement => {\n const { table } = useDataTableContext();\n const selected = Array.isArray(filterValue) ? filterValue.map(String) : [];\n const options = getFilterOptions({ column, selected, table });\n const toggle = ({ checked, option }: { checked: boolean; option: string }) => {\n const next = checked ? [...selected, option] : selected.filter((value) => value !== option);\n column.setFilterValue(next.length > 0 ? next : undefined);\n };\n\n if (options.length === 0) {\n return <p className=\"text-sm text-muted-foreground\">{EMPTY_OPTIONS_TEXT}</p>;\n }\n\n return (\n // The list scrolls, which clips anything drawn outside it; the padding leaves room for the checkbox ring and focus ring, and the negative margin keeps the alignment.\n <div data-slot=\"data-table-column-filter-options\" className=\"-m-1 flex max-h-60 flex-col gap-2 overflow-y-auto p-1\">\n {options.map((option) => (\n <Label key={option} className=\"flex items-center gap-2 text-sm font-normal\">\n <Checkbox\n checked={selected.includes(option)}\n onCheckedChange={(checked) => toggle({ checked: checked === true, option })}\n />\n {option}\n </Label>\n ))}\n </div>\n );\n};\n\n/**\n * Props for {@link DataTableColumnFilter}.\n *\n * @example\n * ```tsx\n * const props: DataTableColumnFilterProps<User> = { column: header.column };\n * ```\n * @see DataTableColumnFilter\n * @see DataTableActiveFilters\n */\ntype DataTableColumnFilterProps<TData> = {\n className?: string;\n /** The column to filter. It needs `meta.filter`, and `filtering` turned on in `useDataTable`. */\n column: Column<TData, unknown>;\n};\n\n/**\n * A filter button that opens a column's filter: a text field for `meta.filter: 'text'`, or a checklist for `meta.filter: 'values'`.\n * `DataTableContent` already adds it to each filterable header; render it yourself only in a header you build without `DataTableContent`.\n * The checklist offers `meta.filterOptions`, else the values in the data. With manual filtering and no `filterOptions`,\n * it can only offer the values in the rows currently loaded, so pass `filterOptions` when the server holds more.\n *\n * @example\n * ```tsx\n * const columns: ColumnDef<User>[] = [\n * { accessorKey: 'role', header: 'Role', meta: { filter: 'values' } },\n * ];\n *\n * // In a header row you render yourself:\n * <th>\n * Role\n * <DataTableColumnFilter column={header.column} />\n * </th>\n * ```\n * @returns The rendered filter button and its popover.\n * @see DataTableContent\n * @see DataTableActiveFilters\n * @see DataTableSearch\n */\nconst DataTableColumnFilter = <TData,>({\n className,\n column,\n}: DataTableColumnFilterProps<TData>): ReactElement => {\n const label = getColumnLabel(column);\n const isFiltered = column.getIsFiltered();\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n // The dot and colour are visual only, so the name carries the filtered state too.\n aria-label={isFiltered ? `Filter ${label}, filtered` : `Filter ${label}`}\n data-slot=\"data-table-column-filter\"\n data-filtered={isFiltered || undefined}\n size=\"icon-xs\"\n variant=\"ghost\"\n // A smaller hit area than the button's default keeps it off the sort button beside it.\n className={cn('ms-1 align-middle before:-inset-1 data-[filtered=true]:text-foreground', className)}\n >\n <HugeiconsIcon icon={FilterIcon} aria-hidden=\"true\" />\n {isFiltered && (\n <span aria-hidden=\"true\" className=\"absolute end-0.5 top-0.5 size-1.5 rounded-full bg-[var(--action)]\" />\n )}\n </Button>\n </PopoverTrigger>\n <DataTableColumnFilterContent column={column} />\n </Popover>\n );\n};\n\n/** The body of a column's filter popover, shared by the header filter button and the active-filter chips. */\nconst DataTableColumnFilterContent = <TData,>({\n column,\n}: {\n column: Column<TData, unknown>;\n}): ReactElement => {\n const label = getColumnLabel(column);\n const filterValue = column.getFilterValue();\n\n return (\n <PopoverContent aria-label={`Filter ${label}`} align=\"start\" className=\"flex w-56 flex-col gap-3 p-3\">\n {column.columnDef.meta?.filter === 'values' ? (\n <DataTableValuesFilter column={column} filterValue={filterValue} />\n ) : (\n <Input\n aria-label={`Filter ${label}`}\n placeholder={TEXT_FILTER_PLACEHOLDER}\n value={typeof filterValue === 'string' ? filterValue : ''}\n onChange={(event) => column.setFilterValue(event.target.value)}\n />\n )}\n {column.getIsFiltered() && (\n // The negative margin runs the divider edge to edge across the popover's padding.\n <div\n data-slot=\"data-table-column-filter-footer\"\n className=\"-mx-3 flex justify-end border-t border-[var(--border-divider)] px-3 pt-3\"\n >\n <Button size=\"sm\" variant=\"secondary\" onClick={() => column.setFilterValue(undefined)}>\n Clear\n </Button>\n </div>\n )}\n </PopoverContent>\n );\n};\n\nexport { DataTableColumnFilter, DataTableColumnFilterContent };\nexport type { DataTableColumnFilterProps };\n","'use client';\n\nimport { ArrowDown01Icon, Cancel01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport type { Column } from '@tanstack/react-table';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Button } from '../button/button';\nimport { Popover, PopoverTrigger } from '../popover/popover';\nimport { DataTableColumnFilterContent } from './data-table-column-filter';\nimport { useDataTableContext } from './data-table-context';\nimport { getColumnLabel } from './get-column-label';\n\n/** A `values` filter holds the checked values; a `text` filter holds the text. */\nconst toFilterValues = (value: unknown): string[] =>\n Array.isArray(value) ? value.map(String) : [String(value)];\n\n// Past this many values the chip shows a count for the rest, so a long selection doesn't stretch the toolbar.\nconst MAX_SHOWN_VALUES = 2;\n\n// The chip pads its controls by 4px, so their 4px corners sit concentric inside its 8px corners.\n// Only color and background transition, so hovering never shifts layout.\nconst CHIP_CONTROL =\n 'inline-flex h-6 items-center rounded-[4px] outline-none transition-[color,background-color] duration-150 ease-out hover:bg-[var(--overlay-hover)] focus-visible:ring-2 focus-visible:ring-[var(--ring)]';\n\n// A chip reads like Clerk's: remove first, then the column name, then the value, which reopens the column's filter.\nconst DataTableFilterChip = ({\n column,\n label,\n onRemove,\n removeLabel,\n values,\n}: {\n // Mixed column value types make any the only shared column type.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n column?: Column<any, unknown>;\n label: string;\n onRemove: () => void;\n removeLabel: string;\n values: string[];\n}): ReactElement => {\n const fullValue = values.join(', ');\n const hiddenCount = values.length - MAX_SHOWN_VALUES;\n const shownValue = (\n <>\n {values.slice(0, MAX_SHOWN_VALUES).join(', ')}\n {hiddenCount > 0 && <span className=\"ms-1 text-muted-foreground\">+{hiddenCount}</span>}\n </>\n );\n\n return (\n // Outlined like a secondary button, so active filters read as controls without a heavy fill.\n <span\n data-slot=\"data-table-filter-chip\"\n title={hiddenCount > 0 ? fullValue : undefined}\n className=\"inline-flex h-8 items-center rounded-md bg-white p-1 text-[13px] shadow-[var(--shadow-secondary)] dark:bg-input/30\"\n >\n <button\n type=\"button\"\n aria-label={removeLabel}\n onClick={onRemove}\n className={cn(CHIP_CONTROL, 'w-6 justify-center text-muted-foreground/70 hover:text-foreground')}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={12} strokeWidth={2} aria-hidden=\"true\" />\n </button>\n {/* The hidden colon keeps the name and value one phrase for screen readers. */}\n <span className=\"ps-1 pe-2 text-muted-foreground\">\n {label}\n <span className=\"sr-only\">: </span>\n </span>\n {/* A short tick separates name from value without splitting the chip in two. */}\n <span aria-hidden=\"true\" className=\"h-4 w-px bg-[var(--border-divider)]\" />\n {column ? (\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label={`Change ${label} filter: ${fullValue}`}\n className={cn(CHIP_CONTROL, 'ms-1 gap-1 ps-1.5 pe-1 font-medium text-[var(--action)]')}\n >\n {shownValue}\n <HugeiconsIcon icon={ArrowDown01Icon} size={14} aria-hidden=\"true\" className=\"opacity-60\" />\n </button>\n </PopoverTrigger>\n <DataTableColumnFilterContent column={column} />\n </Popover>\n ) : (\n <span className=\"ps-2 pe-1.5 font-medium text-[var(--action)]\">{shownValue}</span>\n )}\n </span>\n );\n};\n\n/**\n * Props for {@link DataTableActiveFilters}.\n *\n * @example\n * ```tsx\n * const props: DataTableActiveFiltersProps = { className: 'px-4' };\n * ```\n * @see DataTableActiveFilters\n * @see DataTableColumnFilter\n */\ntype DataTableActiveFiltersProps = {\n className?: string;\n};\n\n/**\n * One chip per active filter, each with a button that removes it, plus a button that clears them all.\n * The search text gets a chip too. Renders nothing while no filter is active.\n *\n * @example\n * ```tsx\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableSearch />\n * </DataTableToolbar>\n * <DataTableActiveFilters />\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered filter chips, or nothing when no filter is active.\n * @see DataTableColumnFilter\n * @see DataTableSearch\n * @see useDataTable\n */\nconst DataTableActiveFilters = ({\n className,\n}: DataTableActiveFiltersProps): ReactElement | null => {\n const { table } = useDataTableContext();\n const { columnFilters, globalFilter } = table.getState();\n // The global filter state is untyped in TanStack; useDataTable keeps it a string.\n const search = typeof globalFilter === 'string' ? globalFilter : '';\n if (columnFilters.length === 0 && search === '') return null;\n\n // Both halves change in one tick; useDataTable resolves each against the latest filter state, so neither undoes the other.\n const clearAll = () => {\n table.setColumnFilters([]);\n table.setGlobalFilter('');\n };\n\n return (\n // A fieldset is a native group, named by its label; min-w-0 drops its default min-content width so the chips can wrap.\n <fieldset\n aria-label=\"Active filters\"\n data-slot=\"data-table-active-filters\"\n className={cn('flex min-w-0 flex-wrap items-center gap-2', className)}\n >\n {search !== '' && (\n <DataTableFilterChip\n label=\"Search\"\n onRemove={() => table.setGlobalFilter('')}\n removeLabel=\"Remove search filter\"\n values={[search]}\n />\n )}\n {columnFilters.map(({ id, value }) => {\n // A filter can name a column the app has since removed; its id still identifies it.\n // getColumn logs an error for a missing id, so look the column up quietly.\n const column = table.getAllFlatColumns().find((candidate) => candidate.id === id);\n const label = column ? getColumnLabel(column) : id;\n return (\n <DataTableFilterChip\n key={id}\n // Only columns with a filter UI can reopen it from the chip.\n column={column?.columnDef.meta?.filter ? column : undefined}\n label={label}\n onRemove={() => table.setColumnFilters((old) => old.filter((filter) => filter.id !== id))}\n removeLabel={`Remove ${label} filter`}\n values={toFilterValues(value)}\n />\n );\n })}\n <Button className=\"text-muted-foreground hover:text-foreground\" variant=\"ghost\" onClick={clearAll}>\n Clear filters\n </Button>\n </fieldset>\n );\n};\n\nexport { DataTableActiveFilters };\nexport type { DataTableActiveFiltersProps };\n","'use client';\n\nimport { ArrowDown01Icon, LayoutThreeColumnIcon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type ReactElement } from 'react';\nimport { CheckboxItem } from '@radix-ui/react-dropdown-menu';\n\nimport { Button } from '../button/button';\nimport { Checkbox } from '../checkbox/checkbox';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from '../dropdown-menu/dropdown-menu';\nimport { useDataTableContext } from './data-table-context';\nimport { getColumnLabel } from './get-column-label';\n\n/**\n * Props for {@link DataTableColumnVisibility}.\n *\n * @example\n * ```tsx\n * const props: DataTableColumnVisibilityProps = { label: 'Fields' };\n * ```\n * @see DataTableColumnVisibility\n * @see useDataTable\n */\ntype DataTableColumnVisibilityProps = {\n className?: string;\n /** Menu trigger text. */\n label?: string;\n};\n\n/**\n * Lets people choose which columns are shown, from a menu with a checkbox per column.\n *\n * @example\n * ```tsx\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableColumnVisibility label=\"Columns\" />\n * </DataTableToolbar>\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered column picker menu.\n * @see DataTable\n * @see DataTableToolbar\n * @see useDataTable\n */\nconst DataTableColumnVisibility = ({\n className,\n label = 'Columns',\n}: DataTableColumnVisibilityProps): ReactElement => {\n const { table } = useDataTableContext();\n const columns = table\n .getAllLeafColumns()\n .filter((column) => column.getCanHide());\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n data-slot=\"data-table-column-visibility\"\n className={className}\n variant=\"outline\"\n >\n <HugeiconsIcon icon={LayoutThreeColumnIcon} aria-hidden=\"true\" />\n {label}\n <HugeiconsIcon icon={ArrowDown01Icon} aria-hidden=\"true\" />\n </Button>\n </DropdownMenuTrigger>\n {/* The button sits beside the search, so the menu opens along its start edge. */}\n <DropdownMenuContent align=\"start\">\n {columns.map((column) => {\n const visible = column.getIsVisible();\n return (\n // The shared checkbox item draws a bare check mark; this menu shows a droplet checkbox instead, so it builds its own item.\n <CheckboxItem\n key={column.id}\n data-slot=\"data-table-column-visibility-item\"\n className=\"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\"\n checked={visible}\n onCheckedChange={(checked) =>\n column.toggleVisibility(checked === true)\n }\n // Keep the menu open so several columns can be toggled in one go.\n onSelect={(event) => event.preventDefault()}\n >\n {/* Drawn only: the item is the menuitemcheckbox and takes the click, so the checkbox stays out of the tab order and the accessibility tree. */}\n {/* Not asChild: Checkbox renders its indicator as the root's children, which would replace a child passed here. */}\n <Checkbox\n checked={visible}\n tabIndex={-1}\n aria-hidden=\"true\"\n className=\"pointer-events-none\"\n />\n {getColumnLabel(column)}\n </CheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n\nexport { DataTableColumnVisibility };\nexport type { DataTableColumnVisibilityProps };\n","import { type ComponentType, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport type EmptyStateProps = {\n action?: ReactNode;\n className?: string;\n description?: string;\n icon: ComponentType<{ className?: string; size?: number }>;\n title: string;\n};\n\nexport const EmptyState = ({\n icon: Icon,\n title,\n description,\n action,\n className,\n}: EmptyStateProps): ReactElement => {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center py-16 px-8 text-center',\n className\n )}\n >\n <div className=\"flex size-12 items-center justify-center rounded-xl bg-muted mb-4\">\n <Icon className=\"size-6 text-muted-foreground\" />\n </div>\n <h3 className=\"text-sm font-semibold\">{title}</h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 max-w-sm\">\n {description}\n </p>\n )}\n {action && <div className=\"mt-4\">{action}</div>}\n </div>\n );\n};\n","import { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { EmptyState } from '../../empty-state/empty-state';\nimport type { EmptyStateProps } from '../../empty-state/empty-state';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { TableCell, TableRow } from '../table/table';\n\n/** Varied bar widths read as real content rather than one repeated block. */\nconst PLACEHOLDER_BARS = ['w-28', 'w-14', 'w-24', 'w-36', 'w-24', 'w-14'];\nconst GHOST_ROW_COUNT = 6;\n/** Placeholder, group and detail rows are not interactive, so they must not take the row hover fill. */\nconst STATIC_ROW = 'hover:bg-transparent hover:[--table-row-overlay:transparent]';\n\nconst getBarWidth = (columnIndex: number): string =>\n PLACEHOLDER_BARS[columnIndex % PLACEHOLDER_BARS.length];\n\ntype DataTableSkeletonRowsProps = {\n columnCount: number;\n rowCount: number;\n};\n\n/** Skeleton rows shown while data loads. Only the first bar is announced, so screen readers hear \"Loading\" once. */\nconst DataTableSkeletonRows = ({\n columnCount,\n rowCount,\n}: DataTableSkeletonRowsProps): ReactElement => (\n <>\n {Array.from({ length: rowCount }, (_, rowIndex) => (\n <TableRow\n key={rowIndex}\n data-slot=\"data-table-skeleton-row\"\n className={STATIC_ROW}\n >\n {Array.from({ length: columnCount }, (_, columnIndex) => (\n <TableCell key={columnIndex}>\n <Skeleton\n aria-hidden={rowIndex > 0 || columnIndex > 0 || undefined}\n className={cn('h-4 max-w-full', getBarWidth(columnIndex))}\n />\n </TableCell>\n ))}\n </TableRow>\n ))}\n </>\n);\n\ntype DataTableEmptyRowProps = {\n /** An action under the title, for example a button that clears the filters. */\n action?: ReactNode;\n columnCount: number;\n icon: EmptyStateProps['icon'];\n title: string;\n};\n\n/** Ghost rows keep the table's shape behind an icon and title. */\nconst DataTableEmptyRow = ({\n action,\n columnCount,\n icon,\n title,\n}: DataTableEmptyRowProps): ReactElement => (\n <TableRow data-slot=\"data-table-empty\" className={STATIC_ROW}>\n <TableCell colSpan={columnCount} className=\"p-0 whitespace-normal\">\n <div className=\"grid\">\n <div\n aria-hidden=\"true\"\n className=\"pointer-events-none col-start-1 row-start-1 select-none opacity-45 [mask-image:radial-gradient(ellipse_at_center,transparent_48%,black_88%)]\"\n >\n {Array.from({ length: GHOST_ROW_COUNT }, (_, rowIndex) => (\n <div\n key={rowIndex}\n data-slot=\"data-table-ghost-row\"\n className=\"grid items-center border-b border-[var(--border-divider)] py-3.5 last:border-b-0\"\n style={{\n gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))`,\n }}\n >\n {Array.from({ length: columnCount }, (_, columnIndex) => (\n <span key={columnIndex} className=\"px-4\">\n <span\n className={cn(\n 'block h-2.5 max-w-full rounded-full bg-[var(--bg-accented)]',\n getBarWidth(columnIndex)\n )}\n />\n </span>\n ))}\n </div>\n ))}\n </div>\n {/* The ghost rows scroll with a wide table; 100cqw of the tray keeps the message centered in what is visible. */}\n <div className=\"sticky start-0 col-start-1 row-start-1 flex w-[100cqw] items-center justify-center justify-self-start\">\n <EmptyState action={action} className=\"py-0\" icon={icon} title={title} />\n </div>\n </div>\n </TableCell>\n </TableRow>\n);\n\nexport { DataTableEmptyRow, DataTableSkeletonRows, STATIC_ROW };\n","'use client';\n\nimport { ArrowRight01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n/** A right-pointing chevron that turns to point down while its group is open. */\nconst ExpandChevron = ({ isOpen }: { isOpen: boolean }): ReactElement => (\n <HugeiconsIcon\n icon={ArrowRight01Icon}\n aria-hidden=\"true\"\n className={cn(\n 'transition-transform duration-150 motion-reduce:transition-none',\n isOpen && 'rotate-90'\n )}\n />\n);\n\nexport { ExpandChevron };\n","import type { Column } from '@tanstack/react-table';\nimport type { CSSProperties } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype PinnedCellProps = {\n className?: string;\n 'data-pinned'?: 'left' | 'right';\n style?: CSSProperties;\n};\n\n/** Pinned cells need an opaque base so scrolling text cannot show through; the body overlay still follows row hover and selection. */\nconst PINNED_BACKGROUND = {\n body: 'bg-card bg-[image:linear-gradient(var(--table-row-overlay,transparent),var(--table-row-overlay,transparent))]',\n header: 'bg-[var(--tray-chrome)]',\n} as const;\n\n/** A 1px divider marks where pinned columns meet the scrolling ones. */\nconst PINNED_EDGE = {\n left: 'shadow-[inset_-1px_0_0_var(--border-divider)]',\n right: 'shadow-[inset_1px_0_0_var(--border-divider)]',\n} as const;\n\n/** Sticky position, background and edge divider for a cell in a pinned column. */\nconst getPinnedCellProps = <TData>({\n column,\n section,\n}: {\n column: Column<TData, unknown>;\n section: 'body' | 'header';\n}): PinnedCellProps => {\n const side = column.getIsPinned();\n if (!side) return {};\n\n const isEdge =\n side === 'left'\n ? column.getIsLastColumn('left')\n : column.getIsFirstColumn('right');\n\n return {\n className: cn(\n 'sticky z-10',\n PINNED_BACKGROUND[section],\n isEdge && PINNED_EDGE[side]\n ),\n 'data-pinned': side,\n style:\n side === 'left'\n ? { insetInlineStart: column.getStart('left') }\n : { insetInlineEnd: column.getAfter('right') },\n };\n};\n\nexport { getPinnedCellProps };\nexport type { PinnedCellProps };\n","'use client';\n\nimport type { CellContext, ColumnDef, HeaderContext, Table } from '@tanstack/react-table';\nimport { type ReactElement } from 'react';\n\nimport { Checkbox } from '../checkbox/checkbox';\n\n/**\n * Id of the checkbox column added by `selectionColumn`. Use it to find that column, for example when pinning it to the start edge.\n *\n * @example\n * ```tsx\n * const columnPinning = { initial: { left: [SELECTION_COLUMN_ID] } };\n * ```\n * @see selectionColumn\n * @see useDataTable\n */\nconst SELECTION_COLUMN_ID = 'select';\n/** Fixed width in px; DataTableContent sizes headers from it when resizing or pinning is on. */\nconst SELECTION_COLUMN_SIZE = 40;\n\nconst getAllRowsCheckedState = <TData,>(\n table: Table<TData>\n): boolean | 'indeterminate' => {\n if (table.getIsAllPageRowsSelected()) return true;\n return table.getIsSomePageRowsSelected() ? 'indeterminate' : false;\n};\n\n// Module-level renderers keep one identity however often selectionColumn() is called.\n// flexRender treats a new function as a new component, which would remount every checkbox and replay its check animation on each selection change.\nconst SelectionCell = <TData,>({ row }: CellContext<TData, unknown>): ReactElement => (\n <Checkbox\n aria-label=\"Select row\"\n checked={row.getIsSelected()}\n disabled={!row.getCanSelect()}\n onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n />\n);\n\nconst SelectionHeader = <TData,>({ table }: HeaderContext<TData, unknown>): ReactElement => (\n <Checkbox\n aria-label=\"Select all rows\"\n checked={getAllRowsCheckedState(table)}\n onCheckedChange={(checked) => table.toggleAllPageRowsSelected(checked === true)}\n />\n);\n\n/**\n * A checkbox column for row selection. Put it first in `columns` and pass `selection` to `useDataTable`.\n *\n * @example\n * const columns = [selectionColumn<User>(), { accessorKey: 'name', header: 'Name' }];\n * @returns A column definition that renders a checkbox for each row and a select-all checkbox in the header.\n * @see SELECTION_COLUMN_ID\n * @see useDataTable\n */\nconst selectionColumn = <TData,>(): ColumnDef<TData> => ({\n cell: SelectionCell,\n enableHiding: false,\n enableResizing: false,\n enableSorting: false,\n header: SelectionHeader,\n id: SELECTION_COLUMN_ID,\n size: SELECTION_COLUMN_SIZE,\n});\n\nexport { SELECTION_COLUMN_ID, selectionColumn };\n","'use client';\n\nimport { type Row, flexRender } from '@tanstack/react-table';\nimport { type ComponentPropsWithoutRef, type ReactElement, type Ref } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { TableCell, TableRow } from '../table/table';\nimport { STATIC_ROW } from './data-table-placeholder-rows';\nimport { ExpandChevron } from './expand-chevron';\nimport { getPinnedCellProps } from './get-pinned-cell-props';\nimport { SELECTION_COLUMN_ID } from './selection-column';\n\n/** Fixed layout cells clip and truncate, so a narrowed column cannot spill into its neighbour. The checkbox column never needs it. */\nconst FIXED_LAYOUT_CELL_CLASS = 'overflow-hidden text-ellipsis';\n/**\n * Pins full-width row content to the visible part of a horizontally scrolling table. The single spanning cell has no\n * pinned part of its own, so without this the content scrolls off to the start. 100cqw is the tray's width, since the\n * tray is an inline-size container. The cell drops its padding and this element carries it, so the content is exactly\n * the visible width and never widens the table.\n */\nconst STICKY_ROW_CONTENT = 'sticky start-0 w-[100cqw] px-4 py-2.5';\n/** Shown for a group whose rows have no value in the grouped column. */\nconst EMPTY_GROUP_LABEL = 'None';\n\n// Mixed column value types make any the only shared row type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyRow = Row<any>;\n\n/** The checkbox column holds one control, so it stays narrow and never clips. */\nconst isControlColumn = (columnId: string): boolean => columnId === SELECTION_COLUMN_ID;\n\n/** Rows inside groups step in by 1.25rem per level from the cell's own 1rem padding. */\nconst getIndent = (depth: number): string => `calc(1rem + ${depth} * 1.25rem)`;\n\nconst getGroupLabel = ({\n groupingColumnId,\n row,\n}: {\n groupingColumnId: string;\n row: AnyRow;\n}): string => {\n const value = row.getGroupingValue(groupingColumnId);\n const label =\n value === undefined || value === null || value === ''\n ? EMPTY_GROUP_LABEL\n : String(value);\n // Leaf rows include the sub-group rows of nested grouping; count only the data rows.\n const count = row.getLeafRows().filter((leaf) => !leaf.getIsGrouped()).length;\n return `${label} (${count})`;\n};\n\n/**\n * Lands on the row's `<tr>`, for the virtualizer to measure it. A named prop rather than `ref`, because on React 18\n * a plain function component never receives `ref`.\n */\ntype RowRef = Ref<HTMLTableRowElement> | undefined;\n\ntype DataTableRowProps = ComponentPropsWithoutRef<'tr'> & {\n hasFixedLayout: boolean;\n row: AnyRow;\n rowRef?: RowRef;\n};\n\nconst DataTableRow = ({\n hasFixedLayout,\n row,\n rowRef,\n ...props\n}: DataTableRowProps): ReactElement => {\n const cells = row.getVisibleCells();\n // Rows inside groups indent their first data cell, so the nesting reads past the checkbox column.\n const indentedCellId =\n row.depth > 0\n ? cells.find((cell) => !isControlColumn(cell.column.id))?.id\n : undefined;\n\n return (\n <TableRow\n ref={rowRef}\n data-state={row.getIsSelected() ? 'selected' : undefined}\n {...props}\n >\n {cells.map((cell) => {\n const pinned = getPinnedCellProps({\n column: cell.column,\n section: 'body',\n });\n return (\n <TableCell\n key={cell.id}\n data-pinned={pinned['data-pinned']}\n className={cn(\n hasFixedLayout &&\n !isControlColumn(cell.column.id) &&\n FIXED_LAYOUT_CELL_CLASS,\n pinned.className\n )}\n style={\n cell.id === indentedCellId\n ? { ...pinned.style, paddingInlineStart: getIndent(row.depth) }\n : pinned.style\n }\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </TableCell>\n );\n })}\n </TableRow>\n );\n};\n\n/** One full-width row naming the group and how many rows it holds, with a button that opens or closes it. */\nconst DataTableGroupRow = ({\n columnCount,\n groupingColumnId,\n row,\n rowRef,\n ...props\n}: ComponentPropsWithoutRef<'tr'> & {\n columnCount: number;\n groupingColumnId: string;\n row: AnyRow;\n rowRef?: RowRef;\n}): ReactElement => {\n const isOpen = row.getIsExpanded();\n return (\n <TableRow\n ref={rowRef}\n data-slot=\"data-table-group-row\"\n className={STATIC_ROW}\n {...props}\n >\n <TableCell colSpan={columnCount} className=\"p-0 font-medium\">\n {/* Sticky so the label and its toggle stay in view when the table scrolls sideways; its padding leaves room for the focus ring. */}\n <div\n className={STICKY_ROW_CONTENT}\n style={row.depth > 0 ? { paddingInlineStart: getIndent(row.depth) } : undefined}\n >\n {/* The label sits inside the button, so the whole label opens the group and names the button. */}\n <button\n type=\"button\"\n aria-expanded={isOpen}\n onClick={row.getToggleExpandedHandler()}\n className=\"-mx-1.5 inline-flex items-center gap-1.5 rounded-md px-1.5 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] [&_svg]:size-3.5\"\n >\n <ExpandChevron isOpen={isOpen} />\n {getGroupLabel({ groupingColumnId, row })}\n </button>\n </div>\n </TableCell>\n </TableRow>\n );\n};\n\ntype DataTableBodyRowProps = ComponentPropsWithoutRef<'tr'> & {\n columnCount: number;\n hasFixedLayout: boolean;\n row: AnyRow;\n rowRef?: RowRef;\n};\n\n/** One table row, as a group header or a data row. Row props and `rowRef` land on its `<tr>`. */\nconst DataTableBodyRow = ({\n columnCount,\n hasFixedLayout,\n row,\n ...props\n}: DataTableBodyRowProps): ReactElement => {\n const { groupingColumnId } = row;\n // TanStack marks a row as grouped exactly when it has a grouping column id, so reading the id is the same check, typed.\n if (groupingColumnId) {\n return (\n <DataTableGroupRow\n columnCount={columnCount}\n groupingColumnId={groupingColumnId}\n row={row}\n {...props}\n />\n );\n }\n return <DataTableRow hasFixedLayout={hasFixedLayout} row={row} {...props} />;\n};\n\nexport { DataTableBodyRow, FIXED_LAYOUT_CELL_CLASS, isControlColumn };\n","'use client';\n\nimport { ArrowDown01Icon, ArrowUp01Icon, Table01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type Header, flexRender } from '@tanstack/react-table';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport { type ComponentProps, type KeyboardEvent, type ReactElement, type ReactNode, useCallback, useRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport type { EmptyStateProps } from '../../empty-state/empty-state';\nimport { Button } from '../button/button';\nimport { Table, TableBody, TableHead, TableHeader, TableRow } from '../table/table';\nimport { DataTableColumnFilter } from './data-table-column-filter';\nimport { useDataTableContext } from './data-table-context';\nimport { DataTableEmptyRow, DataTableSkeletonRows } from './data-table-placeholder-rows';\nimport {\n DataTableBodyRow,\n FIXED_LAYOUT_CELL_CLASS,\n isControlColumn,\n} from './data-table-rows';\nimport { getColumnLabel } from './get-column-label';\nimport { getPinnedCellProps } from './get-pinned-cell-props';\n\nconst DEFAULT_EMPTY_TITLE = 'No results';\nconst DEFAULT_EMPTY_FILTERED_TITLE = 'No matching results';\nconst DEFAULT_LOADING_ROW_COUNT = 5;\nconst ARIA_SORT = { asc: 'ascending', desc: 'descending' } as const;\nconst SORT_ICON = { asc: ArrowUp01Icon, desc: ArrowDown01Icon } as const;\n/** Arrow keys resize in 16px steps, matching the 4px spacing grid. */\nconst RESIZE_STEP: Partial<Record<string, number>> = { ArrowLeft: -16, ArrowRight: 16 };\n/** TanStack's default minimum column width. */\nconst MIN_COLUMN_SIZE = 20;\n/** TanStack leaves columns unbounded; screen readers get a usable range instead. */\nconst MAX_COLUMN_SIZE = 1000;\n/** Rows rendered beyond each edge of the view when virtualization sets no overscan. */\nconst DEFAULT_OVERSCAN = 8;\n\nconst DefaultEmptyIcon: EmptyStateProps['icon'] = ({ className, size }) => (\n <HugeiconsIcon className={className} icon={Table01Icon} size={size} />\n);\n\n// Mixed column value types make any the only shared header type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyHeader = Header<any, unknown>;\n\nconst getMaxColumnSize = (maxSize: number | undefined): number =>\n maxSize === undefined || maxSize === Number.MAX_SAFE_INTEGER ? MAX_COLUMN_SIZE : maxSize;\n\nconst DataTableResizeHandle = ({ header }: { header: AnyHeader }): ReactElement => {\n const { column } = header;\n const { table } = header.getContext();\n const size = column.getSize();\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const step = RESIZE_STEP[event.key];\n if (!step) return;\n event.preventDefault();\n table.setColumnSizing((sizing) => ({ ...sizing, [column.id]: size + step }));\n };\n const resize = header.getResizeHandler();\n\n return (\n <div\n role=\"separator\"\n aria-label={`Resize ${getColumnLabel(column)}`}\n aria-orientation=\"vertical\"\n aria-valuemax={getMaxColumnSize(column.columnDef.maxSize)}\n aria-valuemin={column.columnDef.minSize ?? MIN_COLUMN_SIZE}\n aria-valuenow={size}\n aria-valuetext={`${size} pixels`}\n tabIndex={0}\n data-slot=\"data-table-resize-handle\"\n data-resizing={column.getIsResizing() || undefined}\n onDoubleClick={() => column.resetSize()}\n onKeyDown={handleKeyDown}\n onMouseDown={resize}\n onTouchStart={resize}\n className=\"absolute inset-y-0 end-0 w-2 cursor-col-resize touch-none select-none outline-none after:absolute after:inset-y-2 after:end-0 after:w-px after:bg-[var(--border-divider)] after:opacity-0 hover:after:opacity-100 focus-visible:after:bg-[var(--ring)] focus-visible:after:opacity-100 data-[resizing=true]:after:opacity-100\"\n />\n );\n};\n\nconst DataTableHeadCell = ({\n header,\n hasFixedLayout,\n}: {\n hasFixedLayout: boolean;\n header: AnyHeader;\n}): ReactElement => {\n const { column } = header;\n const sorted = column.getIsSorted();\n const sortIndex = column.getSortIndex();\n // With several sort rules, each sorted header shows its priority; one rule needs no number.\n const isMultiSort = header.getContext().table.getState().sorting.length > 1;\n const sortPriority = sorted && isMultiSort ? sortIndex + 1 : undefined;\n const pinned = getPinnedCellProps({ column, section: 'header' });\n const content = header.isPlaceholder\n ? null\n : flexRender(column.columnDef.header, header.getContext());\n\n return (\n <TableHead\n colSpan={header.colSpan}\n // aria-sort belongs on the primary sort column only.\n aria-sort={sorted && sortIndex === 0 ? ARIA_SORT[sorted] : undefined}\n data-pinned={pinned['data-pinned']}\n className={cn(\n // The resize handle is absolutely positioned against its header cell.\n column.getCanResize() && 'relative',\n // Auto layout would hand the checkbox and expand columns spare width; w-px shrinks them to their content.\n isControlColumn(column.id) && 'w-px',\n hasFixedLayout && !isControlColumn(column.id) && FIXED_LAYOUT_CELL_CLASS,\n pinned.className\n )}\n style={{ ...pinned.style, width: hasFixedLayout ? header.getSize() : undefined }}\n >\n {/* A placeholder cell has no header content, so a sort button there would be focusable and nameless. */}\n {!header.isPlaceholder && column.getCanSort() ? (\n <button\n type=\"button\"\n onClick={column.getToggleSortingHandler()}\n className=\"-mx-1.5 inline-flex items-center gap-1 rounded-md px-1.5 py-1 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]\"\n >\n {content}\n {sorted && <HugeiconsIcon icon={SORT_ICON[sorted]} size={12} aria-hidden=\"true\" />}\n {sortPriority !== undefined && (\n <>\n <span aria-hidden=\"true\" className=\"text-[10px] tabular-nums\">\n {sortPriority}\n </span>\n <span className=\"sr-only\">, sort priority {sortPriority}</span>\n </>\n )}\n </button>\n ) : (\n content\n )}\n {/* The filter button sits beside the sort button, not inside it. Its own label joins the header's computed name, as the resize handle's does. */}\n {!header.isPlaceholder && column.getCanFilter() && column.columnDef.meta?.filter && (\n <DataTableColumnFilter column={column} />\n )}\n {column.getCanResize() && <DataTableResizeHandle header={header} />}\n </TableHead>\n );\n};\n\n/** Holds the height of the rows virtualization leaves unrendered above or below the view. */\nconst DataTableVirtualSpacer = ({\n columnCount,\n height,\n}: {\n columnCount: number;\n height: number;\n}): ReactElement => (\n <tr aria-hidden=\"true\" data-slot=\"data-table-virtual-spacer\">\n {/* An inline zero border wins over the body's row divider selector, so the spacer adds no 1px to its height. */}\n <td colSpan={columnCount} className=\"p-0\" style={{ borderWidth: 0, height }} />\n </tr>\n);\n\n// DataTable owns pinning through useDataTable, so the table's own first-column pinning is not offered; it also owns the viewport ref for virtualization.\n/**\n * Props for {@link DataTableContent}: the empty and loading states, plus the props of the underlying table element.\n *\n * @example\n * ```tsx\n * const props: DataTableContentProps = { emptyTitle: 'No users yet' };\n * ```\n * @see DataTableContent\n * @see DataTable\n */\ntype DataTableContentProps = Omit<\n ComponentProps<typeof Table>,\n 'children' | 'fill' | 'stickyFirstColumn' | 'viewportRef'\n> & {\n /** Title for the empty state when filters or search hide every row. It comes with a button that clears them. */\n emptyFilteredTitle?: string;\n /** Icon for the empty state. Defaults to a table icon. */\n emptyIcon?: EmptyStateProps['icon'];\n /** Title for the empty state. */\n emptyTitle?: string;\n /** How many skeleton rows to show while loading. */\n loadingRowCount?: number;\n};\n\n/**\n * The table itself: headers, rows, and the loading and empty states.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({ columns, data, sorting: { mode: 'client' } });\n *\n * <DataTable table={dataTable}>\n * <DataTableContent emptyTitle=\"No users yet\" />\n * </DataTable>\n * ```\n * @returns The rendered table element.\n * @see DataTable\n * @see useDataTable\n * @see DataTablePagination\n */\nconst DataTableContent = ({\n className,\n emptyFilteredTitle = DEFAULT_EMPTY_FILTERED_TITLE,\n emptyIcon = DefaultEmptyIcon,\n emptyTitle = DEFAULT_EMPTY_TITLE,\n loadingRowCount = DEFAULT_LOADING_ROW_COUNT,\n style,\n ...props\n}: DataTableContentProps): ReactElement => {\n const { fill, loading, table, virtualization } = useDataTableContext();\n const viewportRef = useRef<HTMLDivElement>(null);\n // Sticky pinned offsets come from column sizes, which only match rendered widths in fixed layout.\n // Virtualization needs it too: auto layout sizes columns from whichever rows are mounted, so widths would jump while scrolling.\n const hasFixedLayout =\n table.options.enableColumnResizing === true ||\n table.options.enableColumnPinning === true ||\n virtualization !== undefined;\n const columnCount = table.getVisibleLeafColumns().length;\n const { rows } = table.getRowModel();\n const headerGroups = table.getHeaderGroups();\n const headerRowCount = headerGroups.length;\n\n // Loading and empty states keep their plain rows; only real data rows virtualize.\n const isVirtualized = virtualization !== undefined && !loading && rows.length > 0;\n const { estimateRowHeight = 0, overscan = DEFAULT_OVERSCAN } = virtualization ?? {};\n // Row ids keep measured heights attached to their rows when sorting or filtering reorders them.\n // The virtualizer recomputes its measurements whenever this function changes identity, so it changes only with the rows.\n const getItemKey = useCallback((index: number) => rows[index].id, [rows]);\n // Hooks run unconditionally. A zero count alone still listens to scrolling and re-renders, so disable the virtualizer outright when it has no rows to render.\n const virtualizer = useVirtualizer({\n count: isVirtualized ? rows.length : 0,\n enabled: isVirtualized,\n estimateSize: () => estimateRowHeight,\n getItemKey,\n getScrollElement: () => viewportRef.current,\n overscan,\n });\n\n const renderVirtualRows = (): ReactNode => {\n const virtualRows = virtualizer.getVirtualItems();\n const firstRow = virtualRows.at(0);\n const lastRow = virtualRows.at(-1);\n const topHeight = firstRow ? firstRow.start : 0;\n const bottomHeight = lastRow ? virtualizer.getTotalSize() - lastRow.end : 0;\n // Spacer rows, rather than absolutely positioned rows, keep native table layout and the sticky header.\n return (\n <>\n {topHeight > 0 && <DataTableVirtualSpacer columnCount={columnCount} height={topHeight} />}\n {virtualRows.map(({ index }) => {\n const row = rows[index];\n // Group rows are rows of their own and get an index. The virtualizer measures each row when it mounts.\n return (\n <DataTableBodyRow\n key={row.id}\n aria-rowindex={headerRowCount + index + 1}\n columnCount={columnCount}\n data-index={index}\n hasFixedLayout={hasFixedLayout}\n row={row}\n rowRef={virtualizer.measureElement}\n />\n );\n })}\n {bottomHeight > 0 && <DataTableVirtualSpacer columnCount={columnCount} height={bottomHeight} />}\n </>\n );\n };\n\n const renderEmptyRow = (): ReactNode => {\n const { columnFilters, globalFilter } = table.getState();\n if (columnFilters.length === 0 && globalFilter === '') {\n return <DataTableEmptyRow columnCount={columnCount} icon={emptyIcon} title={emptyTitle} />;\n }\n // Both halves change in one tick; useDataTable resolves each against the latest filter state, so neither undoes the other.\n const clearFilters = () => {\n table.setColumnFilters([]);\n table.setGlobalFilter('');\n };\n return (\n <DataTableEmptyRow\n action={\n <Button variant=\"outline\" size=\"sm\" onClick={clearFilters}>\n Clear filters\n </Button>\n }\n columnCount={columnCount}\n icon={emptyIcon}\n title={emptyFilteredTitle}\n />\n );\n };\n\n const renderBody = (): ReactNode => {\n if (loading) return <DataTableSkeletonRows columnCount={columnCount} rowCount={loadingRowCount} />;\n if (rows.length === 0) return renderEmptyRow();\n if (isVirtualized) return renderVirtualRows();\n return rows.map((row) => (\n <DataTableBodyRow\n key={row.id}\n columnCount={columnCount}\n hasFixedLayout={hasFixedLayout}\n row={row}\n />\n ));\n };\n\n return (\n <Table\n fill={fill}\n aria-busy={loading || undefined}\n // Screen readers count the full table, not just the rows in view.\n aria-rowcount={isVirtualized ? rows.length + headerRowCount : undefined}\n // Fixed layout lets set widths win; tables that neither resize nor pin keep sizing to content.\n className={cn(hasFixedLayout && 'w-auto table-fixed', className)}\n style={hasFixedLayout ? { minWidth: '100%', width: table.getTotalSize(), ...style } : style}\n {...props}\n viewportRef={viewportRef}\n >\n <TableHeader>\n {headerGroups.map((headerGroup, headerIndex) => (\n // Header rows come first in the full row count, so the body's indexes continue after them.\n <TableRow key={headerGroup.id} aria-rowindex={isVirtualized ? headerIndex + 1 : undefined}>\n {headerGroup.headers.map((header) => (\n <DataTableHeadCell key={header.id} header={header} hasFixedLayout={hasFixedLayout} />\n ))}\n </TableRow>\n ))}\n </TableHeader>\n <TableBody>{renderBody()}</TableBody>\n </Table>\n );\n};\n\nexport { DataTableContent };\nexport type { DataTableContentProps };\n","'use client';\n\nimport { type ReactElement } from 'react';\n\nimport { CursorPagination } from '../pagination/pagination';\nimport { useDataTableContext } from './data-table-context';\n\n/**\n * Props for {@link DataTablePagination}.\n *\n * @example\n * ```tsx\n * const props: DataTablePaginationProps = { className: 'justify-start' };\n * ```\n * @see DataTablePagination\n * @see useDataTable\n */\ntype DataTablePaginationProps = {\n className?: string;\n};\n\n/**\n * Previous and next buttons beside the visible row range, for client or server pagination. Renders nothing when pagination is off.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({\n * columns,\n * data,\n * pagination: { mode: 'client', pageSize: 25 },\n * });\n *\n * <DataTable table={dataTable}>\n * <DataTableContent />\n * <DataTablePagination />\n * </DataTable>\n * ```\n * @returns The rendered pagination controls, or `null` when pagination is off.\n * @see useDataTable\n * @see DataTable\n */\nconst DataTablePagination = ({\n className,\n}: DataTablePaginationProps): ReactElement | null => {\n const { table } = useDataTableContext();\n // Without a pagination option every row is on one page, so there is nothing to move between.\n if (!table.options.getPaginationRowModel && !table.options.manualPagination) {\n return null;\n }\n\n const { pageIndex, pageSize } = table.getState().pagination;\n const rowCount = table.getRowCount();\n const start = pageIndex * pageSize + 1;\n const end = Math.min((pageIndex + 1) * pageSize, rowCount);\n\n return (\n <CursorPagination\n className={className}\n hasNext={table.getCanNextPage()}\n hasPrevious={table.getCanPreviousPage()}\n label={\n rowCount > 0 ? (\n <>\n <span className=\"text-foreground\">\n {start}–{end}\n </span>{' '}\n of {rowCount}\n </>\n ) : undefined\n }\n onNext={() => table.nextPage()}\n onPrevious={() => table.previousPage()}\n />\n );\n};\n\nexport { DataTablePagination };\nexport type { DataTablePaginationProps };\n","'use client';\n\nimport { Search01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Input } from '../input/input';\nimport { useDataTableContext } from './data-table-context';\n\n/**\n * Props for {@link DataTableSearch}.\n *\n * @example\n * ```tsx\n * const props: DataTableSearchProps = { placeholder: 'Search users' };\n * ```\n * @see DataTableSearch\n * @see DataTableActiveFilters\n */\ntype DataTableSearchProps = {\n className?: string;\n /** Placeholder text, also the field's accessible name. */\n placeholder?: string;\n};\n\n/**\n * A search field that matches its text across the table's columns. Needs `filtering` in `useDataTable`, and renders nothing without it.\n * With manual filtering the app receives the text as `globalFilter` and filters the data itself.\n *\n * @example\n * ```tsx\n * const dataTable = useDataTable({ columns, data, filtering: { mode: 'client' } });\n *\n * <DataTable table={dataTable}>\n * <DataTableToolbar>\n * <DataTableSearch placeholder=\"Search users\" />\n * </DataTableToolbar>\n * <DataTableContent />\n * </DataTable>\n * ```\n * @returns The rendered search field, or nothing when filtering is off.\n * @see DataTableToolbar\n * @see DataTableActiveFilters\n * @see useDataTable\n */\nconst DataTableSearch = ({\n className,\n placeholder = 'Search',\n}: DataTableSearchProps): ReactElement | null => {\n const { table } = useDataTableContext();\n if (!table.options.enableGlobalFilter) return null;\n const { globalFilter } = table.getState();\n\n return (\n <div data-slot=\"data-table-search\" className={cn('relative w-full max-w-64', className)}>\n <HugeiconsIcon\n icon={Search01Icon}\n size={16}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute start-2 top-1/2 -translate-y-1/2 text-muted-foreground/70\"\n />\n <Input\n type=\"search\"\n aria-label={placeholder}\n placeholder={placeholder}\n // The global filter state is untyped in TanStack; useDataTable keeps it a string.\n value={typeof globalFilter === 'string' ? globalFilter : ''}\n onChange={(event) => table.setGlobalFilter(event.target.value)}\n className=\"ps-8\"\n />\n </div>\n );\n};\n\nexport { DataTableSearch };\nexport type { DataTableSearchProps };\n","'use client';\n\nimport { type Dispatch, type SetStateAction, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n type ColumnDef,\n type ColumnFiltersState,\n type ColumnPinningState,\n type ColumnSizingState,\n type ExpandedState,\n type GroupingState,\n type OnChangeFn,\n type PaginationState,\n type RowSelectionState,\n type SortingState,\n type Table,\n type TableOptions,\n type VisibilityState,\n functionalUpdate,\n getCoreRowModel,\n getExpandedRowModel,\n getFacetedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getGroupedRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nimport type {\n DataTableColumnPinningState,\n DataTableFilterState,\n} from './data-table.types';\n\n/** Keeps the pagination state complete when the app has not turned pagination on. */\nconst DEFAULT_PAGE_SIZE = 25;\n/** Columns filter only when they opt in with `meta.filter` (see `withColumnFilters`). A module constant, so the table gets the same object each render. */\nconst DEFAULT_COLUMN = { enableColumnFilter: false };\n\n/** A feature whose state the app owns, for example when the server sorts or pages. `onChange` receives the next state. */\ntype ControlledState<TState> = {\n onChange: (next: TState) => void;\n state: TState;\n};\n\n/** The state and change handler handed to the table for one feature. */\ntype TableFeatureState<TState> = {\n onChange: OnChangeFn<TState>;\n state: TState;\n};\n\n/** A feature whose state the table owns, optionally seeded. */\ntype UncontrolledState<TState> = {\n initial?: TState;\n};\n\ntype FeatureState<TState> = ControlledState<TState> | UncontrolledState<TState>;\n\ntype DataTableSortingOptions =\n | { initial?: SortingState; mode: 'client' }\n | ({ mode: 'manual' } & ControlledState<SortingState>);\n\n/** `client` filters the data in memory; `manual` lets the app filter, usually on the server. */\ntype DataTableFilteringOptions =\n | { initial?: Partial<DataTableFilterState>; mode: 'client' }\n | ({ mode: 'manual' } & ControlledState<DataTableFilterState>);\n\n/**\n * Turns on row virtualization in `DataTableContent`: only the rows in view are rendered, for long client-side lists.\n * `estimateRowHeight` is the expected row height in pixels before rows are measured; `overscan` is how many rows to render beyond the edges of the view.\n * The table needs a bounded height to scroll within: pass `fill` to `DataTable` inside a bounded parent, or a max height through `scrollAreaProps` on `DataTableContent`.\n * Without one, every row is in view and every row renders.\n *\n * @example\n * ```tsx\n * const virtualization: DataTableVirtualization = { estimateRowHeight: 41, overscan: 8 };\n *\n * const dataTable = useDataTable({ columns, data, virtualization });\n * ```\n * @see useDataTable\n * @see DataTableContent\n */\ntype DataTableVirtualization = { estimateRowHeight: number; overscan?: number };\n\ntype DataTablePaginationOptions =\n | { mode: 'client'; pageSize: number }\n | ({ mode: 'manual'; rowCount: number } & ControlledState<PaginationState>);\n\n/**\n * Options for {@link useDataTable}: the rows and columns to show, plus one option per feature to turn on (sorting, filtering, pagination, selection, grouping, column visibility, pinning, sizing and virtualization).\n *\n * @example\n * ```tsx\n * const options: UseDataTableOptions<User> = {\n * columns,\n * data: users,\n * getRowId: (user) => user.id,\n * selection: { initial: {} },\n * sorting: { mode: 'client' },\n * };\n * ```\n * @see useDataTable\n * @see DataTableInstance\n */\ntype UseDataTableOptions<TData> = {\n /**\n * Pin columns to one edge: `left` pins to the start, `right` to the end. Turns pinning on.\n * A table pins to one edge only: pinning a column to the other edge unpins the columns on the first.\n * Pinning switches the table to fixed column widths, so give columns a `size`.\n */\n columnPinning?: FeatureState<DataTableColumnPinningState>;\n /** Column widths. Turns resizing on. */\n columnSizing?: FeatureState<ColumnSizingState>;\n /** Which columns are shown. Columns can always be hidden; this seeds or controls it. */\n columnVisibility?: FeatureState<VisibilityState>;\n // Column helpers type each column by its value; any is how TanStack holds a mixed list.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n columns: ColumnDef<TData, any>[];\n data: TData[];\n /**\n * `client` filters the data in memory; `manual` lets the app filter, usually on the server. Turns search and column filters on.\n * Only columns with `meta.filter` get a column filter.\n * With `manual`, `onChange` fires on every keystroke in the search: store the state right away and debounce the fetch instead.\n * Treat the search text and filter values as untrusted input on the server.\n */\n filtering?: DataTableFilteringOptions;\n /** Stable row ids, so selection survives sorting and refetching. Defaults to the row index. */\n getRowId?: (row: TData, index: number) => string;\n /**\n * Column ids to group rows by. Turns grouping on. Groups start open.\n * While every group is open, groups that appear later open too; collapsing one fixes the open set to the groups shown at that moment.\n */\n grouping?: FeatureState<GroupingState>;\n /** Show skeleton rows instead of data. */\n loading?: boolean;\n /**\n * `client` pages the data in memory; `manual` lets the app fetch each page.\n * With `manual`, client sorting only sorts the current page. With grouping, client pages count group header rows as rows.\n */\n pagination?: DataTablePaginationOptions;\n /** Selected rows by id. Turns selection on. */\n selection?: FeatureState<RowSelectionState>;\n /**\n * `client` sorts the data in memory; `manual` lets the app sort, usually on the server.\n * Shift-click a second header to sort by more than one column.\n */\n sorting?: DataTableSortingOptions;\n /**\n * Render only the rows in view. Use it for long lists without pagination.\n * Needs a bounded table height: `fill` on `DataTable`, or a max height through `scrollAreaProps` on `DataTableContent`.\n */\n virtualization?: DataTableVirtualization;\n};\n\n/**\n * The value `useDataTable` returns. Pass it to `DataTable` as `table`; it holds the table state and the loading flag.\n *\n * @example\n * ```tsx\n * const dataTable: DataTableInstance<User> = useDataTable({ columns, data });\n *\n * return <DataTable table={dataTable}>...</DataTable>;\n * ```\n * @see useDataTable\n * @see DataTable\n */\ntype DataTableInstance<TData> = {\n loading: boolean;\n table: Table<TData>;\n virtualization: DataTableVirtualization | undefined;\n};\n\nconst isControlled = <TState>(\n feature: FeatureState<TState> | undefined\n): feature is ControlledState<TState> =>\n feature !== undefined && 'state' in feature;\n\n/**\n * A table pins to one edge only, so when a change leaves columns on both edges, keep the edge that just gained a column and unpin the other.\n * When it is not only the end edge that gained, the start edge wins.\n */\nconst toOneEdge = ({\n next,\n previous,\n}: {\n next: ColumnPinningState;\n previous: ColumnPinningState;\n}): DataTableColumnPinningState => {\n const left = next.left ?? [];\n const right = next.right ?? [];\n if (left.length > 0 && right.length > 0) {\n const previousLeft = previous.left ?? [];\n const previousRight = previous.right ?? [];\n const onlyEndGained =\n right.some((id) => !previousRight.includes(id)) &&\n left.every((id) => previousLeft.includes(id));\n return onlyEndGained ? { right } : { left };\n }\n return right.length > 0 ? { right } : { left };\n};\n\nconst getInitialState = <TState>({\n fallback,\n feature,\n}: {\n fallback: TState;\n feature: FeatureState<TState> | undefined;\n}): TState =>\n feature && !isControlled(feature) ? (feature.initial ?? fallback) : fallback;\n\n/** The table hands over updaters; the app expects the next value, resolved against its current state. */\nconst toTableFeatureState = <TState>(\n feature: ControlledState<TState>\n): TableFeatureState<TState> => ({\n onChange: (updater) => feature.onChange(functionalUpdate(updater, feature.state)),\n state: feature.state,\n});\n\n/** Use the app's state when it owns the feature, otherwise the table's own. */\nconst resolveFeatureState = <TState>({\n feature,\n internal,\n setInternal,\n}: {\n feature: FeatureState<TState> | undefined;\n internal: TState;\n setInternal: OnChangeFn<TState>;\n}): TableFeatureState<TState> =>\n isControlled(feature)\n ? toTableFeatureState(feature)\n : { onChange: setInternal, state: internal };\n\n/**\n * Matches a row when its value is one of the checked values, or, for a list value, when any item is.\n * TanStack's `arrIncludesSome` calls `includes` on the row value, which matches substrings of strings and throws on numbers.\n * Clearing every value removes the filter.\n */\nconst includesSomeValue = Object.assign(\n (\n row: { getValue: (columnId: string) => unknown },\n columnId: string,\n filterValue: string[]\n ): boolean => {\n const value = row.getValue(columnId);\n return Array.isArray(value)\n ? value.some((item) => filterValue.includes(String(item)))\n : filterValue.includes(String(value));\n },\n {\n autoRemove: (value: unknown): boolean =>\n !Array.isArray(value) || value.length === 0,\n }\n);\n\n/**\n * Give each column with `meta.filter` a matching filter function and let it filter, recursing into column groups.\n * TanStack's `auto` filter guesses from the first row's value, so a checklist of values over string cells would get a string filter.\n */\nconst withColumnFilters = <TData>(\n columns: ColumnDef<TData, unknown>[]\n): ColumnDef<TData, unknown>[] =>\n columns.map((column) => {\n const withGroups =\n 'columns' in column && column.columns\n ? { ...column, columns: withColumnFilters(column.columns) }\n : column;\n const filter = column.meta?.filter;\n if (!filter) {\n return withGroups;\n }\n return {\n ...withGroups,\n // An app can still turn a column's filter off, or bring its own filter function.\n enableColumnFilter: column.enableColumnFilter ?? true,\n filterFn:\n column.filterFn ??\n (filter === 'values' ? includesSomeValue : 'includesString'),\n };\n });\n\n/** The filters a table starts with: the app's seed for client filtering, nothing otherwise. */\nconst getInitialFilters = ({\n filtering,\n}: {\n filtering: DataTableFilteringOptions | undefined;\n}): DataTableFilterState => {\n const initial = filtering?.mode === 'client' ? filtering.initial : undefined;\n return {\n columnFilters: initial?.columnFilters ?? [],\n globalFilter: initial?.globalFilter ?? '',\n };\n};\n\n/** The current filters and the handlers the table calls to change them. */\ntype UseFilterStateResult = {\n filterState: DataTableFilterState;\n handleColumnFiltersChange: OnChangeFn<ColumnFiltersState>;\n handleGlobalFilterChange: OnChangeFn<string>;\n};\n\n/**\n * Filter state and change handlers for search and column filters, which share one state.\n * `onFiltersChange` runs after every change, so the caller can react to it (pagination returns to the first page).\n */\nconst useFilterState = ({\n filtering,\n onFiltersChange,\n}: {\n filtering: DataTableFilteringOptions | undefined;\n onFiltersChange: () => void;\n}): UseFilterStateResult => {\n const [internalFilters, setInternalFilters] = useState<DataTableFilterState>(() => getInitialFilters({ filtering }));\n const manual = filtering?.mode === 'manual' ? filtering : undefined;\n // Manual filters resolve against the latest value handed to the app, not the last render's state:\n // two changes in one tick (clear column filters, then clear search) would otherwise each start from\n // the same stale state and the second would bring back what the first cleared.\n // Every render resyncs it from the app's state.\n const latestManualFilters = useRef<DataTableFilterState | undefined>(undefined);\n latestManualFilters.current = manual?.state;\n\n // Column filters and search share one state, so each change updates its half against the latest value.\n const updateFilters: OnChangeFn<DataTableFilterState> = (updater) => {\n if (manual) {\n const next = functionalUpdate(updater, latestManualFilters.current ?? manual.state);\n latestManualFilters.current = next;\n manual.onChange(next);\n } else {\n setInternalFilters(updater);\n }\n onFiltersChange();\n };\n\n return {\n filterState: manual ? manual.state : internalFilters,\n handleColumnFiltersChange: (updater) =>\n updateFilters((old) => ({\n ...old,\n columnFilters: functionalUpdate(updater, old.columnFilters),\n })),\n handleGlobalFilterChange: (updater) =>\n updateFilters((old) => ({\n ...old,\n // Resetting the search hands over undefined; keep the state a string.\n globalFilter: functionalUpdate(updater, old.globalFilter) ?? '',\n })),\n };\n};\n\n/** Pinning state where every change goes through toOneEdge, so the table and a controlled onChange only ever see one pinned edge. */\nconst resolvePinningState = ({\n columnPinning,\n internal,\n setInternal,\n}: {\n columnPinning: FeatureState<DataTableColumnPinningState> | undefined;\n internal: DataTableColumnPinningState;\n setInternal: Dispatch<SetStateAction<DataTableColumnPinningState>>;\n}): TableFeatureState<ColumnPinningState> => {\n if (isControlled(columnPinning)) {\n return {\n onChange: (updater) =>\n columnPinning.onChange(\n toOneEdge({\n next: functionalUpdate<ColumnPinningState>(updater, columnPinning.state),\n previous: columnPinning.state,\n })\n ),\n state: columnPinning.state,\n };\n }\n return {\n onChange: (updater) =>\n setInternal((old) =>\n toOneEdge({\n next: functionalUpdate<ColumnPinningState>(updater, old),\n previous: old,\n })\n ),\n state: internal,\n };\n};\n\n/** Row models for the features the table runs in memory; manual features leave their step to the app. */\nconst getRowModels = <TData>({\n filtering,\n grouping,\n pagination,\n sorting,\n}: Pick<UseDataTableOptions<TData>, 'filtering' | 'grouping' | 'pagination' | 'sorting'>): Pick<\n TableOptions<TData>,\n | 'getExpandedRowModel'\n | 'getFacetedRowModel'\n | 'getFacetedUniqueValues'\n | 'getFilteredRowModel'\n | 'getGroupedRowModel'\n | 'getPaginationRowModel'\n | 'getSortedRowModel'\n> => {\n const clientFiltering = filtering?.mode === 'client';\n return {\n getExpandedRowModel: grouping ? getExpandedRowModel<TData>() : undefined,\n getFacetedRowModel: clientFiltering ? getFacetedRowModel<TData>() : undefined,\n getFacetedUniqueValues: clientFiltering ? getFacetedUniqueValues<TData>() : undefined,\n getFilteredRowModel: clientFiltering ? getFilteredRowModel<TData>() : undefined,\n getGroupedRowModel: grouping ? getGroupedRowModel<TData>() : undefined,\n getPaginationRowModel: pagination?.mode === 'client' ? getPaginationRowModel<TData>() : undefined,\n getSortedRowModel: sorting?.mode === 'client' ? getSortedRowModel<TData>() : undefined,\n };\n};\n\n/**\n * Page resets are off (see autoResetPageIndex), so when the data shrinks the page can run past the end.\n * Clamping only when out of range keeps a fresh data array each render from looping.\n */\nconst useClampedPageIndex = <TData>({\n isClientPagination,\n pageIndex,\n table,\n}: {\n isClientPagination: boolean;\n pageIndex: number;\n table: Table<TData>;\n}): void => {\n const lastPageIndex = Math.max(0, table.getPageCount() - 1);\n useEffect(() => {\n if (isClientPagination && pageIndex > lastPageIndex) {\n table.setPageIndex(lastPageIndex);\n }\n }, [isClientPagination, lastPageIndex, pageIndex, table]);\n};\n\n/**\n * Create the state for a `DataTable`. Each feature stays off until its option is passed.\n * Pass `{ state, onChange }` to own a feature's state, or `mode: 'manual'` for server-driven sorting and pagination.\n * `onChange` receives the next state, ready to store.\n *\n * @example\n * const dataTable = useDataTable({\n * columns,\n * data,\n * pagination: { mode: 'client', pageSize: 25 },\n * sorting: { mode: 'client' },\n * });\n *\n * <DataTable table={dataTable}>\n * <DataTableContent />\n * <DataTablePagination />\n * </DataTable>\n * @returns A table instance to pass to `DataTable` as `table`.\n * @see UseDataTableOptions\n * @see DataTable\n * @see DataTableContent\n */\nconst useDataTable = <TData>({\n columnPinning,\n columnSizing,\n columnVisibility,\n columns,\n data,\n filtering,\n getRowId,\n grouping,\n loading = false,\n pagination,\n selection,\n sorting,\n virtualization,\n}: UseDataTableOptions<TData>): DataTableInstance<TData> => {\n const [internalSorting, setInternalSorting] = useState<SortingState>(\n sorting?.mode === 'client' ? (sorting.initial ?? []) : []\n );\n const [internalPagination, setInternalPagination] = useState<PaginationState>({\n pageIndex: 0,\n pageSize: pagination?.mode === 'client' ? pagination.pageSize : DEFAULT_PAGE_SIZE,\n });\n const [internalSelection, setInternalSelection] = useState<RowSelectionState>(\n getInitialState({ fallback: {}, feature: selection })\n );\n const [internalVisibility, setInternalVisibility] = useState<VisibilityState>(\n getInitialState({ fallback: {}, feature: columnVisibility })\n );\n const [internalPinning, setInternalPinning] =\n useState<DataTableColumnPinningState>(\n getInitialState({ fallback: { left: [] }, feature: columnPinning })\n );\n const [internalSizing, setInternalSizing] = useState<ColumnSizingState>(\n getInitialState({ fallback: {}, feature: columnSizing })\n );\n // Which groups are open. The table owns it, and groups start open.\n const [expandedGroups, setExpandedGroups] = useState<ExpandedState>(true);\n const [internalGrouping, setInternalGrouping] = useState<GroupingState>(\n getInitialState({ fallback: [], feature: grouping })\n );\n\n // TanStack rebuilds every column when the columns option changes identity, so only rebuild when the app's columns do.\n const tableColumns = useMemo(() => withColumnFilters(columns), [columns]);\n\n const isClientPagination = pagination?.mode === 'client';\n const handleClientSortingChange: OnChangeFn<SortingState> = (updater) => {\n setInternalSorting(updater);\n // A new order makes the current page meaningless, so start again from the first page.\n if (isClientPagination) {\n setInternalPagination((old) => ({ ...old, pageIndex: 0 }));\n }\n };\n\n const { filterState, handleColumnFiltersChange, handleGlobalFilterChange } = useFilterState({\n filtering,\n // Filtering changes which rows exist, so start again from the first page.\n onFiltersChange: () => {\n if (isClientPagination) setInternalPagination((old) => ({ ...old, pageIndex: 0 }));\n },\n });\n\n const sortingState: TableFeatureState<SortingState> =\n sorting?.mode === 'manual'\n ? toTableFeatureState(sorting)\n : { onChange: handleClientSortingChange, state: internalSorting };\n const paginationState: TableFeatureState<PaginationState> =\n pagination?.mode === 'manual'\n ? toTableFeatureState(pagination)\n : { onChange: setInternalPagination, state: internalPagination };\n const selectionState = resolveFeatureState({\n feature: selection,\n internal: internalSelection,\n setInternal: setInternalSelection,\n });\n const visibilityState = resolveFeatureState({\n feature: columnVisibility,\n internal: internalVisibility,\n setInternal: setInternalVisibility,\n });\n const pinningState = resolvePinningState({\n columnPinning,\n internal: internalPinning,\n setInternal: setInternalPinning,\n });\n const sizingState = resolveFeatureState({\n feature: columnSizing,\n internal: internalSizing,\n setInternal: setInternalSizing,\n });\n const groupingState = resolveFeatureState({\n feature: grouping,\n internal: internalGrouping,\n setInternal: setInternalGrouping,\n });\n\n const table = useReactTable({\n // Apps often pass a fresh data array each render. Regrouping on each one would reset the expanded rows,\n // closing every group, and resetting the page would loop, so both resets stay off.\n autoResetExpanded: false,\n autoResetPageIndex: false,\n columnResizeMode: 'onChange',\n columns: tableColumns,\n data,\n defaultColumn: DEFAULT_COLUMN,\n enableColumnFilters: filtering !== undefined,\n enableColumnPinning: columnPinning !== undefined,\n enableColumnResizing: columnSizing !== undefined,\n enableExpanding: grouping !== undefined,\n enableGlobalFilter: filtering !== undefined,\n enableGrouping: grouping !== undefined,\n // Group rows hold no data of their own and render without a checkbox. Selecting all would otherwise store their ids,\n // and since they never count as selected, the select-all checkbox would never read checked.\n enableRowSelection:\n selection === undefined ? false : (row) => !row.getIsGrouped(),\n // Multi-sort uses TanStack's default trigger: shift-click a second header to add a sort rule.\n enableSorting: sorting !== undefined,\n getCoreRowModel: getCoreRowModel(),\n ...getRowModels<TData>({ filtering, grouping, pagination, sorting }),\n getRowId,\n // Keep grouped columns where the app placed them instead of moving them to the start.\n groupedColumnMode: false,\n manualFiltering: filtering?.mode === 'manual',\n manualPagination: pagination?.mode === 'manual',\n manualSorting: sorting?.mode === 'manual',\n onColumnFiltersChange: handleColumnFiltersChange,\n onColumnPinningChange: pinningState.onChange,\n onColumnSizingChange: sizingState.onChange,\n onColumnVisibilityChange: visibilityState.onChange,\n onExpandedChange: setExpandedGroups,\n onGlobalFilterChange: handleGlobalFilterChange,\n onGroupingChange: groupingState.onChange,\n onPaginationChange: paginationState.onChange,\n onRowSelectionChange: selectionState.onChange,\n onSortingChange: sortingState.onChange,\n rowCount: pagination?.mode === 'manual' ? pagination.rowCount : undefined,\n state: {\n columnFilters: filterState.columnFilters,\n columnPinning: pinningState.state,\n columnSizing: sizingState.state,\n columnVisibility: visibilityState.state,\n expanded: expandedGroups,\n globalFilter: filterState.globalFilter,\n grouping: groupingState.state,\n pagination: paginationState.state,\n rowSelection: selectionState.state,\n sorting: sortingState.state,\n },\n });\n\n useClampedPageIndex({ isClientPagination, pageIndex: paginationState.state.pageIndex, table });\n\n return { loading, table, virtualization };\n};\n\nexport { useDataTable };\nexport type {\n DataTableInstance,\n DataTableVirtualization,\n UseDataTableOptions,\n};\n","'use client';\n\nimport {\n type ComponentProps,\n type ComponentRef,\n type ReactElement,\n forwardRef,\n} from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '../../../lib/utils';\n\nconst Tabs = ({\n className,\n orientation = 'horizontal',\n ...props\n}: ComponentProps<typeof TabsPrimitive.Root>): ReactElement => {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'group/tabs flex gap-2 data-[orientation=horizontal]:flex-col',\n className\n )}\n {...props}\n />\n );\n};\n\nconst tabsListVariants = cva(\n 'rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col',\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: 'bg-muted',\n line: 'gap-1 bg-transparent',\n navigation: 'group-data-[orientation=horizontal]/tabs:h-auto w-full justify-start gap-5 rounded-none border-b border-border-divider bg-transparent p-0',\n },\n },\n }\n);\n\n// forwardRef (not ref-as-prop) so callers measuring the list still work\n// under React 18, where a function component cannot receive a ref prop.\nconst TabsList = forwardRef<\n ComponentRef<typeof TabsPrimitive.List>,\n ComponentProps<typeof TabsPrimitive.List> &\n VariantProps<typeof tabsListVariants>\n>(({ className, variant = 'default', ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n data-slot=\"tabs-list\"\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = ({\n className,\n ...props\n}: ComponentProps<typeof TabsPrimitive.Trigger>): ReactElement => {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap touch-manipulation transition-[color,background-color,border-color,box-shadow,opacity] duration-150 motion-reduce:transition-none group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent',\n 'data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground',\n 'after:bg-foreground after:absolute after:opacity-0 after:transition-[opacity] after:motion-reduce:transition-none group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100',\n 'group-data-[variant=navigation]/tabs-list:h-11 group-data-[variant=navigation]/tabs-list:flex-none group-data-[variant=navigation]/tabs-list:rounded-none group-data-[variant=navigation]/tabs-list:border-0 group-data-[variant=navigation]/tabs-list:bg-transparent group-data-[variant=navigation]/tabs-list:px-0 group-data-[variant=navigation]/tabs-list:py-0 group-data-[variant=navigation]/tabs-list:text-sm group-data-[variant=navigation]/tabs-list:font-normal group-data-[variant=navigation]/tabs-list:after:hidden group-data-[variant=navigation]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=navigation]/tabs-list:data-[state=active]:bg-transparent',\n className\n )}\n {...props}\n />\n );\n};\n\nconst TabsContent = ({\n className,\n ...props\n}: ComponentProps<typeof TabsPrimitive.Content>): ReactElement => {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\n 'flex-1 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:rounded-md',\n className\n )}\n {...props}\n />\n );\n};\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };\n","'use client';\n\nimport { type ComponentProps, type KeyboardEvent, type ReactElement, createContext, useCallback, useContext, useId, useMemo, useRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ntype ToggleGroupSingleContext = {\n disabled: boolean;\n groupId: string;\n onValueChange: (value: string) => void;\n type: 'single';\n value: string;\n};\n\ntype ToggleGroupMultipleContext = {\n disabled: boolean;\n groupId: string;\n onValueChange: (value: string[]) => void;\n type: 'multiple';\n value: string[];\n};\n\ntype ToggleGroupContextValue =\n | ToggleGroupSingleContext\n | ToggleGroupMultipleContext;\n\nconst ToggleGroupContext = createContext<ToggleGroupContextValue | null>(null);\n\nconst useToggleGroupContext = (): ToggleGroupContextValue => {\n const ctx = useContext(ToggleGroupContext);\n if (!ctx) {\n // eslint-disable-next-line no-restricted-syntax -- dev-time invariant guard; a \"used outside provider\" check doesn't warrant a domain BaseError class\n throw new Error('ToggleGroupItem must be used inside a ToggleGroup');\n }\n return ctx;\n};\n\n// ---------------------------------------------------------------------------\n// Prop types\n// ---------------------------------------------------------------------------\n\n/** Props for a single-select ToggleGroup. */\ntype ToggleGroupSingleProps = {\n /** Fired when the selected value changes. */\n onValueChange: (value: string) => void;\n type: 'single';\n /** The currently selected value. */\n value: string;\n};\n\n/** Props for a multi-select ToggleGroup. */\ntype ToggleGroupMultipleProps = {\n /** Fired when the selected values change. */\n onValueChange: (value: string[]) => void;\n type: 'multiple';\n /** The currently selected values. */\n value: string[];\n};\n\ntype ToggleGroupBaseProps = {\n children?: React.ReactNode;\n className?: string;\n /** Disables all items in the group. */\n disabled?: boolean;\n};\n\n/** Combined props for ToggleGroup. */\ntype ToggleGroupProps = ToggleGroupBaseProps &\n (ToggleGroupSingleProps | ToggleGroupMultipleProps);\n\n/** Props for ToggleGroupItem. */\ntype ToggleGroupItemProps = ComponentProps<'button'> & {\n /** Overrides the group-level disabled state for this item. */\n disabled?: boolean;\n /** The value this item represents. Must match a value in the parent group. */\n value: string;\n};\n\n// ---------------------------------------------------------------------------\n// ToggleGroup\n// ---------------------------------------------------------------------------\n\n/**\n * Segmented control container that manages single or multiple selection.\n * Renders a rounded pill-track styled with the muted background token.\n * Provides context and implements roving keyboard navigation across items.\n *\n * @example\n * // Single selection\n * <ToggleGroup type=\"single\" value={view} onValueChange={setView}>\n * <ToggleGroupItem value=\"day\">Day</ToggleGroupItem>\n * <ToggleGroupItem value=\"week\">Week</ToggleGroupItem>\n * </ToggleGroup>\n *\n * @example\n * // Multiple selection\n * <ToggleGroup type=\"multiple\" value={formats} onValueChange={setFormats}>\n * <ToggleGroupItem value=\"bold\">B</ToggleGroupItem>\n * <ToggleGroupItem value=\"italic\">I</ToggleGroupItem>\n * </ToggleGroup>\n */\nconst ToggleGroup = ({\n type,\n value,\n onValueChange,\n disabled = false,\n className,\n children,\n ...props\n}: ToggleGroupProps): ReactElement => {\n const groupId = useId();\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Roving keyboard navigation: Arrow keys move focus between enabled buttons.\n const handleKeyDown = useCallback((e: KeyboardEvent<HTMLDivElement>) => {\n const container = containerRef.current;\n if (!container) return;\n\n const items = Array.from(\n container.querySelectorAll<HTMLButtonElement>(\n 'button[data-slot=\"toggle-group-item\"]:not([disabled])'\n )\n );\n if (items.length === 0) return;\n\n const focused = document.activeElement as HTMLButtonElement;\n const idx = items.indexOf(focused);\n\n let next: number;\n\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n e.preventDefault();\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n e.preventDefault();\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n e.preventDefault();\n next = 0;\n } else if (e.key === 'End') {\n e.preventDefault();\n next = items.length - 1;\n } else {\n return;\n }\n\n items[next]?.focus();\n }, []);\n\n const contextValue: ToggleGroupContextValue = useMemo(\n () =>\n type === 'single'\n ? {\n disabled,\n groupId,\n onValueChange: onValueChange as (v: string) => void,\n type: 'single',\n value: value as string,\n }\n : {\n disabled,\n groupId,\n onValueChange: onValueChange as (v: string[]) => void,\n type: 'multiple',\n value: value as string[],\n },\n [disabled, groupId, onValueChange, type, value]\n );\n\n return (\n <ToggleGroupContext.Provider value={contextValue}>\n <div\n ref={containerRef}\n data-slot=\"toggle-group\"\n role={type === 'single' ? 'radiogroup' : 'toolbar'}\n onKeyDown={handleKeyDown}\n className={cn(\n 'inline-flex items-center rounded-lg bg-muted p-[3px] gap-0.5',\n disabled && 'opacity-50 pointer-events-none',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </ToggleGroupContext.Provider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// ToggleGroupItem\n// ---------------------------------------------------------------------------\n\n/**\n * An individual button within a ToggleGroup.\n * Reads context to determine selection state and fires the appropriate\n * onValueChange callback on click. Mirrors the elevated/pill styling of\n * the active tab trigger (bg-background + shadow) when selected.\n */\nconst ToggleGroupItem = ({\n value,\n disabled,\n className,\n children,\n onClick,\n ...props\n}: ToggleGroupItemProps): ReactElement => {\n const ctx = useToggleGroupContext();\n\n const isDisabled = disabled ?? ctx.disabled;\n\n const isActive =\n ctx.type === 'single' ? ctx.value === value : ctx.value.includes(value);\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (isDisabled) return;\n\n if (ctx.type === 'single') {\n // In single mode, clicking the already-active value keeps it selected.\n if (ctx.value !== value) {\n ctx.onValueChange(value);\n }\n } else {\n // In multiple mode, toggle the value in/out of the array.\n const next = ctx.value.includes(value)\n ? ctx.value.filter((v) => v !== value)\n : [...ctx.value, value];\n ctx.onValueChange(next);\n }\n\n onClick?.(e);\n };\n\n // Roving tabIndex: only the active (or first) item is reachable via Tab.\n // For multiple-select there is no single \"active\" item so we use first-in-group\n // logic: the first item keeps tabIndex=0 when nothing is selected.\n const tabIndex = isActive ? 0 : -1;\n\n const sharedButtonProps = {\n className: cn(\n // Compact segmented-control height (matches Tabs); the parent track keeps it\n // tappable. Use a taller size variant if a touch-first surface needs 44px.\n 'relative inline-flex h-8 flex-1 items-center justify-center gap-1.5',\n 'rounded-md px-3 text-sm font-medium whitespace-nowrap',\n // Cursor\n 'cursor-pointer',\n // Inactive colour\n 'text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground',\n // Transition — ease-out matches design system, motion-reduce honours OS setting.\n 'transition-[color,background-color,box-shadow] duration-150 ease-out motion-reduce:transition-none',\n // Active (selected) state mirrors tabs trigger active styling.\n 'data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm',\n 'dark:data-[state=on]:bg-input/30 dark:data-[state=on]:text-foreground dark:data-[state=on]:border dark:data-[state=on]:border-input',\n // Focus ring\n 'focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',\n // Disabled\n 'disabled:pointer-events-none disabled:opacity-50',\n // SVG children\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n ),\n 'data-slot': 'toggle-group-item' as const,\n 'data-state': isActive ? ('on' as const) : ('off' as const),\n disabled: isDisabled,\n onClick: handleClick,\n\n // tabIndex drives roving focus; keyboard nav updates focus programmatically.\n tabIndex,\n\n type: 'button' as const,\n };\n\n if (ctx.type === 'single') {\n return (\n <button\n {...sharedButtonProps}\n role=\"radio\"\n aria-checked={isActive}\n // Associate with the radiogroup by name so ATs announce group context.\n name={ctx.groupId}\n {...props}\n >\n {children}\n </button>\n );\n }\n\n return (\n <button {...sharedButtonProps} aria-pressed={isActive} {...props}>\n {children}\n </button>\n );\n};\n\nexport { ToggleGroup, ToggleGroupItem };\nexport type { ToggleGroupProps, ToggleGroupItemProps };\n","import { type ComponentProps, type ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst Textarea = ({\n className,\n ...props\n}: ComponentProps<'textarea'>): ReactElement => {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground/60 dark:bg-input/30 flex field-sizing-content min-h-20 w-full touch-manipulation rounded-md border-0 bg-background px-3 py-2 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_var(--ring-halo,#0072EF26)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)]',\n className\n )}\n {...props}\n />\n );\n};\n\nexport { Textarea };\n","'use client';\n\nimport {\n Arrow,\n Content,\n Portal,\n Provider,\n Root,\n Trigger,\n} from '@radix-ui/react-tooltip';\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nconst TooltipProvider = Provider;\n\nconst Tooltip = Root;\n\nconst TooltipTrigger = Trigger;\n\n// Motion lives in globals.css under [data-slot='tooltip-content'], keyed off Radix's delayed-open, instant-open and closed states.\nconst TooltipContent = forwardRef<\n ComponentRef<typeof Content>,\n ComponentPropsWithoutRef<typeof Content>\n>(({ children, className, sideOffset = 4, ...props }, ref) => (\n <Portal>\n <Content\n ref={ref}\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n // 24px tall with 6px corners: compact for a label. A 1px inner highlight on the top edge catches the light.\n 'z-50 max-w-xs rounded-[6px] bg-[var(--tooltip-bg)] px-2 py-1 text-xs leading-4 font-medium text-balance text-[var(--tooltip-fg)] shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08)] [filter:var(--tooltip-drop)]',\n className\n )}\n {...props}\n >\n {children}\n {/* A soft-tipped triangle in the surface colour; 1px of overlap hides the seam, and the drop-shadow wraps it with the body. */}\n <Arrow asChild height={5} width={10}>\n <svg\n aria-hidden=\"true\"\n className=\"-translate-y-px fill-[var(--tooltip-bg)]\"\n viewBox=\"0 0 10 5\"\n >\n <path d=\"M0 0H10L5.88 4.12a1.25 1.25 0 0 1-1.76 0Z\" />\n </svg>\n </Arrow>\n </Content>\n </Portal>\n));\nTooltipContent.displayName = Content.displayName;\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n","import type { ReactElement } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nconst aliases: Record<string, string> = {\n arbitrum: 'arb',\n 'arbitrum-one': 'arb',\n 'arbitrum-sepolia': 'arb',\n avalanche: 'avax',\n 'base-sepolia': 'base',\n 'binance-smart-chain': 'bnb',\n bitcoin: 'btc',\n 'bitcoin-mainnet': 'btc',\n 'bitcoin-testnet': 'btc',\n bsc: 'bnb',\n cosmos: 'atom',\n 'cosmos-hub': 'atom',\n 'cosmos-testnet': 'atom',\n ethereum: 'eth',\n fantom: 'ftm',\n gnosis: 'gnosis',\n linea: 'linea',\n mantle: 'mantle',\n optimism: 'optimism',\n osmosis: 'osmo',\n polygon: 'matic',\n 'polygon-amoy': 'matic',\n scroll: 'scroll',\n sei: 'sei',\n 'sei-network': 'sei',\n sepolia: 'eth',\n solana: 'sol',\n 'solana-devnet': 'sol',\n 'solana-mainnet': 'sol',\n starknet: 'generic',\n sui: 'sui',\n zksync: 'zkevm',\n};\n\nexport interface AssetIconProps {\n className?: string;\n size?: number;\n symbol: string;\n}\n\nexport const AssetIcon = ({\n symbol,\n size = 32,\n className,\n}: AssetIconProps): ReactElement => {\n const resolved = aliases[symbol.toLowerCase()] ?? symbol.toLowerCase();\n return (\n <img\n src={`/assets/${resolved}.svg`}\n alt={symbol}\n width={size}\n height={size}\n className={cn('object-contain', className)}\n onError={(e) => {\n const target = e.currentTarget;\n if (!target.src.endsWith('/assets/generic.svg')) {\n target.src = '/assets/generic.svg';\n }\n }}\n />\n );\n};\n","'use client';\n\nimport { type ReactElement, useEffect, useRef, useState } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { AlertCircleIcon, Copy01Icon } from '@hugeicons/core-free-icons';\nimport { type Transition, motion, useReducedMotion } from 'motion/react';\n\nimport { Button } from '../ui/button';\nimport { CheckIcon } from '../ui/check-icon/check-icon';\nimport { cn } from '../../lib/utils';\n\n/* ─────────────────────────────────────────────────────────\n * ANIMATION STORYBOARD\n *\n * Read top-to-bottom. Each value is ms after feedback begins.\n *\n * 0ms copy icon fades out while feedback icon scales 0.25 → 1 out of a 4px blur (the checkbox's entrance)\n * 0ms the check's stroke draws on over 250ms, like the checkbox's check\n * 0ms label crossfades and translates 2px → 0\n * 1000ms success resets with a quiet opacity transition\n * 2000ms failure resets the same way; it stays longer so it can be read and retried\n * +120ms invisible feedback layers prepare for the next entrance\n * ───────────────────────────────────────────────────────── */\nconst TIMING = {\n // Time a failure remains visible; it needs reading and maybe a retry.\n errorHold: 2000,\n // Duration of the semantic icon transition, matching the checkbox's 200ms.\n iconSwap: 200,\n // Duration of the quieter automatic reset.\n reset: 120,\n // Time success remains visible: long enough to register, short enough that the next copy is never kept waiting.\n successHold: 1000,\n};\n\nconst COPY_STAGE = {\n copied: 1,\n error: 2,\n idle: 0,\n} as const;\n\ntype CopyStage = (typeof COPY_STAGE)[keyof typeof COPY_STAGE];\n\nconst ICON = {\n // Resting blur and scale for the visible icon.\n activeBlur: 'blur(0px)',\n activeScale: 1,\n // Feedback icons grow in out of a blur, the same entrance as the checkbox's check.\n inactiveBlur: 'blur(4px)',\n inactiveScale: 0.25,\n // The checkbox's transition: 200ms on Tailwind's default ease.\n transition: {\n duration: TIMING.iconSwap / 1000,\n ease: [0.4, 0, 0.2, 1] as const,\n },\n};\n\nconst LABEL = {\n // Resting vertical position for the visible label.\n activeOffset: 0,\n // Subtle offset used during the label crossfade.\n inactiveOffset: 2,\n spring: {\n bounce: 0,\n type: 'spring' as const,\n visualDuration: TIMING.iconSwap / 1000,\n },\n};\n\nconst RESET_TRANSITION = {\n duration: TIMING.reset / 1000,\n ease: 'easeOut' as const,\n};\n\n// Prepare hidden geometry only after the fade so the reset never visibly snaps.\nconst HIDDEN_RESET_TRANSITION = {\n delay: TIMING.reset / 1000,\n duration: 0,\n};\n\nconst ICON_RESET_TRANSITION = {\n filter: HIDDEN_RESET_TRANSITION,\n opacity: RESET_TRANSITION,\n scale: HIDDEN_RESET_TRANSITION,\n};\n\nconst LABEL_RESET_TRANSITION = {\n opacity: RESET_TRANSITION,\n y: HIDDEN_RESET_TRANSITION,\n};\n\nconst REDUCED_MOTION_TRANSITION = { duration: 0 };\n\nexport type CopyButtonProps = {\n /** Names an icon-only button for screen readers while idle, without showing text. Defaults to `label`, then \"Copy to clipboard\". */\n ariaLabel?: string;\n className?: string;\n label?: string;\n size?: 'default' | 'sm' | 'xs' | 'icon' | 'icon-xs' | 'icon-sm';\n value: string;\n variant?: 'default' | 'outline' | 'ghost' | 'secondary';\n};\n\n/** Copies a value and presents stable, accessible success or failure feedback. */\nexport const CopyButton = ({\n value,\n ariaLabel: idleAriaLabel,\n label,\n variant = 'outline',\n size = 'icon-xs',\n className,\n}: CopyButtonProps): ReactElement => {\n const [stage, setStage] = useState<CopyStage>(COPY_STAGE.idle);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n // Only the latest clipboard request may update feedback when writes settle out of order.\n const requestIdRef = useRef(0);\n const shouldReduceMotion = useReducedMotion();\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n };\n }, []);\n\n const showFeedback = (nextStage: CopyStage): void => {\n setStage(nextStage);\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(\n () => setStage(COPY_STAGE.idle),\n nextStage === COPY_STAGE.error ? TIMING.errorHold : TIMING.successHold,\n );\n };\n\n const handleCopy = async (): Promise<void> => {\n const requestId = ++requestIdRef.current;\n try {\n await navigator.clipboard.writeText(value);\n if (requestId === requestIdRef.current) showFeedback(COPY_STAGE.copied);\n } catch {\n if (requestId === requestIdRef.current) showFeedback(COPY_STAGE.error);\n }\n };\n\n // Empty labels cannot name the icon-only button.\n let ariaLabel = idleAriaLabel || label || 'Copy to clipboard';\n let announcement = '';\n if (stage === COPY_STAGE.copied) {\n ariaLabel = 'Copied';\n announcement = 'Copied to clipboard';\n } else if (stage === COPY_STAGE.error) {\n ariaLabel = 'Copy failed';\n announcement = 'Copy failed';\n }\n\n let iconTransition: Transition = ICON.transition;\n let labelTransition: Transition = LABEL.spring;\n if (stage === COPY_STAGE.idle) {\n iconTransition = ICON_RESET_TRANSITION;\n labelTransition = LABEL_RESET_TRANSITION;\n }\n if (shouldReduceMotion) {\n iconTransition = REDUCED_MOTION_TRANSITION;\n labelTransition = REDUCED_MOTION_TRANSITION;\n }\n const visualStates = [\n {\n icon: <HugeiconsIcon icon={Copy01Icon} size={14} />,\n label,\n stage: COPY_STAGE.idle,\n },\n {\n // Let Button's SVG size selectors match the copy and error icons.\n // The check follows the global icon stroke, so it matches the copy icon at any size.\n icon: (\n <CheckIcon\n className='[&_path]:[stroke-width:var(--icon-stroke-width,1.75)]'\n size={null}\n />\n ),\n label: label ? 'Copied' : undefined,\n stage: COPY_STAGE.copied,\n },\n {\n icon: <HugeiconsIcon icon={AlertCircleIcon} size={14} />,\n label: label ? 'Failed' : undefined,\n stage: COPY_STAGE.error,\n },\n ];\n\n return (\n <Button\n variant={variant}\n size={size}\n onClick={handleCopy}\n aria-label={ariaLabel}\n className={cn(\n stage === COPY_STAGE.copied && 'text-[var(--text-success)]',\n stage === COPY_STAGE.error && 'text-[var(--text-danger)]',\n className,\n )}\n >\n {/* Overlapping grid cells reserve the widest state and prevent blank frames. */}\n <span aria-hidden='true' className='grid items-center'>\n {visualStates.map((visualState) => {\n const isActive = stage === visualState.stage;\n const isIdleVisual = visualState.stage === COPY_STAGE.idle;\n\n return (\n <span\n key={visualState.stage}\n className='col-start-1 row-start-1 flex items-center gap-1.5'\n >\n <motion.span\n initial={false}\n // The checkbox's draw-on rule in globals.css strokes the check in while this reads checked.\n data-slot={\n visualState.stage === COPY_STAGE.copied\n ? 'copy-button-check'\n : undefined\n }\n data-state={isActive ? 'checked' : 'unchecked'}\n animate={{\n filter:\n isIdleVisual || isActive\n ? ICON.activeBlur\n : ICON.inactiveBlur,\n opacity: isActive ? 1 : 0,\n scale:\n isIdleVisual || isActive\n ? ICON.activeScale\n : ICON.inactiveScale,\n }}\n transition={iconTransition}\n className='flex items-center'\n >\n {visualState.icon}\n </motion.span>\n {visualState.label && (\n <motion.span\n initial={false}\n animate={{\n opacity: isActive ? 1 : 0,\n y:\n isIdleVisual || isActive\n ? LABEL.activeOffset\n : LABEL.inactiveOffset,\n }}\n transition={labelTransition}\n >\n {visualState.label}\n </motion.span>\n )}\n </span>\n );\n })}\n </span>\n <span aria-live='polite' className='sr-only' role='status'>\n {announcement}\n </span>\n </Button>\n );\n};\n","'use client';\n\nimport { type ReactElement, forwardRef, useMemo, useRef, useState } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { cn } from '../../lib/utils';\nimport { CopyButton } from '../copy-button';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype CodeBlockVariant = 'dark' | 'light';\n\ninterface CodeBlockProps {\n className?: string;\n code: string;\n language?: string;\n showLineNumbers?: boolean;\n showTerminalPrompt?: boolean;\n showWindowChrome?: boolean;\n title?: string;\n variant?: CodeBlockVariant;\n}\n\nconst variantStyles = {\n dark: {\n chromeDot: 'bg-[var(--border-hover)]',\n code: 'text-[var(--foreground)]',\n copyBtn:\n 'text-[var(--text-disabled)] hover:text-[var(--foreground)] hover:bg-white/[0.06]',\n header: 'border-white/[0.05] bg-[var(--bg-default)]',\n headerText: 'text-[var(--muted-foreground)]',\n lineNumber: 'text-[var(--text-disabled)]',\n prompt: 'text-[var(--muted-foreground)]',\n tabActive: 'bg-white/[0.08] text-[var(--foreground)]',\n tabInactive: 'text-[var(--text-disabled)] hover:text-[var(--foreground)]',\n wrapper:\n 'bg-[var(--card)] text-[var(--foreground)] shadow-[0_0_0_1px_var(--border)]',\n },\n light: {\n chromeDot: 'bg-muted-foreground/15',\n code: 'text-foreground',\n copyBtn:\n 'text-muted-foreground/60 hover:text-foreground hover:bg-black/[0.04]',\n header: 'border-border/60 bg-[var(--muted)]/40',\n headerText: 'text-muted-foreground',\n lineNumber: 'text-muted-foreground/30',\n prompt: 'text-muted-foreground/40',\n tabActive:\n 'bg-background text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.05)]',\n tabInactive: 'text-muted-foreground hover:text-foreground',\n wrapper: 'bg-white text-foreground shadow-[var(--shadow-card)]',\n },\n};\n\nconst CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(\n (\n {\n code,\n title,\n language: _language,\n showLineNumbers = false,\n showTerminalPrompt = false,\n variant = 'dark',\n showWindowChrome = false,\n className,\n },\n ref\n ) => {\n const lines = code.split('\\n');\n const s = variantStyles[variant];\n\n return (\n <div\n ref={ref}\n className={cn('rounded-xl overflow-hidden', s.wrapper, className)}\n >\n {(title || showWindowChrome) && (\n <div\n className={cn(\n 'flex items-center justify-between border-b px-4 py-2.5',\n s.header\n )}\n >\n <div className=\"flex items-center gap-3\">\n {showWindowChrome && (\n <div className=\"flex gap-[6px]\" aria-hidden=\"true\">\n <div className={cn('size-[9px] rounded-full', s.chromeDot)} />\n <div className={cn('size-[9px] rounded-full', s.chromeDot)} />\n <div className={cn('size-[9px] rounded-full', s.chromeDot)} />\n </div>\n )}\n {title && (\n <span className={cn('text-[13px] font-medium', s.headerText)}>\n {title}\n </span>\n )}\n </div>\n <CopyButton\n value={code}\n variant=\"ghost\"\n size=\"icon-xs\"\n className={s.copyBtn}\n />\n </div>\n )}\n <div className=\"relative group\">\n {!title && !showWindowChrome && (\n <div className=\"absolute top-2.5 right-2.5 opacity-0 group-hover:opacity-100 transition-[opacity] duration-150\">\n <CopyButton\n value={code}\n variant=\"ghost\"\n size=\"icon-xs\"\n className={s.copyBtn}\n />\n </div>\n )}\n <pre\n className={cn(\n 'overflow-x-auto px-4 py-3.5 text-[13px] font-mono leading-relaxed',\n !title && !showWindowChrome && 'pr-10',\n variant === 'dark' && 'bg-[var(--background)]'\n )}\n >\n <code>\n {showLineNumbers ? (\n lines.map((line, i) => (\n <span key={`L${i}:${line}`} className=\"table-row\">\n <span\n className={cn(\n 'table-cell pr-4 text-right select-none tabular-nums w-[2ch]',\n s.lineNumber\n )}\n >\n {i + 1}\n </span>\n <span className=\"table-cell\">\n {showTerminalPrompt && i === 0 && (\n <span className={cn('select-none mr-2', s.prompt)}>\n $\n </span>\n )}\n {line}\n </span>\n {i < lines.length - 1 && '\\n'}\n </span>\n ))\n ) : (\n <>\n {showTerminalPrompt && (\n <span className={cn('select-none mr-2', s.prompt)}>$</span>\n )}\n {code}\n </>\n )}\n </code>\n </pre>\n </div>\n </div>\n );\n }\n);\n\nCodeBlock.displayName = 'CodeBlock';\n\ninterface PackageManagerTabsProps {\n className?: string;\n npm: string;\n pnpm?: string;\n showTerminalPrompt?: boolean;\n variant?: CodeBlockVariant;\n yarn?: string;\n}\n\nconst PackageManagerTabs = ({\n npm,\n yarn,\n pnpm,\n variant = 'dark',\n showTerminalPrompt = true,\n className,\n}: PackageManagerTabsProps): ReactElement => {\n const tabs = useMemo(\n () => [\n { code: npm, id: 'npm' as const, label: 'npm' },\n ...(yarn ? [{ code: yarn, id: 'yarn' as const, label: 'yarn' }] : []),\n ...(pnpm ? [{ code: pnpm, id: 'pnpm' as const, label: 'pnpm' }] : []),\n ],\n [npm, yarn, pnpm]\n );\n\n const [activeIndex, setActiveIndex] = useState(0);\n const tabRefs = useRef<(HTMLButtonElement | null)[]>([]);\n const shouldReduceMotion = useReducedMotion();\n\n const s = variantStyles[variant];\n const activeTab = tabs[activeIndex];\n const activeCode = activeTab?.code || npm;\n\n // eslint-disable-next-line custom-rules/require-single-object-param\n const handleKeyDown = (e: React.KeyboardEvent, index: number) => {\n let nextIndex: number;\n switch (e.key) {\n case 'ArrowRight':\n nextIndex = (index + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n nextIndex = (index - 1 + tabs.length) % tabs.length;\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = tabs.length - 1;\n break;\n default:\n return;\n }\n e.preventDefault();\n setActiveIndex(nextIndex);\n tabRefs.current[nextIndex]?.focus();\n };\n\n return (\n <div className={cn('rounded-xl overflow-hidden', s.wrapper, className)}>\n <div\n className={cn(\n 'flex items-center justify-between border-b px-3 py-2',\n s.header\n )}\n >\n <div\n className=\"flex gap-0.5 rounded-lg p-0.5\"\n role=\"tablist\"\n aria-label=\"Package manager\"\n >\n {tabs.map((tab, i) => (\n <button\n key={tab.id}\n ref={(el) => {\n tabRefs.current[i] = el;\n }}\n role=\"tab\"\n aria-selected={activeIndex === i}\n aria-controls={`panel-${tab.id}`}\n tabIndex={activeIndex === i ? 0 : -1}\n onClick={() => setActiveIndex(i)}\n onKeyDown={(e) => handleKeyDown(e, i)}\n className={cn(\n 'relative px-3 py-1 rounded-md text-[13px] font-medium transition-[color,background-color,box-shadow] duration-150 touch-manipulation cursor-pointer',\n activeIndex === i ? s.tabActive : s.tabInactive\n )}\n >\n <motion.span\n whileTap={shouldReduceMotion ? undefined : { scale: 0.95 }}\n transition={spring}\n >\n {tab.label}\n </motion.span>\n </button>\n ))}\n </div>\n <CopyButton\n value={activeCode}\n variant=\"ghost\"\n size=\"icon-xs\"\n className={s.copyBtn}\n />\n </div>\n <div\n id={`panel-${activeTab?.id}`}\n role=\"tabpanel\"\n aria-labelledby={activeTab?.id}\n >\n <pre\n className={cn(\n 'overflow-x-auto px-4 py-3.5 text-[13px] font-mono',\n variant === 'dark' && 'bg-[var(--background)]'\n )}\n >\n <code>\n {showTerminalPrompt && (\n <span className={cn('select-none mr-2', s.prompt)}>$</span>\n )}\n {activeCode}\n </code>\n </pre>\n </div>\n </div>\n );\n};\n\nexport { CodeBlock, PackageManagerTabs };\nexport type { CodeBlockProps, PackageManagerTabsProps, CodeBlockVariant };\n","'use client';\n\nimport type { ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Alert01Icon } from '@hugeicons/core-free-icons';\n\nimport { Button } from '../ui/button';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from '../ui/alert-dialog';\nimport { cn } from '../../lib/utils';\n\nexport interface DangerZoneProps {\n actionLabel: string;\n className?: string;\n confirmDescription?: string;\n confirmTitle?: string;\n description: string;\n onConfirm: () => void;\n title: string;\n}\n\nexport const DangerZone = ({\n title,\n description,\n actionLabel,\n confirmTitle,\n confirmDescription,\n onConfirm,\n className,\n}: DangerZoneProps): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl border border-[var(--border-danger)]/30 p-6 shadow-[var(--shadow-card)] bg-card',\n className\n )}\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--danger-light)]\">\n <HugeiconsIcon\n icon={Alert01Icon}\n size={16}\n className=\"text-[var(--text-danger)]\"\n />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"text-sm font-semibold text-[var(--text-danger)] text-balance\">\n {title}\n </h3>\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n <div className=\"mt-4\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"destructive\">{actionLabel}</Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{confirmTitle || title}</AlertDialogTitle>\n <AlertDialogDescription>\n {confirmDescription || description}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={onConfirm}\n className=\"bg-destructive text-white hover:bg-destructive/90\"\n >\n {actionLabel}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","'use client';\n\nimport { type ReactElement, useState } from 'react';\nimport { Add01Icon, Cancel01Icon } from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { Button } from '../ui/button';\nimport { Input } from '../ui/input';\nimport { cn } from '../../lib/utils';\n\nexport interface DomainListProps {\n className?: string;\n domains: string[];\n onChange: (domains: string[]) => void;\n placeholder?: string;\n validate?: (domain: string) => string | null;\n}\n\nconst DomainList = ({\n className,\n domains,\n onChange,\n placeholder = 'https://example.com',\n validate,\n}: DomainListProps): ReactElement => {\n const [inputValue, setInputValue] = useState('');\n const [error, setError] = useState<string | null>(null);\n\n const handleAdd = () => {\n const trimmed = inputValue.trim();\n if (!trimmed) return;\n\n if (validate) {\n const validationError = validate(trimmed);\n if (validationError) {\n setError(validationError);\n return;\n }\n }\n\n if (domains.includes(trimmed)) {\n setError('Already added');\n return;\n }\n\n onChange([...domains, trimmed]);\n setInputValue('');\n setError(null);\n };\n\n // eslint-disable-next-line custom-rules/require-single-object-param\n const handleRemove = (domain: string) => {\n onChange(domains.filter((d) => d !== domain));\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n handleAdd();\n }\n };\n\n return (\n <div className={cn('space-y-3', className)}>\n <div className=\"flex gap-2\">\n <div className=\"flex-1\">\n <Input\n value={inputValue}\n onChange={(e) => {\n setInputValue(e.target.value);\n setError(null);\n }}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-invalid={!!error}\n />\n {error && (\n <p className=\"text-xs text-[var(--text-danger)] mt-1\">{error}</p>\n )}\n </div>\n <Button\n variant=\"outline\"\n size=\"default\"\n onClick={handleAdd}\n disabled={!inputValue.trim()}\n type=\"button\"\n >\n <HugeiconsIcon icon={Add01Icon} size={16} />\n Add\n </Button>\n </div>\n {domains.length > 0 && (\n <ul className=\"space-y-1.5\">\n {domains.map((domain) => (\n <li\n key={domain}\n className=\"flex items-center justify-between gap-2 rounded-md border bg-[var(--bg-bottom)] px-3 py-2 text-sm\"\n >\n <span className=\"text-sm tabular-nums truncate\">{domain}</span>\n <button\n type=\"button\"\n onClick={() => handleRemove(domain)}\n className=\"shrink-0 rounded-sm p-0.5 text-muted-foreground hover:text-[var(--text-danger)] transition-[color] duration-150 relative before:absolute before:-inset-[11px] before:content-['']\"\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n};\n\nexport { DomainList };\n","'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport {\n Cancel01Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\n\nimport { cn } from '../../lib/utils';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\nexport interface InfoBannerProps {\n children: ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n}\n\nexport const InfoBanner = ({\n children,\n dismissible = false,\n onDismiss,\n className,\n}: InfoBannerProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n const shouldReduceMotion = useReducedMotion();\n\n if (dismissed) return null;\n\n return (\n <div\n className={cn(\n 'flex items-center gap-2 rounded-lg border border-border bg-muted/50 px-3 py-2 text-sm text-muted-foreground',\n className\n )}\n >\n <span className=\"text-muted-foreground shrink-0\">\n <HugeiconsIcon icon={InformationCircleIcon} size={16} />\n </span>\n <div className=\"flex-1 min-w-0 text-pretty\">{children}</div>\n {dismissible && (\n <motion.button\n whileTap={shouldReduceMotion ? undefined : { scale: 0.96 }}\n transition={spring}\n onClick={() => {\n setDismissed(true);\n onDismiss?.();\n }}\n className=\"relative before:absolute before:-inset-[13px] before:content-[''] shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-[opacity] touch-manipulation cursor-pointer\"\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </motion.button>\n )}\n </div>\n );\n};\n","import { type ReactElement, useMemo } from 'react';\n\nimport { Skeleton } from '../ui/skeleton';\nimport { cn } from '../../lib/utils';\n\nconst buildIdList = (length: number): string[] =>\n Array.from({ length }, () => crypto.randomUUID());\n\n/** Full-page skeleton with header and content area */\nexport const PageSkeleton = ({\n className,\n}: {\n className?: string;\n}): ReactElement => {\n return (\n <div className={cn('space-y-6 p-6', className)}>\n <div className=\"space-y-2\">\n <Skeleton className=\"h-8 w-48\" />\n <Skeleton className=\"h-4 w-96\" />\n </div>\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\n <StatCardSkeleton />\n <StatCardSkeleton />\n <StatCardSkeleton />\n </div>\n <TableSkeleton rows={5} />\n </div>\n );\n};\n\n/** Stat/metric card skeleton */\nexport const StatCardSkeleton = ({\n className,\n}: {\n className?: string;\n}): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl p-5 shadow-[var(--shadow-card)] bg-card',\n className\n )}\n >\n <div className=\"flex items-center justify-between mb-3\">\n <Skeleton className=\"h-4 w-24\" />\n <Skeleton className=\"size-8 rounded-lg\" />\n </div>\n <Skeleton className=\"h-8 w-20 mb-1\" />\n <Skeleton className=\"h-4 w-16\" />\n </div>\n );\n};\n\n/** Table skeleton with configurable rows */\nexport const TableSkeleton = ({\n rows = 5,\n columns = 4,\n className,\n}: {\n className?: string;\n columns?: number;\n rows?: number;\n}): ReactElement => {\n // Stable identity keys so React doesn't remount on re-render. Indices are\n // unsuitable here because the lists are fixed-length but Sonar's S6479 flags\n // index-derived keys.\n const headerIds = useMemo(() => buildIdList(columns), [columns]);\n const rowIds = useMemo(() => buildIdList(rows), [rows]);\n const colIds = useMemo(() => buildIdList(columns), [columns]);\n\n return (\n <div\n className={cn(\n 'rounded-xl border shadow-[var(--shadow-card)] bg-card overflow-hidden',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-center gap-4 px-4 py-3 border-b\">\n {headerIds.map((id) => (\n <Skeleton key={id} className=\"h-4 flex-1\" />\n ))}\n </div>\n {/* Rows */}\n {rowIds.map((rowId) => (\n <div\n key={rowId}\n className=\"flex items-center gap-4 px-4 py-3 border-b last:border-b-0\"\n >\n {colIds.map((colId, colIdx) => (\n <Skeleton\n key={`${rowId}-${colId}`}\n className={cn(\n 'h-4 flex-1',\n colIdx === 0 && 'max-w-32',\n colIdx === columns - 1 && 'max-w-16'\n )}\n />\n ))}\n </div>\n ))}\n </div>\n );\n};\n\n/** Card skeleton */\nexport const CardSkeleton = ({\n className,\n}: {\n className?: string;\n}): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl p-6 shadow-[var(--shadow-card)] bg-card space-y-4',\n className\n )}\n >\n <div className=\"space-y-2\">\n <Skeleton className=\"h-5 w-32\" />\n <Skeleton className=\"h-4 w-48\" />\n </div>\n <Skeleton className=\"h-24 w-full\" />\n <div className=\"flex gap-2\">\n <Skeleton className=\"h-9 w-20\" />\n <Skeleton className=\"h-9 w-20\" />\n </div>\n </div>\n );\n};\n","import { type ComponentType, type ReactElement } from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { Skeleton } from '../ui/skeleton';\n\ntype Trend = 'up' | 'down' | 'neutral';\n\ntype IconComponent = ComponentType<{ className?: string; size?: number }>;\n\ninterface MetricCardBaseProps {\n className?: string;\n icon?: IconComponent;\n label: string;\n loading?: boolean;\n}\n\nexport interface MetricCardActiveProps extends MetricCardBaseProps {\n inactive?: false;\n trend?: Trend;\n trendValue?: string;\n value: string | number;\n}\n\nexport interface MetricCardInactiveProps extends MetricCardBaseProps {\n inactive: true;\n onSetup: () => void;\n setupDescription?: string;\n setupLabel: string;\n trend?: never;\n trendValue?: never;\n value?: never;\n}\n\ntype MetricCardProps = MetricCardActiveProps | MetricCardInactiveProps;\n\nconst trendColor: Record<Trend, string> = {\n down: 'text-[var(--text-danger)]',\n neutral: 'text-muted-foreground',\n up: 'text-[var(--text-success)]',\n};\n\nexport const MetricCard = (props: MetricCardProps): ReactElement => {\n const { label, icon: Icon, loading = false, className } = props;\n\n if (loading) {\n return (\n <div\n className={cn(\n 'rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4',\n className\n )}\n >\n <Skeleton className=\"h-3.5 w-20 mb-2.5\" />\n <Skeleton className=\"h-7 w-24\" />\n </div>\n );\n }\n\n if (props.inactive) {\n return (\n <div\n className={cn(\n 'rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4',\n className\n )}\n >\n <div className=\"flex items-center gap-1.5\">\n {Icon && <Icon className=\"size-3.5 text-muted-foreground\" />}\n <span className=\"text-[13px] text-muted-foreground font-medium\">\n {label}\n </span>\n </div>\n <div className=\"text-2xl font-semibold tracking-tight text-muted-foreground/30 tabular-nums mt-1.5\">\n 0\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={cn(\n 'rounded-[16px] bg-card shadow-[var(--shadow-card)] px-5 py-4',\n className\n )}\n >\n <div className=\"flex items-center gap-1.5\">\n {Icon && <Icon className=\"size-3.5 text-muted-foreground\" />}\n <span className=\"text-[13px] text-muted-foreground font-medium\">\n {label}\n </span>\n </div>\n <div className=\"flex items-baseline gap-2 mt-1.5\">\n <span className=\"text-2xl font-semibold tracking-tight tabular-nums\">\n {props.value}\n </span>\n {props.trend && props.trendValue && (\n <span\n className={cn(\n 'text-xs font-medium tabular-nums',\n trendColor[props.trend]\n )}\n >\n {props.trendValue}\n </span>\n )}\n </div>\n </div>\n );\n};\n","'use client';\n\n/**\n * Placeholder stub for the docs-AI sheet.\n *\n * Renders nothing in droplet — the real sheet lives in the consumer app and\n * subscribes to the `docsPath` to surface contextual AI help. Kept here so\n * `PageActions` can mount it unconditionally without each consumer wiring it.\n */\nexport const AskAISheet = ({\n docsPath: _docsPath,\n}: {\n docsPath?: string;\n}): null => {\n return null;\n};\n","import type { ReactElement } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { WebhookIcon } from '@hugeicons/core-free-icons';\nimport Link from 'next/link';\n\nimport { Button } from '../ui/button';\nimport { AskAISheet } from '../ask-ai-sheet';\n\nexport const AskAIAction = ({\n docsPath,\n}: {\n docsPath?: string;\n}): ReactElement => {\n return <AskAISheet docsPath={docsPath} />;\n};\n\nexport const WebhooksAction = (): ReactElement => {\n return (\n <Button variant=\"outline\" size=\"sm\" asChild>\n <Link href=\"/dashboard/developers?tab=webhooks\">\n <HugeiconsIcon icon={WebhookIcon} size={14} />\n Webhooks\n </Link>\n </Button>\n );\n};\n","'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\n/**\n * Props for {@link PageHeader}.\n *\n * @description `title` is the page heading; `description` renders muted\n * supporting text under it; `badge` sits next to the title; `actions` render\n * right-aligned; `className` merges onto the outer wrapper.\n * @example\n * ```tsx\n * const props: PageHeaderProps = {\n * title: 'Accounts',\n * description: 'Manage your accounts',\n * };\n * ```\n * @see PageHeader\n * @see ProductPageLayout\n */\nexport type PageHeaderProps = {\n actions?: ReactNode;\n badge?: ReactNode;\n className?: string;\n description?: string;\n title: string;\n};\n\n/**\n * Standard page heading — title, optional muted description, optional badge\n * next to the title and optional actions on the right. `ProductPageLayout`\n * renders the same header internally; use this on pages outside it so every\n * page shares one header pattern.\n *\n * @description Renders the shared dashboard page header pattern.\n * @example\n * ```tsx\n * <PageHeader\n * title=\"Accounts\"\n * description=\"Manage your accounts\"\n * actions={<Button>New account</Button>}\n * />\n * ```\n * @returns The rendered page header element.\n * @see ProductPageLayout\n * @see SettingsSection\n */\nexport const PageHeader = ({\n title,\n description,\n badge,\n actions,\n className,\n}: PageHeaderProps): ReactElement => (\n <div className={cn('flex items-start justify-between gap-4', className)}>\n <div>\n {badge ? (\n <div className='flex flex-wrap items-center gap-2'>\n <h1 className='text-2xl font-semibold text-balance'>{title}</h1>\n {badge}\n </div>\n ) : (\n <h1 className='text-2xl font-semibold text-balance'>{title}</h1>\n )}\n {description && (\n <p className='text-sm text-muted-foreground mt-1 text-pretty'>\n {description}\n </p>\n )}\n </div>\n {actions && (\n <div className='flex items-center gap-2 shrink-0'>{actions}</div>\n )}\n </div>\n);\n","'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { cn } from '../../lib/utils';\nimport { PageHeader } from '../page-header';\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ninterface Tab {\n description?: string;\n heading?: string;\n id: string;\n label: string;\n}\n\nexport interface ProductPageLayoutProps {\n activeTab: string;\n children: ReactNode;\n headerActions?: ReactNode;\n headerContent?: ReactNode;\n onTabChange: (tabId: string) => void;\n sidebarFooter?: ReactNode;\n tabs: Tab[];\n title: string;\n}\n\nexport const ProductPageLayout = ({\n title,\n tabs,\n activeTab,\n onTabChange,\n children,\n headerActions,\n headerContent,\n sidebarFooter,\n}: ProductPageLayoutProps): ReactElement => {\n const activeTabConfig = tabs.find((t) => t.id === activeTab);\n const shouldReduceMotion = useReducedMotion();\n\n return (\n <div className=\"flex h-full\">\n {/* Sub-nav sidebar */}\n <nav className=\"w-52 shrink-0 bg-background overflow-y-auto py-4 px-3 flex flex-col\">\n <h2 className=\"px-3 mb-3 text-sm font-semibold text-balance\">\n {title}\n </h2>\n <div className=\"flex flex-col gap-0.5\">\n {tabs.map((tab) => (\n <motion.button\n key={tab.id}\n whileTap={shouldReduceMotion ? undefined : { scale: 0.96 }}\n transition={spring}\n onClick={() => onTabChange(tab.id)}\n className={cn(\n 'flex items-center rounded-md px-3 py-1.5 text-[13px] font-medium transition-[color,background-color] text-left touch-manipulation',\n activeTab === tab.id\n ? 'bg-muted text-foreground'\n : 'text-muted-foreground hover:bg-muted/50 hover:text-foreground'\n )}\n >\n {tab.label}\n </motion.button>\n ))}\n </div>\n {sidebarFooter && <div className=\"mt-auto pt-4\">{sidebarFooter}</div>}\n </nav>\n\n {/* Content area */}\n <div className=\"flex-1 overflow-auto\">\n <div className=\"px-10 py-8 space-y-8\">\n {headerContent ?? (\n <PageHeader\n title={\n activeTabConfig?.heading ??\n activeTabConfig?.label ??\n activeTab\n }\n description={activeTabConfig?.description}\n actions={headerActions}\n />\n )}\n {children}\n </div>\n </div>\n </div>\n );\n};\n","import { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nexport interface SettingsSectionProps {\n children: ReactNode;\n className?: string;\n description?: string;\n title: string;\n variant?: 'default' | 'danger';\n}\n\nexport const SettingsSection = ({\n title,\n description,\n children,\n variant = 'default',\n className,\n}: SettingsSectionProps): ReactElement => {\n return (\n <div\n className={cn(\n 'rounded-xl border p-6 shadow-[var(--shadow-card)] bg-card',\n variant === 'danger' && 'border-[var(--border-danger)]/30',\n className\n )}\n >\n <div className=\"mb-4\">\n <h3\n className={cn(\n 'text-sm font-semibold text-balance',\n variant === 'danger' && 'text-[var(--text-danger)]'\n )}\n >\n {title}\n </h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-4\">{children}</div>\n </div>\n );\n};\n","'use client';\n\nimport {\n type ComponentProps,\n type ReactElement,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { motion, useReducedMotion } from 'motion/react';\n\nimport { Tabs, TabsList, TabsTrigger } from '../ui/tabs';\n\n/**\n * A single tab in {@link TabNavigation}.\n *\n * @description `value` keys the tab and its `TabsContent` panel; `label` is the\n * visible tab text; `disabled` blocks selection and is skipped for the initial\n * selection.\n * @example\n * ```tsx\n * const item: TabNavigationItem = { label: 'Invitations', value: 'invitations' };\n * ```\n * @see TabNavigation\n * @see TabNavigationProps\n */\ntype TabNavigationItem = {\n disabled?: boolean;\n label: string;\n value: string;\n};\n\n/**\n * Props for {@link TabNavigation}. Extends the underlying `Tabs` props except\n * `orientation`, which is fixed to horizontal: the underline indicator and\n * navigation styles only apply to a horizontal tab list.\n *\n * @description `items` renders the tabs in order; `listLabel` gives the tab\n * list an accessible name; `defaultValue` picks the initially selected tab in\n * uncontrolled use; `value`/`onValueChange` control selection.\n * @example\n * ```tsx\n * const props: TabNavigationProps = {\n * items: [\n * { label: 'All', value: 'all' },\n * { label: 'Invitations', value: 'invitations' },\n * ],\n * listLabel: 'Users',\n * };\n * ```\n * @see TabNavigation\n * @see ProductPageLayout\n */\ntype TabNavigationProps = Omit<ComponentProps<typeof Tabs>, 'orientation'> & {\n items: TabNavigationItem[];\n listLabel?: string;\n};\n\n/**\n * Full-width underline tab navigation for switching between related views,\n * built on {@link Tabs}. The blue underline slides between tabs; pass\n * `TabsContent` elements as children when the component owns the panels.\n *\n * @description Without `defaultValue`, the first enabled item is selected. If\n * uncontrolled `items` later change so the selection is missing or disabled,\n * the selection moves to the first enabled item.\n * @example\n * ```tsx\n * <TabNavigation\n * items={[\n * { label: 'All', value: 'all' },\n * { label: 'Invitations', value: 'invitations' },\n * ]}\n * listLabel=\"Users\"\n * >\n * <TabsContent value=\"all\">All users</TabsContent>\n * <TabsContent value=\"invitations\">Pending invitations</TabsContent>\n * </TabNavigation>\n * ```\n * @returns The rendered tab navigation element.\n * @see Tabs\n * @see ProductPageLayout\n */\nconst TabNavigation = ({\n children,\n defaultValue,\n items,\n listLabel,\n onValueChange,\n value,\n ...props\n}: TabNavigationProps): ReactElement => {\n const [internalValue, setInternalValue] = useState(\n defaultValue ?? items.find((item) => !item.disabled)?.value\n );\n const selectedValue = value ?? internalValue;\n const shouldReduceMotion = useReducedMotion();\n const listRef = useRef<HTMLDivElement | null>(null);\n const [indicator, setIndicator] = useState<\n { left: number; width: number } | undefined\n >();\n\n // Measure the active trigger so a single indicator can animate left/width\n // between tabs. The mount/unmount layoutId pattern never fires a shared\n // transition here (motion@12), so the underline would sit still.\n useLayoutEffect(() => {\n const list = listRef.current;\n if (!list) return;\n const measure = () => {\n const active = list.querySelector<HTMLElement>(\n '[data-slot=\"tabs-trigger\"][data-state=\"active\"]'\n );\n setIndicator(\n active\n ? { left: active.offsetLeft, width: active.offsetWidth }\n : undefined\n );\n };\n measure();\n // Observe every trigger, not just the list: a label edit can resize one\n // tab (and shift the rest) without changing the list's own box.\n const observer =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(measure);\n list\n .querySelectorAll<HTMLElement>('[data-slot=\"tabs-trigger\"]')\n .forEach((trigger) => observer?.observe(trigger));\n return () => observer?.disconnect();\n }, [selectedValue, items]);\n\n // Re-select the first enabled item when an uncontrolled list changes under a\n // missing or disabled selection (e.g. items loading in after an empty mount).\n const [prevItems, setPrevItems] = useState(items);\n if (prevItems !== items) {\n setPrevItems(items);\n if (\n defaultValue === undefined &&\n value === undefined &&\n !items.some((item) => item.value === internalValue && !item.disabled)\n ) {\n setInternalValue(items.find((item) => !item.disabled)?.value);\n }\n }\n\n return (\n <Tabs\n {...props}\n value={selectedValue}\n onValueChange={(nextValue) => {\n setInternalValue(nextValue);\n onValueChange?.(nextValue);\n }}\n >\n <TabsList\n variant=\"navigation\"\n aria-label={listLabel}\n ref={listRef}\n className=\"relative\"\n >\n {items.map(({ disabled, label, value }) => (\n <TabsTrigger key={value} value={value} disabled={disabled}>\n {label}\n </TabsTrigger>\n ))}\n {indicator && (\n <motion.span\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 -bottom-px h-px bg-(--action)\"\n initial={false}\n animate={{ width: indicator.width, x: indicator.left }}\n transition={\n shouldReduceMotion\n ? { duration: 0 }\n : { duration: 0.2, ease: [0.645, 0.045, 0.355, 1] }\n }\n />\n )}\n </TabsList>\n {children}\n </Tabs>\n );\n};\n\nexport { TabNavigation };\nexport type { TabNavigationItem, TabNavigationProps };\n","/**\n * ToggleCard — droplet's rich toggle composite.\n *\n * Rebuilt from Northstar's SingleToggleCard to support the redcoast dashboard\n * migration. ToggleRow (sibling primitive) remains the minimal/canonical\n * single-line toggle; ToggleCard is the multi-feature card variant with:\n * - Accordion expand/collapse for nested children\n * - Pluggable input type: switch (default), radio, or checkbox\n * - Optional left icon\n * - Tags row above the title and a RightSideTags slot on the right\n * - Optional notification dot in the trigger\n * - Optional `actionLink` rendered below content\n * - Optional `customActionIcon` rendered alongside the trigger affordance\n * - Whole-card click handler\n *\n * The API mirrors Northstar SingleToggleCard so a redcoast migration can be a\n * mechanical rename. Where the Northstar API surfaced layout-tuning props\n * (`disableHover`, `dontSeparateContentFromHeader`, `descriptionModificators`,\n * `titleModificators`) the equivalent expression here is via Tailwind classes\n * on `className` or `triggerClassName`.\n *\n * Authored in droplet so a single canonical card is available across teams.\n * Backed by Card + Switch/Checkbox/RadioGroup + Radix Accordion.\n */\nimport { type ChangeEvent, type FC, type ReactElement, type ReactNode, useId } from 'react';\nimport {\n Content as AccordionContent,\n Header as AccordionHeader,\n Item as AccordionItem,\n Root as AccordionRoot,\n Trigger as AccordionTrigger,\n} from '@radix-ui/react-accordion';\n\nimport { cn } from '../../lib/utils';\nimport { Switch } from '../ui/switch';\nimport { Checkbox } from '../ui/checkbox';\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group';\n\ntype ToggleCardInputType = 'toggle' | 'radio' | 'checkbox';\n\nexport type ToggleCardInputProps = {\n checked?: boolean;\n disabled?: boolean;\n /** Hide the input control entirely (useful when the row is informational). */\n hidden?: boolean;\n id?: string;\n /** When true, renders a lock badge instead of a switch — signals the value\n * is fixed and cannot be toggled via this UI. Implies disabled. */\n isLocked?: boolean;\n /** Indicates the saved/unsaved state via styling — informational, optional. */\n isSaved?: boolean;\n /** When true, paints the input with the warning accent (informational). */\n isWarning?: boolean;\n name?: string;\n /** Native onChange — receives a synthetic event for parity with HTML inputs. */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /** Controls which control element renders next to the title. */\n type?: ToggleCardInputType;\n};\n\nexport type ToggleCardTag = {\n Tag: ReactElement;\n id: string;\n};\n\nexport type ToggleCardActionLink = {\n onClick: () => void;\n text: string;\n};\n\nexport type ToggleCardCustomActionIcon = {\n Icon: ReactElement;\n className?: string;\n};\n\nexport type ToggleCardProps = {\n /** Optional icon rendered before the title. */\n Icon?: ReactElement;\n /** Tags shown on the RIGHT side of the trigger (e.g. status badges). */\n RightSideTags?: ToggleCardTag[];\n /** Tags shown ABOVE the title (e.g. status pills). */\n Tags?: ToggleCardTag[];\n /** Required key for Radix Accordion item identity. */\n accordionKey: string;\n /** Action button rendered at the bottom of expanded content. */\n actionLink?: ToggleCardActionLink;\n /** Whether the accordion CAN expand. Defaults to true. */\n allowExpand?: boolean;\n /** Children — rendered inside the AccordionContent when expanded. */\n children?: ReactNode;\n /** className applied to the outer Accordion root. */\n className?: string;\n /** Whether the accordion can be collapsed (Radix `collapsible`). */\n collapsible?: boolean;\n /** Replaces the default chevron with a custom icon. */\n customActionIcon?: ToggleCardCustomActionIcon;\n /** Whether the accordion is expanded by default. */\n defaultExpanded?: boolean;\n /** Optional secondary line below the title. */\n description?: string;\n /** Disables the entire card (input + trigger). */\n disabled?: boolean;\n /** Inputs (toggle/radio/checkbox) rendered alongside the title. */\n inputProps?: ToggleCardInputProps;\n /** When true, draws a notification dot on the trigger. */\n notification?: boolean;\n /**\n * Click handler for the whole card surface.\n *\n * @deprecated Currently a no-op: attaching onClick to a wrapper that nests\n * interactive children (AccordionTrigger, Switch / Checkbox / RadioGroup)\n * is an a11y anti-pattern. Kept in the type signature for Northstar\n * mechanical-rename parity. A future iteration may re-introduce this with\n * a dedicated click target (e.g. an overlay button) outside the nested\n * interactives.\n */\n onCardClick?: () => void;\n /** Accordion value-change handler. */\n onValueChange?: (value: string | undefined) => void;\n /** Card title — rendered as the primary label inside the trigger. */\n title?: string;\n /** className applied to the trigger row. */\n triggerClassName?: string;\n /** Test id applied to the accordion trigger element. */\n triggerTestId?: string;\n /** Controlled accordion value. */\n value?: string;\n};\n\nconst inputCommon =\n 'shrink-0 touch-manipulation cursor-pointer disabled:cursor-not-allowed disabled:opacity-50';\n\n// Internal helper — two positional params are clearer here than wrapping in\n// an object. Signature is private to this module.\n// eslint-disable-next-line custom-rules/require-single-object-param\nconst renderInput = (\n input: ToggleCardInputProps | undefined,\n id: string\n): ReactElement | null => {\n if (!input || input.hidden) return null;\n // Locked state: render a compact lock badge instead of a switch. Signals to\n // users that the value is fixed by an external constraint (plan tier,\n // global setting, etc.) and cannot be changed via this control.\n if (input.isLocked) {\n return (\n <div\n aria-label=\"Locked\"\n title=\"Locked\"\n className=\"shrink-0 inline-flex items-center justify-center size-5 rounded-full bg-muted text-muted-foreground mt-0.5\"\n >\n <svg\n className=\"size-3\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n >\n <rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0110 0v4\" />\n </svg>\n </div>\n );\n }\n const type = input.type ?? 'toggle';\n // Internal handler — single boolean is the natural shape for an onChange\n // callback. Wrapping in an object would be ceremony.\n // eslint-disable-next-line custom-rules/require-single-object-param\n const handleChange = (next: boolean) => {\n if (!input.onChange) return;\n // Synthesize a minimal ChangeEvent so consumers expecting native event\n // shape keep working.\n input.onChange({\n target: { checked: next, name: input.name ?? '' },\n } as ChangeEvent<HTMLInputElement>);\n };\n if (type === 'toggle') {\n return (\n <Switch\n id={input.id ?? id}\n checked={Boolean(input.checked)}\n disabled={input.disabled}\n onCheckedChange={handleChange}\n className={cn(inputCommon, 'mt-0.5')}\n />\n );\n }\n if (type === 'checkbox') {\n return (\n <Checkbox\n id={input.id ?? id}\n checked={Boolean(input.checked)}\n disabled={input.disabled}\n onCheckedChange={(state) => handleChange(state === true)}\n className={cn(inputCommon, 'mt-1')}\n />\n );\n }\n // radio — wrap in a single-item RadioGroup so semantics are preserved\n return (\n <RadioGroup\n value={input.checked ? input.id ?? id : ''}\n onValueChange={(v) => handleChange(v === (input.id ?? id))}\n disabled={input.disabled}\n className=\"shrink-0 mt-0.5\"\n >\n <RadioGroupItem\n id={input.id ?? id}\n value={input.id ?? id}\n className={inputCommon}\n />\n </RadioGroup>\n );\n};\n\n/**\n * DEPRECATED. Never use in new code. Use `FlushCardStack` with a `ToggleRow`\n * header instead; put sub-options in the item's reveal.\n *\n * Kept so existing callers keep rendering while they migrate.\n *\n * @deprecated Use `FlushCardStack` + `ToggleRow`.\n * @see FlushCardStack\n * @see ToggleRow\n */\nexport const ToggleCard: FC<ToggleCardProps> = ({\n accordionKey,\n title,\n description,\n // Note: the `Icon` prop is accepted in ToggleCardProps for API parity with\n // Northstar's SingleToggleCard but intentionally not destructured/rendered\n // here (toggle cards do not render a leading icon per droplet design).\n // Drop the prop at the migration sweep when touching each consumer.\n inputProps,\n allowExpand = true,\n defaultExpanded,\n value,\n onValueChange,\n collapsible = true,\n Tags,\n RightSideTags,\n notification,\n actionLink,\n customActionIcon,\n // Intentionally unused — see ToggleCardProps['onCardClick'] JSDoc.\n onCardClick: _onCardClick,\n children,\n disabled,\n triggerTestId,\n className,\n triggerClassName,\n}) => {\n const generatedId = useId();\n const inputId = inputProps?.id ?? generatedId;\n // Parent-with-nested-children mode: the trigger row is the \"section header\"\n // for a group of sub-toggles. Visual hierarchy reads correctly when the\n // header sits on a muted/grey surface and the nested children get the\n // clean white card surface below.\n const isParentMode = !allowExpand && Boolean(children);\n\n // Extracted to keep the main render's cognitive complexity below the\n // Sonar threshold. Content sits inside an AccordionContent when\n // expandable, or directly under the header when not.\n const renderContent = () => {\n const actionLinkButton = actionLink ? (\n <button\n type=\"button\"\n onClick={actionLink.onClick}\n className=\"mt-3 text-sm font-medium text-(--action) hover:underline underline-offset-4 cursor-pointer\"\n >\n {actionLink.text}\n </button>\n ) : null;\n\n if (allowExpand) {\n return (\n <AccordionContent className=\"border-t border-border-divider px-5 py-4\">\n {children}\n {actionLinkButton}\n </AccordionContent>\n );\n }\n\n // When the accordion can't expand, children still render as nested\n // content below the header. Used for the \"parent + sub-toggles\"\n // pattern. Children sit on the clean card surface (white) so the\n // visual contrast with the grey header above signals the hierarchy.\n if (!children && !actionLink) return null;\n return (\n <div className=\"border-t border-border-divider bg-card px-5 py-3 space-y-2\">\n {children}\n {actionLinkButton}\n </div>\n );\n };\n\n return (\n <AccordionRoot\n type=\"single\"\n collapsible={collapsible}\n defaultValue={defaultExpanded ? accordionKey : undefined}\n value={value}\n onValueChange={onValueChange}\n data-slot=\"toggle-card\"\n className={cn(\n 'rounded-xl bg-card shadow-card overflow-hidden',\n disabled && 'opacity-60',\n className\n )}\n >\n <AccordionItem value={accordionKey} className=\"border-0\">\n <AccordionHeader className=\"m-0\">\n {/* The wrapper is intentionally non-interactive. `onCardClick` is\n kept in the API for Northstar parity but currently no-ops —\n attaching an onClick here is an a11y anti-pattern because the\n wrapper nests an AccordionTrigger button and the input control\n (switch / checkbox / radio). Adding role='button' + tabIndex\n would either nest two interactives or trigger Sonar's \"use\n <button> instead of role\" rule. Consumers that need\n whole-card-click should wire it to a specific child instead. */}\n <div\n className={cn(\n 'group flex items-start gap-3 px-5 py-4',\n isParentMode && 'bg-bg-bottom',\n triggerClassName\n )}\n >\n {renderInput(inputProps, inputId)}\n <div className=\"flex-1 min-w-0\">\n {title && (\n <div className=\"flex items-baseline gap-1.5 flex-wrap leading-5\">\n <label\n htmlFor={inputId}\n className={cn(\n 'text-sm font-medium select-none leading-5',\n disabled && 'text-muted-foreground'\n )}\n >\n {title}\n {notification && (\n <span\n aria-hidden\n className=\"inline-block ml-1.5 size-1.5 rounded-full bg-destructive align-middle\"\n />\n )}\n </label>\n {Tags && Tags.length > 0 && (\n <>\n {Tags.map((t) => (\n <span key={t.id} className=\"leading-5\">\n {t.Tag}\n </span>\n ))}\n </>\n )}\n </div>\n )}\n {!title && Tags && Tags.length > 0 && (\n <div className=\"flex items-baseline gap-1.5 mb-1 leading-5\">\n {Tags.map((t) => (\n <span key={t.id} className=\"leading-5\">\n {t.Tag}\n </span>\n ))}\n </div>\n )}\n {description && (\n <p className=\"text-sm text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-2 shrink-0 self-start\">\n {RightSideTags && RightSideTags.length > 0 && (\n <div className=\"flex items-center gap-1.5\">\n {RightSideTags.map((t) => (\n <span key={t.id}>{t.Tag}</span>\n ))}\n </div>\n )}\n {allowExpand && (\n <AccordionTrigger\n data-testid={triggerTestId}\n className={cn(\n 'shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-[transform,background-color] duration-150 hover:bg-overlay-hover [&[data-state=open]>svg]:rotate-180',\n customActionIcon?.className\n )}\n disabled={!allowExpand}\n >\n {customActionIcon ? (\n customActionIcon.Icon\n ) : (\n <svg\n className=\"size-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n )}\n </AccordionTrigger>\n )}\n </div>\n </div>\n </AccordionHeader>\n {renderContent()}\n </AccordionItem>\n </AccordionRoot>\n );\n};\n","'use client';\n\nimport { type ReactElement, type ReactNode, useId } from 'react';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Setting07Icon } from '@hugeicons/core-free-icons';\n\nimport { Switch } from '../ui/switch';\nimport { Button } from '../ui/button';\nimport { cn } from '../../lib/utils';\n\nexport interface ToggleRowProps {\n /** Status next to the label. Pass droplet `Badge` elements only, never hand-made chips. */\n badge?: ReactNode;\n checked: boolean;\n /** Content rendered under the row. For sub-options, prefer a `FlushCardStack.Item` reveal. */\n children?: ReactNode;\n className?: string;\n description?: string;\n disabled?: boolean;\n icon?: ReactNode;\n label: string;\n onCheckedChange: (checked: boolean) => void;\n /**\n * @deprecated Only rendered with `switchPosition='right'`, which is deprecated.\n * Put settings in a `FlushCardStack.Item` reveal instead.\n */\n onSettings?: () => void;\n /**\n * @deprecated The switch always sits on the left. `'right'` still renders for\n * existing callers but must not be used in new code.\n */\n switchPosition?: 'left' | 'right';\n}\n\n// The component still honours the deprecated props for existing callers, so it reads them through a type without the\n// deprecation tags; the tags are for callers, not for this implementation.\ntype ToggleRowImplementationProps = Omit<\n ToggleRowProps,\n 'onSettings' | 'switchPosition'\n> & {\n onSettings?: () => void;\n switchPosition?: 'left' | 'right';\n};\n\n/**\n * A single on/off setting: switch on the left, then label, description and\n * optional `Badge`. It has no surface of its own.\n *\n * Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a\n * `Card`. Never put a `Well` under it directly; sub-options go in the\n * `FlushCardStack.Item` reveal.\n *\n * @see FlushCardStack\n * @see Switch\n */\nexport const ToggleRow = (props: ToggleRowProps): ReactElement => {\n const {\n label,\n description,\n checked,\n onCheckedChange,\n disabled = false,\n switchPosition = 'left',\n icon,\n badge,\n onSettings,\n children,\n className,\n }: ToggleRowImplementationProps = props;\n\n const switchId = useId();\n const descId = useId();\n\n const cursorClass = disabled ? 'cursor-not-allowed' : 'cursor-pointer';\n\n if (switchPosition === 'left') {\n return (\n <div className={className}>\n <div\n className={cn(\n 'flex items-start gap-2.5 touch-manipulation group/toggle'\n )}\n >\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n className=\"mt-0.5\"\n />\n {icon && (\n <label\n htmlFor={switchId}\n className={cn(\n 'text-muted-foreground shrink-0 self-start',\n cursorClass\n )}\n >\n {icon}\n </label>\n )}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <label\n htmlFor={switchId}\n className={cn(\n 'font-medium select-none',\n disabled && 'text-muted-foreground',\n cursorClass\n )}\n >\n {label}\n </label>\n {badge}\n </div>\n {/* Not a <label>: a second label would add the description to the\n switch's name, and screen readers would read it twice. */}\n {description && (\n <p\n id={descId}\n className=\"text-sm text-muted-foreground mt-1 text-pretty\"\n >\n {description}\n </p>\n )}\n </div>\n </div>\n {children}\n </div>\n );\n }\n\n // Deprecated right-switch layout, kept so existing callers keep rendering.\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <div className=\"flex items-center justify-between gap-4\">\n <label\n htmlFor={switchId}\n className={cn('text-sm font-medium select-none', cursorClass)}\n >\n {label}\n </label>\n <div className=\"flex items-center gap-2 shrink-0\">\n {onSettings && checked && (\n <Button\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onSettings}\n className=\"text-muted-foreground hover:text-foreground\"\n aria-label=\"Configure\"\n >\n <HugeiconsIcon icon={Setting07Icon} size={14} />\n </Button>\n )}\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n />\n </div>\n </div>\n {description && (\n <p\n id={descId}\n className=\"text-sm text-muted-foreground mt-0.5 text-pretty\"\n >\n {description}\n </p>\n )}\n </div>\n {checked && children && children}\n </div>\n );\n};\n","'use client';\n\n/**\n * Base wrapper for animated icons. Handles ref (startAnimation/stopAnimation),\n * mouse enter/leave animation, and the outer div. Use via render prop:\n *\n * <AnimatedIcon ref={ref} size={28} {...props}>\n * {(controls, size) => (\n * <svg height={size} ...> or <motion.svg animate={controls} ...>...</motion.svg>\n * )}\n * </AnimatedIcon>\n *\n * Icons with custom handle logic (e.g. triggerCopied, custom startAnimation)\n * keep their own useImperativeHandle and do not use this base.\n */\n\nimport type { HTMLAttributes, MouseEvent, ReactNode } from 'react';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport { useAnimation } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport interface AnimatedIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n}\n\nexport interface AnimatedIconProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n children: (\n controls: ReturnType<typeof useAnimation>,\n size: number,\n ) => ReactNode;\n size?: number;\n}\n\nconst AnimatedIcon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(\n (\n { children, className, onMouseEnter, onMouseLeave, size = 28, ...props },\n ref,\n ) => {\n const controls = useAnimation();\n const isControlledRef = useRef(false);\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true;\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n };\n });\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e);\n } else {\n controls.start('animate').catch(() => undefined);\n }\n },\n [controls, onMouseEnter],\n );\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e);\n } else {\n controls.start('normal').catch(() => undefined);\n }\n },\n [controls, onMouseLeave],\n );\n\n return (\n <div\n aria-hidden='true'\n className={cn('inline-flex items-center justify-center', className)}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n {children(controls, size)}\n </div>\n );\n },\n);\n\nAnimatedIcon.displayName = 'AnimatedIcon';\n\nexport { AnimatedIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ArrowUpRightIconHandle = AnimatedIconHandle;\n\ntype ArrowUpRightIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst ArrowUpRightIcon = forwardRef<ArrowUpRightIconHandle, ArrowUpRightIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M7 17 17 7'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { x: [0, 2, 0], y: [0, -2, 0] }, normal: { x: 0, y: 0 } }}\n />\n <motion.path\n animate={controls}\n d='M7 7h10v10'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { x: [0, 2, 0], y: [0, -2, 0] }, normal: { x: 0, y: 0 } }}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nArrowUpRightIcon.displayName = 'ArrowUpRightIcon';\n\nexport { ArrowUpRightIcon };\n","'use client';\n\nimport type { HTMLAttributes, MouseEvent } from 'react';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport interface ChartBarIncreasingIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n}\n\ninterface ChartBarIncreasingIconProps extends HTMLAttributes<HTMLDivElement> {\n size?: number;\n}\n\nconst LINE_VARIANTS: Variants = {\n hidden: { opacity: 0, pathLength: 0 },\n visible: { opacity: 1, pathLength: 1 },\n};\n\ntype TransitionForResult = { delay: number; duration: number };\n\nconst transitionFor = (i: number): TransitionForResult => ({\n delay: i * 0.1,\n duration: 0.3,\n});\n\nconst ChartBarIncreasingIcon = forwardRef<\n ChartBarIncreasingIconHandle,\n ChartBarIncreasingIconProps\n>(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n const controls = useAnimation();\n const isControlledRef = useRef(false);\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true;\n return {\n startAnimation: async () => {\n await controls.start((i) => ({\n opacity: 0,\n pathLength: 0,\n transition: transitionFor(i),\n }));\n await controls.start((i) => ({\n opacity: 1,\n pathLength: 1,\n transition: transitionFor(i),\n }));\n },\n stopAnimation: () => controls.start('visible'),\n };\n });\n\n const handleMouseEnter = useCallback(\n async (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseEnter?.(e);\n } else {\n await controls.start((i) => ({\n opacity: 0,\n pathLength: 0,\n transition: transitionFor(i),\n }));\n await controls.start((i) => ({\n opacity: 1,\n pathLength: 1,\n transition: transitionFor(i),\n }));\n }\n },\n [controls, onMouseEnter]\n );\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (isControlledRef.current) {\n onMouseLeave?.(e);\n } else {\n controls.start('visible').catch(() => undefined);\n }\n },\n [controls, onMouseLeave]\n );\n\n return (\n <div\n aria-hidden=\"true\"\n className={cn('inline-flex items-center justify-center', className)}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n <svg\n fill=\"none\"\n height={size}\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M3 3v16a2 2 0 0 0 2 2h16\" />\n <motion.path\n animate={controls}\n custom={1}\n d=\"M7 11h8\"\n initial=\"visible\"\n variants={LINE_VARIANTS}\n />\n <motion.path\n animate={controls}\n custom={2}\n d=\"M7 16h12\"\n initial=\"visible\"\n variants={LINE_VARIANTS}\n />\n <motion.path\n animate={controls}\n custom={0}\n d=\"M7 6h3\"\n initial=\"visible\"\n variants={LINE_VARIANTS}\n />\n </svg>\n </div>\n );\n});\n\nChartBarIncreasingIcon.displayName = 'ChartBarIncreasingIcon';\n\nexport { ChartBarIncreasingIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ChevronDownIconHandle = AnimatedIconHandle;\n\ntype ChevronDownIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.5,\n times: [0, 0.4, 1],\n};\n\nconst ChevronDownIcon = forwardRef<ChevronDownIconHandle, ChevronDownIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='m6 9 6 6 6-6'\n transition={DEFAULT_TRANSITION}\n variants={{\n animate: { y: [0, 2, 0] },\n normal: { y: 0 },\n }}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nexport { ChevronDownIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ChevronRightIconHandle = AnimatedIconHandle;\n\ntype ChevronRightIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst ChevronRightIcon = forwardRef<ChevronRightIconHandle, ChevronRightIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='m9 18 6-6-6-6'\n transition={{ duration: 0.5, times: [0, 0.4, 1] }}\n variants={{ animate: { x: [0, 2, 0] }, normal: { x: 0 } }}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nChevronRightIcon.displayName = 'ChevronRightIcon';\n\nexport { ChevronRightIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type CopyIconHandle = AnimatedIconHandle;\n\ntype CopyIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst springTransition = {\n damping: 17,\n mass: 1,\n stiffness: 160,\n type: 'spring' as const,\n};\n\nconst CopyIcon = forwardRef<CopyIconHandle, CopyIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.rect\n animate={controls}\n height='14'\n rx='2'\n ry='2'\n transition={springTransition}\n variants={{\n animate: { translateX: -3, translateY: -3 },\n normal: { translateX: 0, translateY: 0 },\n }}\n width='14'\n x='8'\n y='8'\n />\n <motion.path\n animate={controls}\n d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'\n transition={springTransition}\n variants={{\n animate: { x: 3, y: 3 },\n normal: { x: 0, y: 0 },\n }}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nCopyIcon.displayName = 'CopyIcon';\n\nexport { CopyIcon };\n","'use client';\n\nimport type { HTMLAttributes, MouseEvent } from 'react';\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport type { Transition } from 'motion/react';\nimport { AnimatePresence, motion, useAnimation } from 'motion/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport interface CopyCheckIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n triggerCopied: () => void;\n}\n\ninterface CopyCheckIconProps extends HTMLAttributes<HTMLDivElement> {\n size?: number;\n}\n\nconst SPRING_TRANSITION: Transition = {\n damping: 17,\n mass: 1,\n stiffness: 160,\n type: 'spring',\n};\n\nconst CopyCheckIcon = forwardRef<CopyCheckIconHandle, CopyCheckIconProps>(\n ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n const controls = useAnimation();\n const isControlledRef = useRef(false);\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const triggerCopied = useCallback(() => {\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1500);\n }, []);\n\n useImperativeHandle(ref, () => {\n isControlledRef.current = true;\n\n return {\n startAnimation: () => controls.start('animate'),\n stopAnimation: () => controls.start('normal'),\n triggerCopied,\n };\n });\n\n const handleMouseEnter = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (!copied) {\n if (isControlledRef.current) {\n onMouseEnter?.(e);\n } else {\n controls.start('animate').catch(() => undefined);\n }\n }\n },\n [controls, onMouseEnter, copied],\n );\n\n const handleMouseLeave = useCallback(\n (e: MouseEvent<HTMLDivElement>) => {\n if (!copied) {\n if (isControlledRef.current) {\n onMouseLeave?.(e);\n } else {\n controls.start('normal').catch(() => undefined);\n }\n }\n },\n [controls, onMouseLeave, copied],\n );\n\n return (\n <div\n aria-hidden='true'\n className={cn(\n 'relative inline-flex items-center justify-center',\n className,\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n <AnimatePresence mode='wait'>\n {copied ? (\n <motion.svg\n key='check'\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={{ duration: 0.15 }}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n className='text-green-500'\n >\n <motion.path\n d='M20 6 9 17l-5-5'\n initial={{ pathLength: 0 }}\n animate={{ pathLength: 1 }}\n transition={{ delay: 0.1, duration: 0.3 }}\n />\n </motion.svg>\n ) : (\n <motion.div\n key='copy'\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.5 }}\n transition={{ duration: 0.15 }}\n >\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.rect\n animate={controls}\n height='14'\n rx='2'\n ry='2'\n transition={SPRING_TRANSITION}\n variants={{\n animate: { translateX: -3, translateY: -3 },\n normal: { translateX: 0, translateY: 0 },\n }}\n width='14'\n x='8'\n y='8'\n />\n <motion.path\n animate={controls}\n d='M8 4V2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.75a2 2 0 0 0-2-2H16a2 2 0 0 0-2-2h-2z'\n transition={SPRING_TRANSITION}\n variants={{\n animate: { x: 3, y: 3 },\n normal: { x: 0, y: 0 },\n }}\n />\n </svg>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n },\n);\n\nCopyCheckIcon.displayName = 'CopyCheckIcon';\n\nexport { CopyCheckIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type DollarSignIconHandle = AnimatedIconHandle;\n\ntype DollarSignIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DOLLAR_MAIN_VARIANTS: Variants = {\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n transition: { duration: 0.6, opacity: { duration: 0.1 } },\n },\n normal: {\n opacity: 1,\n pathLength: 1,\n transition: { duration: 0.4, opacity: { duration: 0.1 } },\n },\n};\n\nconst DOLLAR_SECONDARY_VARIANTS: Variants = {\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n pathOffset: [1, 0],\n transition: {\n delay: 0.5,\n duration: 0.4,\n opacity: { delay: 0.5, duration: 0.1 },\n },\n },\n normal: {\n opacity: 1,\n pathLength: 1,\n pathOffset: 0,\n transition: {\n delay: 0.3,\n duration: 0.3,\n opacity: { delay: 0.3, duration: 0.1 },\n },\n },\n};\n\nconst DollarSignIcon = forwardRef<DollarSignIconHandle, DollarSignIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'\n initial='normal'\n variants={DOLLAR_MAIN_VARIANTS}\n />\n <motion.path\n animate={controls}\n d='M12 22 L12 2'\n initial='normal'\n variants={DOLLAR_SECONDARY_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nDollarSignIcon.displayName = 'DollarSignIcon';\n\nexport { DollarSignIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type DownloadIconHandle = AnimatedIconHandle;\n\ntype DownloadIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DownloadIcon = forwardRef<DownloadIconHandle, DownloadIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M12 15V3'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { y: [0, 2, 0] }, normal: { y: 0 } }}\n />\n <motion.path\n animate={controls}\n d='m8 11 4 4 4-4'\n transition={{ duration: 0.3, times: [0, 0.4, 1] }}\n variants={{ animate: { y: [0, 2, 0] }, normal: { y: 0 } }}\n />\n <path d='M20 21H4' />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nDownloadIcon.displayName = 'DownloadIcon';\n\nexport { DownloadIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type FingerprintIconHandle = AnimatedIconHandle;\n\ntype FingerprintIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n opacity: [0, 0, 1, 1, 1],\n pathLength: [0.1, 0.3, 0.5, 0.7, 0.9, 1],\n transition: { opacity: { duration: 0.5 }, pathLength: { duration: 2 } },\n },\n normal: { opacity: 1, pathLength: 1 },\n};\n\nconst FINGERPRINT_PATHS = [\n { d: 'M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4' },\n { d: 'M14 13.12c0 2.38 0 6.38-1 8.88' },\n { d: 'M17.29 21.02c.12-.6.43-2.3.5-3.02' },\n { d: 'M2 12a10 10 0 0 1 18-6' },\n { d: 'M2 16h.01' },\n { d: 'M21.8 16c.2-2 .131-5.354 0-6' },\n { d: 'M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2' },\n { d: 'M8.65 22c.21-.66.45-1.32.57-2' },\n { d: 'M9 6.8a6 6 0 0 1 9 5.2v2' },\n] as const;\n\nconst FingerprintIcon = forwardRef<FingerprintIconHandle, FingerprintIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n {FINGERPRINT_PATHS.map(({ d }) => (\n <path d={d} key={d} strokeOpacity={0.4} />\n ))}\n {FINGERPRINT_PATHS.map(({ d }) => (\n <motion.path\n animate={controls}\n d={d}\n key={`motion-${d}`}\n variants={PATH_VARIANTS}\n />\n ))}\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nFingerprintIcon.displayName = 'FingerprintIcon';\n\nexport { FingerprintIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type HomeIconHandle = AnimatedIconHandle;\n\ntype HomeIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.6,\n opacity: { duration: 0.2 },\n};\n\nconst PATH_VARIANTS: Variants = {\n animate: { opacity: [0, 1], pathLength: [0, 1] },\n normal: { opacity: 1, pathLength: 1 },\n};\n\nconst HomeIcon = forwardRef<HomeIconHandle, HomeIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z' />\n <motion.path\n animate={controls}\n d='M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nHomeIcon.displayName = 'HomeIcon';\n\nexport { HomeIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type KeyIconHandle = AnimatedIconHandle;\n\ntype KeyIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst KeyIcon = forwardRef<KeyIconHandle, KeyIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n initial='normal'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n style={{ originX: 0.3, originY: 0.7 }}\n variants={{\n animate: {\n rotate: [-3, -33, -25, -28],\n transition: {\n duration: 0.6,\n ease: 'easeInOut',\n times: [0, 0.6, 0.8, 1],\n },\n },\n normal: {\n rotate: 0,\n transition: {\n damping: 14,\n duration: 0.8,\n stiffness: 120,\n type: 'spring',\n },\n },\n }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4' />\n <path d='m21 2-9.6 9.6' />\n <circle cx='7.5' cy='15.5' r='5.5' />\n </motion.svg>\n )}\n </AnimatedIcon>\n));\n\nKeyIcon.displayName = 'KeyIcon';\n\nexport { KeyIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type LayoutPanelTopIconHandle = AnimatedIconHandle;\n\ntype LayoutPanelTopIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst LayoutPanelTopIcon = forwardRef<\n LayoutPanelTopIconHandle,\n LayoutPanelTopIconProps\n>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.rect\n animate={controls}\n height='7'\n initial='normal'\n rx='1'\n variants={{\n animate: {\n opacity: [0, 1],\n transition: {\n duration: 0.5,\n opacity: { duration: 0.5, times: [0.2, 1] },\n },\n translateY: [-5, 0],\n },\n normal: { opacity: 1, translateY: 0 },\n }}\n width='18'\n x='3'\n y='3'\n />\n <motion.rect\n animate={controls}\n height='7'\n initial='normal'\n rx='1'\n variants={{\n animate: {\n opacity: [0, 1],\n transition: {\n duration: 0.5,\n opacity: { duration: 0.7, times: [0.5, 1] },\n translateX: { delay: 0.3 },\n },\n translateX: [-10, 0],\n },\n normal: { opacity: 1, translateX: 0 },\n }}\n width='7'\n x='3'\n y='14'\n />\n <motion.rect\n animate={controls}\n height='7'\n initial='normal'\n rx='1'\n variants={{\n animate: {\n opacity: [0, 1],\n transition: {\n duration: 0.5,\n opacity: { duration: 0.8, times: [0.5, 1] },\n translateX: { delay: 0.4 },\n },\n translateX: [10, 0],\n },\n normal: { opacity: 1, translateX: 0 },\n }}\n width='7'\n x='14'\n y='14'\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nLayoutPanelTopIcon.displayName = 'LayoutPanelTopIcon';\n\nexport { LayoutPanelTopIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type LinkIconHandle = AnimatedIconHandle;\n\ntype LinkIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n pathLength: [1, 0.97, 1, 0.97, 1],\n pathOffset: [0, 0.05, 0, 0.05, 0],\n rotate: [0, -5, 0],\n transition: {\n duration: 1,\n ease: 'easeInOut',\n rotate: { duration: 0.5 },\n times: [0, 0.2, 0.4, 0.6, 1],\n },\n },\n normal: { pathLength: 1, pathOffset: 0, rotate: 0 },\n};\n\nconst LinkIcon = forwardRef<LinkIconHandle, LinkIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <motion.path\n animate={controls}\n d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'\n variants={PATH_VARIANTS}\n />\n <motion.path\n animate={controls}\n d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nLinkIcon.displayName = 'LinkIcon';\n\nexport { LinkIcon };\n","import { type ReactElement, type SVGProps } from 'react';\n\ninterface IconProps extends SVGProps<SVGSVGElement> {\n size?: number;\n}\n\nexport const ClaudeLogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z\"\n fill=\"#D97757\"\n fillRule=\"nonzero\"\n />\n </svg>\n);\n\nexport const CursorLogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect width=\"24\" height=\"24\" rx=\"5\" fill=\"#F5F5F5\" />\n <path d=\"M12 4L5 8v8l7 4 7-4V8l-7-4z\" fill=\"#E5E5E5\" />\n <path d=\"M12 4L5 8l7 4 7-4-7-4z\" fill=\"#808080\" />\n <path d=\"M12 12l7-4v8l-7 4v-8z\" fill=\"#666\" />\n <path d=\"M12 12L5 8v8l7 4v-8z\" fill=\"#999\" />\n </svg>\n);\n\nexport const VSCodeLogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <mask\n id=\"vsc-mask\"\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n width=\"100\"\n height=\"100\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M70.912 99.317C72.487 99.931 74.283 99.891 75.873 99.126L96.461 89.22C98.624 88.179 100 85.989 100 83.587V16.413C100 14.011 98.624 11.822 96.461 10.781L75.873 0.874C73.786 -0.13 71.345 0.116 69.513 1.447C69.252 1.637 69.003 1.849 68.769 2.083L29.355 38.041L12.187 25.01C10.589 23.797 8.354 23.896 6.869 25.246L1.363 30.255C-0.453 31.906 -0.455 34.763 1.359 36.417L16.247 50L1.359 63.583C-0.455 65.237 -0.453 68.094 1.363 69.745L6.869 74.754C8.354 76.104 10.589 76.204 12.187 74.99L29.355 61.959L68.769 97.917C69.392 98.541 70.125 99.01 70.912 99.317ZM75.015 27.299L45.109 50L75.015 72.701V27.299Z\"\n fill=\"#fff\"\n />\n </mask>\n <g mask=\"url(#vsc-mask)\">\n <path\n d=\"M96.461 10.796L75.857 0.876C73.472 -0.273 70.622 0.212 68.75 2.083L1.299 63.583C-0.516 65.237 -0.514 68.094 1.303 69.745L6.813 74.754C8.298 76.104 10.535 76.204 12.134 74.99L93.361 13.37C96.086 11.303 100 13.246 100 16.667V16.427C100 14.027 98.625 11.838 96.461 10.796Z\"\n fill=\"#0065A9\"\n />\n <path\n d=\"M96.461 89.204L75.857 99.124C73.472 100.273 70.622 99.788 68.75 97.917L1.299 36.417C-0.516 34.763 -0.514 31.906 1.303 30.255L6.813 25.246C8.298 23.896 10.535 23.796 12.134 25.009L93.361 86.63C96.086 88.697 100 86.754 100 83.333V83.573C100 85.974 98.625 88.162 96.461 89.204Z\"\n fill=\"#007ACC\"\n />\n <path\n d=\"M75.858 99.126C73.472 100.274 70.622 99.788 68.75 97.917C71.056 100.223 75 98.59 75 95.328V4.672C75 1.41 71.056 -0.223 68.75 2.083C70.622 0.211 73.472 -0.274 75.858 0.874L96.459 10.781C98.623 11.822 100 14.011 100 16.413V83.587C100 85.989 98.623 88.179 96.459 89.22L75.858 99.126Z\"\n fill=\"#1F9CF0\"\n />\n </g>\n </svg>\n);\n\nexport const OpenAILogo = ({ size = 32, ...props }: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <defs>\n <linearGradient\n gradientUnits=\"userSpaceOnUse\"\n id=\"codex-grad\"\n x1=\"12\"\n x2=\"12\"\n y1=\"3\"\n y2=\"21\"\n >\n <stop stopColor=\"#B1A7FF\" />\n <stop offset=\".5\" stopColor=\"#7A9DFF\" />\n <stop offset=\"1\" stopColor=\"#3941FF\" />\n </linearGradient>\n </defs>\n <path\n d=\"M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z\"\n fill=\"#F0F6FF\"\n />\n <path\n d=\"M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z\"\n fill=\"url(#codex-grad)\"\n />\n </svg>\n);\n\nexport const WindsurfLogo = ({\n size = 32,\n ...props\n}: IconProps): ReactElement => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 1024 1024\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M897.246 286.869H889.819C850.735 286.808 819.017 318.46 819.017 357.539V515.589C819.017 547.15 792.93 572.716 761.882 572.716C743.436 572.716 725.02 563.433 714.093 547.85L552.673 317.304C539.28 298.16 517.486 286.747 493.895 286.747C457.094 286.747 423.976 318.034 423.976 356.657V515.619C423.976 547.181 398.103 572.746 366.842 572.746C348.335 572.746 329.949 563.463 319.021 547.881L138.395 289.882C134.316 284.038 125.154 286.93 125.154 294.052V431.892C125.154 438.862 127.285 445.619 131.272 451.34L309.037 705.2C319.539 720.204 335.033 731.344 352.9 735.392C397.616 745.557 438.77 711.135 438.77 667.278V508.406C438.77 476.845 464.339 451.279 495.904 451.279H495.995C515.02 451.279 532.857 460.562 543.785 476.145L705.235 706.661C718.659 725.835 739.327 737.218 763.983 737.218C801.606 737.218 833.841 705.9 833.841 667.308V508.376C833.841 476.815 859.41 451.249 890.975 451.249H897.276C901.233 451.249 904.43 448.053 904.43 444.097V294.021C904.43 290.065 901.233 286.869 897.276 286.869H897.246Z\"\n fill=\"#0B100F\"\n />\n </svg>\n);\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type MoonIconHandle = AnimatedIconHandle;\n\ntype MoonIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst SVG_VARIANTS: Variants = {\n animate: { rotate: [0, -10, 10, -5, 5, 0] },\n normal: { rotate: 0 },\n};\n\nconst SVG_TRANSITION: Transition = {\n duration: 1.2,\n ease: 'easeInOut',\n};\n\nconst MoonIcon = forwardRef<MoonIconHandle, MoonIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={SVG_TRANSITION}\n variants={SVG_VARIANTS}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z' />\n </motion.svg>\n )}\n </AnimatedIcon>\n));\n\nMoonIcon.displayName = 'MoonIcon';\n\nexport { MoonIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type PanelLeftCloseIconHandle = AnimatedIconHandle;\n\ntype PanelLeftCloseIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.5,\n times: [0, 0.4, 1],\n};\n\nconst PATH_VARIANTS: Variants = {\n animate: { x: [0, -1.5, 0] },\n normal: { x: 0 },\n};\n\nconst PanelLeftCloseIcon = forwardRef<\n PanelLeftCloseIconHandle,\n PanelLeftCloseIconProps\n>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <rect height='18' rx='2' width='18' x='3' y='3' />\n <path d='M9 3v18' />\n <motion.path\n animate={controls}\n d='m16 15-3-3 3-3'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nPanelLeftCloseIcon.displayName = 'PanelLeftCloseIcon';\n\nexport { PanelLeftCloseIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Transition, Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type PanelLeftOpenIconHandle = AnimatedIconHandle;\n\ntype PanelLeftOpenIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst DEFAULT_TRANSITION: Transition = {\n duration: 0.5,\n times: [0, 0.4, 1],\n};\n\nconst PATH_VARIANTS: Variants = {\n animate: { x: [0, 1.5, 0] },\n normal: { x: 0 },\n};\n\nconst PanelLeftOpenIcon = forwardRef<\n PanelLeftOpenIconHandle,\n PanelLeftOpenIconProps\n>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <rect height='18' rx='2' width='18' x='3' y='3' />\n <path d='M9 3v18' />\n <motion.path\n animate={controls}\n d='m14 9 3 3-3 3'\n transition={DEFAULT_TRANSITION}\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nPanelLeftOpenIcon.displayName = 'PanelLeftOpenIcon';\n\nexport { PanelLeftOpenIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type PlusIconHandle = AnimatedIconHandle;\n\ntype PlusIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PlusIcon = forwardRef<PlusIconHandle, PlusIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{ damping: 15, stiffness: 100, type: 'spring' }}\n variants={{ animate: { rotate: 180 }, normal: { rotate: 0 } }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M5 12h14' />\n <path d='M12 5v14' />\n </motion.svg>\n )}\n </AnimatedIcon>\n));\n\nPlusIcon.displayName = 'PlusIcon';\n\nexport { PlusIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type RefreshCWIconHandle = AnimatedIconHandle;\n\ntype RefreshCWIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst RefreshCWIcon = forwardRef<RefreshCWIconHandle, RefreshCWIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{ damping: 25, stiffness: 250, type: 'spring' }}\n variants={{ animate: { rotate: '50deg' }, normal: { rotate: '0deg' } }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8' />\n <path d='M21 3v5h-5' />\n <path d='M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16' />\n <path d='M8 16H3v5' />\n </motion.svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nRefreshCWIcon.displayName = 'RefreshCWIcon';\n\nexport { RefreshCWIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type SearchIconHandle = AnimatedIconHandle;\n\ntype SearchIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst SearchIcon = forwardRef<SearchIconHandle, SearchIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{\n bounce: 0.3,\n duration: 1,\n }}\n variants={{\n animate: {\n x: [0, 0, -3, 0],\n y: [0, -4, 0, 0],\n },\n normal: { x: 0, y: 0 },\n }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle cx='11' cy='11' r='8' />\n <path d='m21 21-4.3-4.3' />\n </motion.svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nSearchIcon.displayName = 'SearchIcon';\n\nexport { SearchIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type SettingsIconHandle = AnimatedIconHandle;\n\ntype SettingsIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst SettingsIcon = forwardRef<SettingsIconHandle, SettingsIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <motion.svg\n animate={controls}\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n transition={{ damping: 10, stiffness: 50, type: 'spring' }}\n variants={{\n animate: { rotate: 180 },\n normal: { rotate: 0 },\n }}\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z' />\n <circle cx='12' cy='12' r='3' />\n </motion.svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nSettingsIcon.displayName = 'SettingsIcon';\n\nexport { SettingsIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type ShieldCheckIconHandle = AnimatedIconHandle;\n\ntype ShieldCheckIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n scale: [0.5, 1],\n transition: { duration: 0.4, opacity: { duration: 0.1 } },\n },\n normal: {\n opacity: 1,\n pathLength: 1,\n scale: 1,\n transition: { duration: 0.3, opacity: { duration: 0.1 } },\n },\n};\n\nconst ShieldCheckIcon = forwardRef<ShieldCheckIconHandle, ShieldCheckIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z' />\n <motion.path\n animate={controls}\n d='m9 12 2 2 4-4'\n initial='normal'\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nShieldCheckIcon.displayName = 'ShieldCheckIcon';\n\nexport { ShieldCheckIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type SunIconHandle = AnimatedIconHandle;\n\ntype SunIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: (i: number) => ({\n opacity: [0, 1],\n transition: { delay: i * 0.1, duration: 0.3 },\n }),\n normal: { opacity: 1 },\n};\n\nconst SUN_PATHS = [\n 'M12 2v2',\n 'm19.07 4.93-1.41 1.41',\n 'M20 12h2',\n 'm17.66 17.66 1.41 1.41',\n 'M12 20v2',\n 'm6.34 17.66-1.41 1.41',\n 'M2 12h2',\n 'm4.93 4.93 1.41 1.41',\n];\n\nconst SunIcon = forwardRef<SunIconHandle, SunIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle cx='12' cy='12' r='4' />\n {SUN_PATHS.map((d, index) => (\n <motion.path\n animate={controls}\n custom={index + 1}\n d={d}\n key={d}\n variants={PATH_VARIANTS}\n />\n ))}\n </svg>\n )}\n </AnimatedIcon>\n));\n\nSunIcon.displayName = 'SunIcon';\n\nexport { SunIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type TerminalIconHandle = AnimatedIconHandle;\n\ntype TerminalIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst LINE_VARIANTS: Variants = {\n animate: {\n opacity: [1, 0, 1],\n transition: { duration: 0.8, ease: 'linear', repeat: Infinity },\n },\n normal: { opacity: 1 },\n};\n\nconst TerminalIcon = forwardRef<TerminalIconHandle, TerminalIconProps>(\n (props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <polyline points='4 17 10 11 4 5' />\n <motion.line\n animate={controls}\n initial='normal'\n variants={LINE_VARIANTS}\n x1='12'\n x2='20'\n y1='19'\n y2='19'\n />\n </svg>\n )}\n </AnimatedIcon>\n ),\n);\n\nTerminalIcon.displayName = 'TerminalIcon';\n\nexport { TerminalIcon };\n","'use client';\n\nimport { forwardRef } from 'react';\nimport type { Variants } from 'motion/react';\nimport { motion } from 'motion/react';\n\nimport {\n AnimatedIcon,\n type AnimatedIconHandle,\n type AnimatedIconProps,\n} from '../animated-icon';\n\nexport type UsersIconHandle = AnimatedIconHandle;\n\ntype UsersIconProps = Omit<AnimatedIconProps, 'children'>;\n\nconst PATH_VARIANTS: Variants = {\n animate: {\n transition: { damping: 13, delay: 0.1, stiffness: 200, type: 'spring' },\n translateX: [-6, 0],\n },\n normal: {\n transition: { damping: 13, stiffness: 200, type: 'spring' },\n translateX: 0,\n },\n};\n\nconst UsersIcon = forwardRef<UsersIconHandle, UsersIconProps>((props, ref) => (\n <AnimatedIcon ref={ref} {...props}>\n {(controls, size) => (\n <svg\n fill='none'\n height={size}\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n viewBox='0 0 24 24'\n width={size}\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2' />\n <circle cx='9' cy='7' r='4' />\n <motion.path\n animate={controls}\n d='M22 21v-2a4 4 0 0 0-3-3.87'\n variants={PATH_VARIANTS}\n />\n <motion.path\n animate={controls}\n d='M16 3.13a4 4 0 0 1 0 7.75'\n variants={PATH_VARIANTS}\n />\n </svg>\n )}\n </AnimatedIcon>\n));\n\nUsersIcon.displayName = 'UsersIcon';\n\nexport { UsersIcon };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,WAAiC,QAAQ,KAAK,OAAO,CAAC;;;;;ACE5E,MAAM,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAUD,MAAM,WAAW,EAAE,WAAW,OAAO,WACnC,oBAAC;CAAO,cAAW;CAAU,WAAU;WACrC,qBAAC;EACC,SAAQ;EACR,MAAK;EACL,OAAM;EACN,WAAW,GACT,2CACA,QAAQ,OACR,UACD;aAED,oBAAC;GACC,WAAU;GACV,IAAG;GACH,IAAG;GACH,GAAE;GACF,QAAO;GACP,aAAY;IACZ,EACF,oBAAC;GACC,WAAU;GACV,MAAK;GACL,GAAE;IACF;GACE;EACC;;;;ACtCX,MAAM,iBAAiB,IACrB,qmBACA;CAME,kBAAkB;EAChB;GACE,OAAO;GACP,MAAM;GACN,SAAS;IAAC;IAAW;IAAe;IAAW;IAAY;GAC5D;EACD;GACE,OAAO;GACP,MAAM;GACN,SAAS;IAAC;IAAW;IAAe;IAAW;IAAY;GAC5D;EACD;GACE,OAAO;GACP,MAAM;GACN,SAAS;IAAC;IAAW;IAAe;IAAW;IAAY;GAC5D;EACF;CACD,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;GACJ,SACE;GACF,MAAM;GACN,WACE;GACF,WACE;GAC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