@gerege-systems/ui 0.11.2 → 0.12.1

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/dist-lib/component-styles.css +342 -0
  2. package/dist-lib/components/ui/Accordion.js +16 -15
  3. package/dist-lib/components/ui/Accordion.js.map +1 -1
  4. package/dist-lib/components/ui/Alert.js +8 -7
  5. package/dist-lib/components/ui/Alert.js.map +1 -1
  6. package/dist-lib/components/ui/Avatar.js +8 -7
  7. package/dist-lib/components/ui/Avatar.js.map +1 -1
  8. package/dist-lib/components/ui/Badge.js +21 -12
  9. package/dist-lib/components/ui/Badge.js.map +1 -1
  10. package/dist-lib/components/ui/Breadcrumbs.js +5 -4
  11. package/dist-lib/components/ui/Breadcrumbs.js.map +1 -1
  12. package/dist-lib/components/ui/Button.js +14 -13
  13. package/dist-lib/components/ui/Button.js.map +1 -1
  14. package/dist-lib/components/ui/Calendar.js +1 -0
  15. package/dist-lib/components/ui/Calendar.js.map +1 -1
  16. package/dist-lib/components/ui/Card.js +4 -3
  17. package/dist-lib/components/ui/Card.js.map +1 -1
  18. package/dist-lib/components/ui/Carousel.js +1 -0
  19. package/dist-lib/components/ui/Carousel.js.map +1 -1
  20. package/dist-lib/components/ui/Chart.js +1 -0
  21. package/dist-lib/components/ui/Chart.js.map +1 -1
  22. package/dist-lib/components/ui/Checkbox.js +12 -12
  23. package/dist-lib/components/ui/Checkbox.js.map +1 -1
  24. package/dist-lib/components/ui/Combobox.js +2 -0
  25. package/dist-lib/components/ui/Combobox.js.map +1 -1
  26. package/dist-lib/components/ui/CommandPalette.js +1 -0
  27. package/dist-lib/components/ui/CommandPalette.js.map +1 -1
  28. package/dist-lib/components/ui/ContextMenu.js +2 -0
  29. package/dist-lib/components/ui/ContextMenu.js.map +1 -1
  30. package/dist-lib/components/ui/DataGrid.js +59 -54
  31. package/dist-lib/components/ui/DataGrid.js.map +1 -1
  32. package/dist-lib/components/ui/DatePicker.js +30 -29
  33. package/dist-lib/components/ui/DatePicker.js.map +1 -1
  34. package/dist-lib/components/ui/Dialog.js +2 -0
  35. package/dist-lib/components/ui/Dialog.js.map +1 -1
  36. package/dist-lib/components/ui/Drawer.js +2 -0
  37. package/dist-lib/components/ui/Drawer.js.map +1 -1
  38. package/dist-lib/components/ui/DropdownMenu.js +12 -10
  39. package/dist-lib/components/ui/DropdownMenu.js.map +1 -1
  40. package/dist-lib/components/ui/EmptyState.js +5 -4
  41. package/dist-lib/components/ui/EmptyState.js.map +1 -1
  42. package/dist-lib/components/ui/ErrorState.js +1 -0
  43. package/dist-lib/components/ui/ErrorState.js.map +1 -1
  44. package/dist-lib/components/ui/FileUpload.js +16 -15
  45. package/dist-lib/components/ui/FileUpload.js.map +1 -1
  46. package/dist-lib/components/ui/IconButton.js +9 -8
  47. package/dist-lib/components/ui/IconButton.js.map +1 -1
  48. package/dist-lib/components/ui/Input.js +1 -1
  49. package/dist-lib/components/ui/Input.js.map +1 -1
  50. package/dist-lib/components/ui/Kbd.js +9 -8
  51. package/dist-lib/components/ui/Kbd.js.map +1 -1
  52. package/dist-lib/components/ui/MultiSelect.js +167 -162
  53. package/dist-lib/components/ui/MultiSelect.js.map +1 -1
  54. package/dist-lib/components/ui/Pagination.js +11 -10
  55. package/dist-lib/components/ui/Pagination.js.map +1 -1
  56. package/dist-lib/components/ui/Popover.js +4 -3
  57. package/dist-lib/components/ui/Popover.js.map +1 -1
  58. package/dist-lib/components/ui/Progress.js +14 -13
  59. package/dist-lib/components/ui/Progress.js.map +1 -1
  60. package/dist-lib/components/ui/RadioGroup.js +11 -10
  61. package/dist-lib/components/ui/RadioGroup.js.map +1 -1
  62. package/dist-lib/components/ui/RelativeTime.js +9 -8
  63. package/dist-lib/components/ui/RelativeTime.js.map +1 -1
  64. package/dist-lib/components/ui/ScrollArea.js +8 -7
  65. package/dist-lib/components/ui/ScrollArea.js.map +1 -1
  66. package/dist-lib/components/ui/Select.js +1 -0
  67. package/dist-lib/components/ui/Select.js.map +1 -1
  68. package/dist-lib/components/ui/Separator.js +8 -7
  69. package/dist-lib/components/ui/Separator.js.map +1 -1
  70. package/dist-lib/components/ui/Sheet.js +4 -3
  71. package/dist-lib/components/ui/Sheet.js.map +1 -1
  72. package/dist-lib/components/ui/Sidebar.js +1 -0
  73. package/dist-lib/components/ui/Sidebar.js.map +1 -1
  74. package/dist-lib/components/ui/Skeleton.js +9 -8
  75. package/dist-lib/components/ui/Skeleton.js.map +1 -1
  76. package/dist-lib/components/ui/Slider.js +17 -8
  77. package/dist-lib/components/ui/Slider.js.map +1 -1
  78. package/dist-lib/components/ui/Snackbar.js +8 -7
  79. package/dist-lib/components/ui/Snackbar.js.map +1 -1
  80. package/dist-lib/components/ui/Spinner.js +1 -0
  81. package/dist-lib/components/ui/Spinner.js.map +1 -1
  82. package/dist-lib/components/ui/Stepper.js +21 -14
  83. package/dist-lib/components/ui/Stepper.js.map +1 -1
  84. package/dist-lib/components/ui/Switch.js +4 -3
  85. package/dist-lib/components/ui/Switch.js.map +1 -1
  86. package/dist-lib/components/ui/Table.js +24 -22
  87. package/dist-lib/components/ui/Table.js.map +1 -1
  88. package/dist-lib/components/ui/Tabs.js +6 -5
  89. package/dist-lib/components/ui/Tabs.js.map +1 -1
  90. package/dist-lib/components/ui/TagInput.js +14 -13
  91. package/dist-lib/components/ui/TagInput.js.map +1 -1
  92. package/dist-lib/components/ui/Textarea.js +6 -6
  93. package/dist-lib/components/ui/Textarea.js.map +1 -1
  94. package/dist-lib/components/ui/Timeline.js +41 -16
  95. package/dist-lib/components/ui/Timeline.js.map +1 -1
  96. package/dist-lib/components/ui/Toast.js +38 -28
  97. package/dist-lib/components/ui/Toast.js.map +1 -1
  98. package/dist-lib/components/ui/Tooltip.js +15 -14
  99. package/dist-lib/components/ui/Tooltip.js.map +1 -1
  100. package/dist-lib/components/ui/TopNav.js +16 -15
  101. package/dist-lib/components/ui/TopNav.js.map +1 -1
  102. package/dist-lib/components/ui/Tree.js +22 -21
  103. package/dist-lib/components/ui/Tree.js.map +1 -1
  104. package/dist-lib/styles.css +1 -1
  105. package/dist-lib/theme.css +26 -1
  106. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sources":["../../../src/components/ui/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n type TextareaHTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cn } from '@/lib/utils';\nimport { useFieldIds } from '@/hooks/use-field-ids';\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Visible label above the field. */\n label?: ReactNode;\n /** Hint below the field. Hidden when `error` is set. */\n helperText?: ReactNode;\n /** Validation message. Sets `aria-invalid`. */\n error?: ReactNode;\n /** Grow vertically as content is added. */\n autoResize?: boolean;\n /** Minimum rows when `autoResize`. Defaults to 3. */\n minRows?: number;\n /** Maximum rows before scrolling when `autoResize`. Defaults to 12. */\n maxRows?: number;\n /** Visually hide the label while keeping it accessible. */\n hideLabel?: boolean;\n}\n\n/**\n * Multi-line text input. With `autoResize`, height tracks content from\n * `minRows` to `maxRows`. Without it, behaves like a native `<textarea>`.\n *\n * @example Comment box\n * <Textarea label=\"Note\" autoResize minRows={3} maxRows={10} />\n *\n * @example With error\n * <Textarea label=\"Description\"\n * error={errors.description?.message}\n * {...register('description')} />\n *\n * @do Default to `autoResize` for multi-line free-form input.\n * @dont Add `resize-none` without auto-resize — users will be stuck with a\n * 3-line box for long content.\n */\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n {\n className,\n label,\n helperText,\n error,\n autoResize,\n minRows = 3,\n maxRows = 12,\n hideLabel,\n id,\n onChange,\n value,\n defaultValue,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n ...props\n },\n ref,\n) {\n const isError = Boolean(error) || ariaInvalid === true || ariaInvalid === 'true';\n const { fieldId, helperId, errorId, describedBy } = useFieldIds(id, {\n hasHelper: Boolean(helperText),\n hasError: Boolean(error),\n extra: ariaDescribedby,\n });\n const innerRef = useRef<HTMLTextAreaElement | null>(null);\n\n // Stash a ref locally and forward to the consumer.\n const setRef = (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n };\n\n const recompute = useCallback(() => {\n const el = innerRef.current;\n if (!el || !autoResize) return;\n const cs = getComputedStyle(el);\n const lineHeight = parseFloat(cs.lineHeight) || 20;\n // scrollHeight includes padding but not borders; the element is border-box.\n const padding = (parseFloat(cs.paddingTop) || 0) + (parseFloat(cs.paddingBottom) || 0);\n const border = (parseFloat(cs.borderTopWidth) || 0) + (parseFloat(cs.borderBottomWidth) || 0);\n const minH = lineHeight * minRows + padding + border;\n const maxH = lineHeight * maxRows + padding + border;\n el.style.height = 'auto';\n const content = el.scrollHeight + border;\n el.style.height = `${Math.min(Math.max(content, minH), maxH)}px`;\n el.style.overflowY = content > maxH ? 'auto' : 'hidden';\n }, [autoResize, minRows, maxRows]);\n\n useEffect(() => {\n if (autoResize) recompute();\n }, [autoResize, recompute, value, defaultValue]);\n\n // Width changes re-wrap the text, so recompute on resize too.\n useEffect(() => {\n const el = innerRef.current;\n if (!autoResize || !el || typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(() => recompute());\n ro.observe(el);\n return () => ro.disconnect();\n }, [autoResize, recompute]);\n\n return (\n <div className={cn('flex flex-col gap-1.5', className)}>\n {label && (\n <label\n htmlFor={fieldId}\n className={cn('text-foreground text-sm font-medium', hideLabel && 'sr-only')}\n >\n {label}\n </label>\n )}\n <textarea\n ref={setRef}\n id={fieldId}\n rows={minRows}\n value={value}\n defaultValue={defaultValue}\n onChange={(e) => {\n onChange?.(e);\n if (autoResize) recompute();\n }}\n aria-invalid={isError ? true : ariaInvalid}\n aria-describedby={describedBy}\n className={cn(\n 'bg-card text-foreground rounded-md border px-3 py-2 text-lg md:text-sm',\n 'placeholder:text-foreground-subtle',\n 'transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]',\n 'outline-none',\n 'focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2',\n 'focus-visible:ring-offset-background',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'border-border-input focus-visible:border-accent',\n 'aria-invalid:border-danger aria-invalid:focus-visible:border-danger aria-invalid:focus-visible:ring-danger',\n autoResize ? 'resize-none' : 'min-h-20 resize-y',\n )}\n {...props}\n />\n {error ? (\n <p id={errorId} className=\"text-danger-text text-xs\">\n {error}\n </p>\n ) : helperText ? (\n <p id={helperId} className=\"text-foreground-subtle text-xs\">\n {helperText}\n </p>\n ) : null}\n </div>\n );\n});\n\nTextarea.displayName = 'Textarea';\n"],"names":["Textarea","forwardRef","className","label","helperText","error","autoResize","minRows","maxRows","hideLabel","id","onChange","value","defaultValue","ariaDescribedby","ariaInvalid","props","ref","isError","fieldId","helperId","errorId","describedBy","useFieldIds","innerRef","useRef","setRef","node","recompute","useCallback","el","cs","lineHeight","padding","border","minH","maxH","content","useEffect","ro","cn","jsx"],"mappings":";;;;;AA8CO,MAAMA,IAAWC,EAA+C,SACrE;AAAA,EACE,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,oBAAoBC;AAAA,EACpB,gBAAgBC;AAAA,EAChB,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAU,EAAQb,KAAUU,MAAgB,MAAQA,MAAgB,QACpE,EAAE,SAAAI,GAAS,UAAAC,GAAU,SAAAC,GAAS,aAAAC,EAAA,IAAgBC,EAAYb,GAAI;AAAA,IAClE,WAAW,EAAQN;AAAA,IACnB,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AGvB,OAAA,EAAI,WAAWY,EAAG,yBAAyBtC,CAAS,GAClD,UAAA;AAAA,IAAAC,KACC,gBAAAsC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAStB;AAAA,QACT,WAAWqB,EAAG,uCAAuC/B,KAAa,SAAS;AAAA,QAE1E,UAAAN;AAAA,MAAA;AAAA,IAAA;AAAA,IAGL,gBAAAsC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKf;AAAA,QACL,IAAIP;AAAA,QACJ,MAAMZ;AAAA,QACN,OAAAK;AAAA,QACA,cAAAC;AAAA,QACA,UAAU,CAAC,MAAM;AACf,UAAAF,KAAA,QAAAA,EAAW,IACPL,KAAYsB,EAAA;AAAA,QAClB;AAAA,QACA,gBAAcV,IAAU,KAAOH;AAAA,QAC/B,oBAAkBO;AAAA,QAClB,WAAWkB;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACAlC,IAAa,gBAAgB;AAAA,QAAA;AAAA,QAE9B,GAAGU;AAAA,MAAA;AAAA,IAAA;AAAA,IAELX,IACC,gBAAAoC,EAAC,KAAA,EAAE,IAAIpB,GAAS,WAAU,4BACvB,UAAAhB,EAAA,CACH,IACED,sBACD,KAAA,EAAE,IAAIgB,GAAU,WAAU,kCACxB,aACH,IACE;AAAA,EAAA,GACN;AAEJ,CAAC;AAEDpB,EAAS,cAAc;"}
1
+ {"version":3,"file":"Textarea.js","sources":["../../../src/components/ui/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n type TextareaHTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cn } from '@/lib/utils';\nimport { useFieldIds } from '@/hooks/use-field-ids';\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Visible label above the field. */\n label?: ReactNode;\n /** Hint below the field. Hidden when `error` is set. */\n helperText?: ReactNode;\n /** Validation message. Sets `aria-invalid`. */\n error?: ReactNode;\n /** Grow vertically as content is added. */\n autoResize?: boolean;\n /** Minimum rows when `autoResize`. Defaults to 3. */\n minRows?: number;\n /** Maximum rows before scrolling when `autoResize`. Defaults to 12. */\n maxRows?: number;\n /** Visually hide the label while keeping it accessible. */\n hideLabel?: boolean;\n}\n\n/**\n * Multi-line text input. With `autoResize`, height tracks content from\n * `minRows` to `maxRows`. Without it, behaves like a native `<textarea>`.\n *\n * @example Comment box\n * <Textarea label=\"Note\" autoResize minRows={3} maxRows={10} />\n *\n * @example With error\n * <Textarea label=\"Description\"\n * error={errors.description?.message}\n * {...register('description')} />\n *\n * @do Default to `autoResize` for multi-line free-form input.\n * @dont Add `resize-none` without auto-resize — users will be stuck with a\n * 3-line box for long content.\n */\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n {\n className,\n label,\n helperText,\n error,\n autoResize,\n minRows = 3,\n maxRows = 12,\n hideLabel,\n id,\n onChange,\n value,\n defaultValue,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n ...props\n },\n ref,\n) {\n const isError = Boolean(error) || ariaInvalid === true || ariaInvalid === 'true';\n const { fieldId, helperId, errorId, describedBy } = useFieldIds(id, {\n hasHelper: Boolean(helperText),\n hasError: Boolean(error),\n extra: ariaDescribedby,\n });\n const innerRef = useRef<HTMLTextAreaElement | null>(null);\n\n // Stash a ref locally and forward to the consumer.\n const setRef = (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n };\n\n const recompute = useCallback(() => {\n const el = innerRef.current;\n if (!el || !autoResize) return;\n const cs = getComputedStyle(el);\n const lineHeight = parseFloat(cs.lineHeight) || 20;\n // scrollHeight includes padding but not borders; the element is border-box.\n const padding = (parseFloat(cs.paddingTop) || 0) + (parseFloat(cs.paddingBottom) || 0);\n const border = (parseFloat(cs.borderTopWidth) || 0) + (parseFloat(cs.borderBottomWidth) || 0);\n const minH = lineHeight * minRows + padding + border;\n const maxH = lineHeight * maxRows + padding + border;\n el.style.height = 'auto';\n const content = el.scrollHeight + border;\n el.style.height = `${Math.min(Math.max(content, minH), maxH)}px`;\n el.style.overflowY = content > maxH ? 'auto' : 'hidden';\n }, [autoResize, minRows, maxRows]);\n\n useEffect(() => {\n if (autoResize) recompute();\n }, [autoResize, recompute, value, defaultValue]);\n\n // Width changes re-wrap the text, so recompute on resize too.\n useEffect(() => {\n const el = innerRef.current;\n if (!autoResize || !el || typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(() => recompute());\n ro.observe(el);\n return () => ro.disconnect();\n }, [autoResize, recompute]);\n\n return (\n <div data-slot=\"textarea-field\" className={cn('flex flex-col gap-1.5', className)}>\n {label && (\n <label\n htmlFor={fieldId}\n className={cn('text-foreground text-sm font-medium', hideLabel && 'sr-only')}\n >\n {label}\n </label>\n )}\n <textarea\n ref={setRef}\n id={fieldId}\n rows={minRows}\n value={value}\n defaultValue={defaultValue}\n onChange={(e) => {\n onChange?.(e);\n if (autoResize) recompute();\n }}\n aria-invalid={isError ? true : ariaInvalid}\n aria-describedby={describedBy}\n className={cn(\n 'bg-card text-foreground rounded-md border px-3 py-2 text-lg md:text-sm',\n 'placeholder:text-foreground-subtle',\n 'transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]',\n 'outline-none',\n 'focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2',\n 'focus-visible:ring-offset-background',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'border-border-input focus-visible:border-accent',\n 'aria-invalid:border-danger aria-invalid:focus-visible:border-danger aria-invalid:focus-visible:ring-danger',\n autoResize ? 'resize-none' : 'min-h-20 resize-y',\n )}\n {...props}\n />\n {error ? (\n <p id={errorId} className=\"text-danger-text text-xs\">\n {error}\n </p>\n ) : helperText ? (\n <p id={helperId} className=\"text-foreground-subtle text-xs\">\n {helperText}\n </p>\n ) : null}\n </div>\n );\n});\n\nTextarea.displayName = 'Textarea';\n"],"names":["Textarea","forwardRef","className","label","helperText","error","autoResize","minRows","maxRows","hideLabel","id","onChange","value","defaultValue","ariaDescribedby","ariaInvalid","props","ref","isError","fieldId","helperId","errorId","describedBy","useFieldIds","innerRef","useRef","setRef","node","recompute","useCallback","el","cs","lineHeight","padding","border","minH","maxH","content","useEffect","ro","jsxs","cn","jsx"],"mappings":";;;;;AA8CO,MAAMA,IAAWC,EAA+C,SACrE;AAAA,EACE,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,oBAAoBC;AAAA,EACpB,gBAAgBC;AAAA,EAChB,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAU,EAAQb,KAAUU,MAAgB,MAAQA,MAAgB,QACpE,EAAE,SAAAI,GAAS,UAAAC,GAAU,SAAAC,GAAS,aAAAC,EAAA,IAAgBC,EAAYb,GAAI;AAAA,IAClE,WAAW,EAAQN;AAAA,IACnB,UAAU,EAAQC;AAAA,IAClB,OAAOS;AAAA,EAAA,CACR,GACKU,IAAWC,EAAmC,IAAI,GAGlDC,IAAS,CAACC,MAAqC;AACnD,IAAAH,EAAS,UAAUG,GACf,OAAOV,KAAQ,aAAYA,EAAIU,CAAI,IAC9BV,MAAMA,EAA2D,UAAUU;AAAA,EACtF,GAEMC,IAAYC,EAAY,MAAM;AAClC,UAAMC,IAAKN,EAAS;AACpB,QAAI,CAACM,KAAM,CAACxB,EAAY;AACxB,UAAMyB,IAAK,iBAAiBD,CAAE,GACxBE,IAAa,WAAWD,EAAG,UAAU,KAAK,IAE1CE,KAAW,WAAWF,EAAG,UAAU,K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;AACf,UAAAF,KAAA,QAAAA,EAAW,IACPL,KAAYsB,EAAA;AAAA,QAClB;AAAA,QACA,gBAAcV,IAAU,KAAOH;AAAA,QAC/B,oBAAkBO;AAAA,QAClB,WAAWmB;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACAnC,IAAa,gBAAgB;AAAA,QAAA;AAAA,QAE9B,GAAGU;AAAA,MAAA;AAAA,IAAA;AAAA,IAELX,IACC,gBAAAqC,EAAC,KAAA,EAAE,IAAIrB,GAAS,WAAU,4BACvB,UAAAhB,EAAA,CACH,IACED,sBACD,KAAA,EAAE,IAAIgB,GAAU,WAAU,kCACxB,aACH,IACE;AAAA,EAAA,GACN;AAEJ,CAAC;AAEDpB,EAAS,cAAc;"}
@@ -1,31 +1,56 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as a } from "react/jsx-runtime";
3
3
  import { forwardRef as s } from "react";
4
- import { cn as l } from "../../lib/utils.js";
5
- const c = s(function({ className: i, children: r, ...n }, m) {
6
- return /* @__PURE__ */ t("ol", { ref: m, className: l("relative flex flex-col gap-6", i), ...n, children: r });
4
+ import { cn as m } from "../../lib/utils.js";
5
+ const c = s(function({ className: i, children: l, ...n }, r) {
6
+ return /* @__PURE__ */ t(
7
+ "ol",
8
+ {
9
+ "data-slot": "timeline",
10
+ ref: r,
11
+ className: m("relative flex flex-col gap-6", i),
12
+ ...n,
13
+ children: l
14
+ }
15
+ );
7
16
  });
8
17
  c.displayName = "Timeline";
9
- const u = s(function({ bullet: i, isLast: r, className: n, children: m, ...o }, d) {
10
- return /* @__PURE__ */ a("li", { ref: d, className: l("relative flex gap-4 pb-1", n), ...o, children: [
11
- /* @__PURE__ */ a("div", { className: "relative flex shrink-0 flex-col items-center", children: [
12
- /* @__PURE__ */ t("div", { className: "border-border bg-card text-foreground-muted flex size-6 items-center justify-center rounded-full border", children: i ?? /* @__PURE__ */ t("span", { className: "bg-accent size-2 rounded-full", "aria-hidden": !0 }) }),
13
- !r && /* @__PURE__ */ t("span", { className: "bg-border mt-1 w-px flex-1", "aria-hidden": !0 })
14
- ] }),
15
- /* @__PURE__ */ t("div", { className: "min-w-0 flex-1 pb-4", children: m })
16
- ] });
18
+ const u = s(function({ bullet: i, isLast: l, className: n, children: r, ...o }, d) {
19
+ return /* @__PURE__ */ a(
20
+ "li",
21
+ {
22
+ "data-slot": "timeline-item",
23
+ ref: d,
24
+ className: m("relative flex gap-4 pb-1", n),
25
+ ...o,
26
+ children: [
27
+ /* @__PURE__ */ a("div", { className: "relative flex shrink-0 flex-col items-center", children: [
28
+ /* @__PURE__ */ t(
29
+ "div",
30
+ {
31
+ "data-slot": "timeline-bullet",
32
+ className: "border-border bg-card text-foreground-muted flex size-6 items-center justify-center rounded-full border",
33
+ children: i ?? /* @__PURE__ */ t("span", { className: "bg-accent size-2 rounded-full", "aria-hidden": !0 })
34
+ }
35
+ ),
36
+ !l && /* @__PURE__ */ t("span", { className: "bg-border mt-1 w-px flex-1", "aria-hidden": !0 })
37
+ ] }),
38
+ /* @__PURE__ */ t("div", { className: "min-w-0 flex-1 pb-4", children: r })
39
+ ]
40
+ }
41
+ );
17
42
  });
18
43
  u.displayName = "TimelineItem";
19
44
  function f(e) {
20
45
  if (!(!e || Number.isNaN(Date.parse(e))))
21
46
  return e;
22
47
  }
23
- function p({ className: e, children: i, dateTime: r, ...n }) {
48
+ function p({ className: e, children: i, dateTime: l, ...n }) {
24
49
  return /* @__PURE__ */ t(
25
50
  "time",
26
51
  {
27
- dateTime: f(r ?? (typeof i == "string" ? i : void 0)),
28
- className: l("text-foreground-subtle block text-xs", e),
52
+ dateTime: f(l ?? (typeof i == "string" ? i : void 0)),
53
+ className: m("text-foreground-subtle block text-xs", e),
29
54
  ...n,
30
55
  children: i
31
56
  }
@@ -36,14 +61,14 @@ function x({
36
61
  className: e,
37
62
  children: i
38
63
  }) {
39
- return /* @__PURE__ */ t("p", { className: l("text-sm font-medium", e), children: i });
64
+ return /* @__PURE__ */ t("p", { className: m("text-sm font-medium", e), children: i });
40
65
  }
41
66
  x.displayName = "TimelineTitle";
42
67
  function N({
43
68
  className: e,
44
69
  children: i
45
70
  }) {
46
- return /* @__PURE__ */ t("p", { className: l("text-foreground-muted mt-0.5 text-sm", e), children: i });
71
+ return /* @__PURE__ */ t("p", { className: m("text-foreground-muted mt-0.5 text-sm", e), children: i });
47
72
  }
48
73
  N.displayName = "TimelineDescription";
49
74
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.js","sources":["../../../src/components/ui/Timeline.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type HTMLAttributes, type ReactNode, type TimeHTMLAttributes } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type TimelineProps = HTMLAttributes<HTMLOListElement>;\n\nexport const Timeline = forwardRef<HTMLOListElement, TimelineProps>(function Timeline(\n { className, children, ...props },\n ref,\n) {\n return (\n <ol ref={ref} className={cn('relative flex flex-col gap-6', className)} {...props}>\n {children}\n </ol>\n );\n});\nTimeline.displayName = 'Timeline';\n\nexport interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {\n /** Optional bullet override. Default: small accent dot. */\n bullet?: ReactNode;\n /** Hide the connector line below this item — use for the last item. */\n isLast?: boolean;\n}\n\nexport const TimelineItem = forwardRef<HTMLLIElement, TimelineItemProps>(function TimelineItem(\n { bullet, isLast, className, children, ...props },\n ref,\n) {\n return (\n <li ref={ref} className={cn('relative flex gap-4 pb-1', className)} {...props}>\n <div className=\"relative flex shrink-0 flex-col items-center\">\n <div className=\"border-border bg-card text-foreground-muted flex size-6 items-center justify-center rounded-full border\">\n {bullet ?? <span className=\"bg-accent size-2 rounded-full\" aria-hidden />}\n </div>\n {!isLast && <span className=\"bg-border mt-1 w-px flex-1\" aria-hidden />}\n </div>\n <div className=\"min-w-0 flex-1 pb-4\">{children}</div>\n </li>\n );\n});\nTimelineItem.displayName = 'TimelineItem';\n\nexport interface TimelineTimeProps extends TimeHTMLAttributes<HTMLTimeElement> {\n /** Machine-readable value (ISO 8601). Defaults to `children` when it is a string. */\n dateTime?: string;\n children: ReactNode;\n}\n\n/** Accept only values `Date` can parse — an invalid `dateTime` is worse than none. */\nfunction validDateTime(v: string | undefined): string | undefined {\n if (!v || Number.isNaN(Date.parse(v))) return undefined;\n return v;\n}\n\nexport function TimelineTime({ className, children, dateTime, ...props }: TimelineTimeProps) {\n return (\n <time\n dateTime={validDateTime(dateTime ?? (typeof children === 'string' ? children : undefined))}\n className={cn('text-foreground-subtle block text-xs', className)}\n {...props}\n >\n {children}\n </time>\n );\n}\nTimelineTime.displayName = 'TimelineTime';\n\nexport function TimelineTitle({\n className,\n children,\n}: {\n className?: string;\n children: ReactNode;\n}) {\n return <p className={cn('text-sm font-medium', className)}>{children}</p>;\n}\nTimelineTitle.displayName = 'TimelineTitle';\n\nexport function TimelineDescription({\n className,\n children,\n}: {\n className?: string;\n children: ReactNode;\n}) {\n return <p className={cn('text-foreground-muted mt-0.5 text-sm', className)}>{children}</p>;\n}\nTimelineDescription.displayName = 'TimelineDescription';\n"],"names":["Timeline","forwardRef","className","children","props","ref","jsx","cn","TimelineItem","bullet","isLast","jsxs","validDateTime","v","TimelineTime","dateTime","TimelineTitle","TimelineDescription"],"mappings":";;;;AAOO,MAAMA,IAAWC,EAA4C,SAClE,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAC1BC,GACA;AACA,SACE,gBAAAC,EAAC,MAAA,EAAG,KAAAD,GAAU,WAAWE,EAAG,gCAAgCL,CAAS,GAAI,GAAGE,GACzE,UAAAD,EAAA,CACH;AAEJ,CAAC;AACDH,EAAS,cAAc;AAShB,MAAMQ,IAAeP,EAA6C,SACvE,EAAE,QAAAQ,GAAQ,QAAAC,GAAQ,WAAAR,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAC1CC,GACA;AACA,SACE,gBAAAM,EAAC,QAAG,KAAAN,GAAU,WAAWE,E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","sources":["../../../src/components/ui/Timeline.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type HTMLAttributes, type ReactNode, type TimeHTMLAttributes } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type TimelineProps = HTMLAttributes<HTMLOListElement>;\n\nexport const Timeline = forwardRef<HTMLOListElement, TimelineProps>(function Timeline(\n { className, children, ...props },\n ref,\n) {\n return (\n <ol\n data-slot=\"timeline\"\n ref={ref}\n className={cn('relative flex flex-col gap-6', className)}\n {...props}\n >\n {children}\n </ol>\n );\n});\nTimeline.displayName = 'Timeline';\n\nexport interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {\n /** Optional bullet override. Default: small accent dot. */\n bullet?: ReactNode;\n /** Hide the connector line below this item — use for the last item. */\n isLast?: boolean;\n}\n\nexport const TimelineItem = forwardRef<HTMLLIElement, TimelineItemProps>(function TimelineItem(\n { bullet, isLast, className, children, ...props },\n ref,\n) {\n return (\n <li\n data-slot=\"timeline-item\"\n ref={ref}\n className={cn('relative flex gap-4 pb-1', className)}\n {...props}\n >\n <div className=\"relative flex shrink-0 flex-col items-center\">\n <div\n data-slot=\"timeline-bullet\"\n className=\"border-border bg-card text-foreground-muted flex size-6 items-center justify-center rounded-full border\"\n >\n {bullet ?? <span className=\"bg-accent size-2 rounded-full\" aria-hidden />}\n </div>\n {!isLast && <span className=\"bg-border mt-1 w-px flex-1\" aria-hidden />}\n </div>\n <div className=\"min-w-0 flex-1 pb-4\">{children}</div>\n </li>\n );\n});\nTimelineItem.displayName = 'TimelineItem';\n\nexport interface TimelineTimeProps extends TimeHTMLAttributes<HTMLTimeElement> {\n /** Machine-readable value (ISO 8601). Defaults to `children` when it is a string. */\n dateTime?: string;\n children: ReactNode;\n}\n\n/** Accept only values `Date` can parse — an invalid `dateTime` is worse than none. */\nfunction validDateTime(v: string | undefined): string | undefined {\n if (!v || Number.isNaN(Date.parse(v))) return undefined;\n return v;\n}\n\nexport function TimelineTime({ className, children, dateTime, ...props }: TimelineTimeProps) {\n return (\n <time\n dateTime={validDateTime(dateTime ?? (typeof children === 'string' ? children : undefined))}\n className={cn('text-foreground-subtle block text-xs', className)}\n {...props}\n >\n {children}\n </time>\n );\n}\nTimelineTime.displayName = 'TimelineTime';\n\nexport function TimelineTitle({\n className,\n children,\n}: {\n className?: string;\n children: ReactNode;\n}) {\n return <p className={cn('text-sm font-medium', className)}>{children}</p>;\n}\nTimelineTitle.displayName = 'TimelineTitle';\n\nexport function TimelineDescription({\n className,\n children,\n}: {\n className?: string;\n children: ReactNode;\n}) {\n return <p className={cn('text-foreground-muted mt-0.5 text-sm', className)}>{children}</p>;\n}\nTimelineDescription.displayName = 'TimelineDescription';\n"],"names":["Timeline","forwardRef","className","children","props","ref","jsx","cn","TimelineItem","bullet","isLast","jsxs","validDateTime","v","TimelineTime","dateTime","TimelineTitle","TimelineDescription"],"mappings":";;;;AAOO,MAAMA,IAAWC,EAA4C,SAClE,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAC1BC,GACA;AACA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,KAAAD;AAAA,MACA,WAAWE,EAAG,gCAAgCL,CAAS;AAAA,MACtD,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AACDH,EAAS,cAAc;AAShB,MAAMQ,IAAeP,EAA6C,SACvE,EAAE,QAAAQ,GAAQ,QAAAC,GAAQ,WAAAR,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAC1CC,GACA;AACA,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,KAAAN;AAAA,MACA,WAAWE,EAAG,4BAA4BL,CAAS;AAAA,MAClD,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAO,EAAC,OAAA,EAAI,WAAU,gDACb,UAAA;AAAA,UAAA,gBAAAL;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,aAAU;AAAA,cACV,WAAU;AAAA,cAET,eAAU,gBAAAA,EAAC,QAAA,EAAK,WAAU,iCAAgC,eAAW,GAAA,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,UAExE,CAACI,KAAU,gBAAAJ,EAAC,UAAK,WAAU,8BAA6B,eAAW,GAAA,CAAC;AAAA,QAAA,GACvE;AAAA,QACA,gBAAAA,EAAC,OAAA,EAAI,WAAU,uBAAuB,UAAAH,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGrD,CAAC;AACDK,EAAa,cAAc;AAS3B,SAASI,EAAcC,GAA2C;AAChE,MAAI,GAACA,KAAK,OAAO,MAAM,KAAK,MAAMA,CAAC,CAAC;AACpC,WAAOA;AACT;AAEO,SAASC,EAAa,EAAE,WAAAZ,GAAW,UAAAC,GAAU,UAAAY,GAAU,GAAGX,KAA4B;AAC3F,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAUM,EAAcG,MAAa,OAAOZ,KAAa,WAAWA,IAAW,OAAU;AAAA,MACzF,WAAWI,EAAG,wCAAwCL,CAAS;AAAA,MAC9D,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AACAW,EAAa,cAAc;AAEpB,SAASE,EAAc;AAAA,EAC5B,WAAAd;AAAA,EACA,UAAAC;AACF,GAGG;AACD,2BAAQ,KAAA,EAAE,WAAWI,EAAG,uBAAuBL,CAAS,GAAI,UAAAC,GAAS;AACvE;AACAa,EAAc,cAAc;AAErB,SAASC,EAAoB;AAAA,EAClC,WAAAf;AAAA,EACA,UAAAC;AACF,GAGG;AACD,2BAAQ,KAAA,EAAE,WAAWI,EAAG,wCAAwCL,CAAS,GAAI,UAAAC,GAAS;AACxF;AACAc,EAAoB,cAAc;"}
@@ -1,17 +1,18 @@
1
1
  "use client";
2
2
  import { jsxs as f, jsx as s } from "react/jsx-runtime";
3
- import { forwardRef as l, useEffect as v } from "react";
3
+ import { forwardRef as l, useEffect as h } from "react";
4
4
  import * as n from "@radix-ui/react-toast";
5
5
  import { X as T, Info as w, XCircle as N, AlertTriangle as y, CheckCircle2 as C } from "../../icons/index.js";
6
6
  import { cn as c } from "../../lib/utils.js";
7
7
  import { useStrings as m } from "../../hooks/use-strings.js";
8
8
  import { useToast as k } from "../../hooks/use-toast.js";
9
9
  import { cva as z } from "class-variance-authority";
10
- const A = n.Provider, u = l(function({ className: o, label: e, ...a }, t) {
10
+ const A = n.Provider, u = l(function({ className: a, label: e, ...o }, t) {
11
11
  const r = m();
12
12
  return /* @__PURE__ */ s(
13
13
  n.Viewport,
14
14
  {
15
+ "data-slot": "toast-viewport",
15
16
  ref: t,
16
17
  label: e ?? r.toast.region,
17
18
  className: c(
@@ -19,9 +20,9 @@ const A = n.Provider, u = l(function({ className: o, label: e, ...a }, t) {
19
20
  // Respect notched/home-indicator insets (consumers set viewport-fit=cover).
20
21
  "pr-[max(1.5rem,env(safe-area-inset-right))] pb-[max(1.5rem,env(safe-area-inset-bottom))] pl-[max(1.5rem,env(safe-area-inset-left))]",
21
22
  "sm:top-4 sm:right-4 sm:bottom-auto sm:max-w-sm sm:flex-col",
22
- o
23
+ a
23
24
  ),
24
- ...a
25
+ ...o
25
26
  }
26
27
  );
27
28
  });
@@ -55,56 +56,65 @@ const V = z(
55
56
  warning: /* @__PURE__ */ s(y, { className: "text-warning-text mt-0.5 size-5 shrink-0", "aria-hidden": !0 }),
56
57
  danger: /* @__PURE__ */ s(N, { className: "text-danger-text mt-0.5 size-5 shrink-0", "aria-hidden": !0 }),
57
58
  info: /* @__PURE__ */ s(w, { className: "text-info-text mt-0.5 size-5 shrink-0", "aria-hidden": !0 })
58
- }, p = l(function({ className: o, variant: e = "default", children: a, ...t }, r) {
59
- return /* @__PURE__ */ f(n.Root, { ref: r, className: c(V({ variant: e }), o), ...t, children: [
60
- j[e ?? "default"],
61
- /* @__PURE__ */ s("div", { className: "flex-1 space-y-1", children: a })
62
- ] });
59
+ }, p = l(function({ className: a, variant: e = "default", children: o, ...t }, r) {
60
+ return /* @__PURE__ */ f(
61
+ n.Root,
62
+ {
63
+ ref: r,
64
+ "data-slot": "toast",
65
+ className: c(V({ variant: e }), a),
66
+ ...t,
67
+ children: [
68
+ j[e ?? "default"],
69
+ /* @__PURE__ */ s("div", { className: "flex-1 space-y-1", children: o })
70
+ ]
71
+ }
72
+ );
63
73
  });
64
74
  p.displayName = "Toast";
65
- const g = l(function({ className: o, ...e }, a) {
66
- return /* @__PURE__ */ s(n.Title, { ref: a, className: c("text-sm font-medium", o), ...e });
75
+ const g = l(function({ className: a, ...e }, o) {
76
+ return /* @__PURE__ */ s(n.Title, { ref: o, className: c("text-sm font-medium", a), ...e });
67
77
  });
68
78
  g.displayName = "ToastTitle";
69
- const x = l(function({ className: o, ...e }, a) {
79
+ const x = l(function({ className: a, ...e }, o) {
70
80
  return /* @__PURE__ */ s(
71
81
  n.Description,
72
82
  {
73
- ref: a,
74
- className: c("text-sm opacity-90", o),
83
+ ref: o,
84
+ className: c("text-sm opacity-90", a),
75
85
  ...e
76
86
  }
77
87
  );
78
88
  });
79
89
  x.displayName = "ToastDescription";
80
- const b = l(function({ className: o, ...e }, a) {
90
+ const b = l(function({ className: a, ...e }, o) {
81
91
  return /* @__PURE__ */ s(
82
92
  n.Action,
83
93
  {
84
- ref: a,
94
+ ref: o,
85
95
  className: c(
86
96
  "inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium",
87
97
  "transition-colors outline-none hover:bg-current/10",
88
98
  "focus-visible:ring-ring focus-visible:ring-offset-card focus-visible:ring-2 focus-visible:ring-offset-2",
89
- o
99
+ a
90
100
  ),
91
101
  ...e
92
102
  }
93
103
  );
94
104
  });
95
105
  b.displayName = "ToastAction";
96
- const h = l(function({ className: o, ...e }, a) {
106
+ const v = l(function({ className: a, ...e }, o) {
97
107
  const t = m();
98
108
  return /* @__PURE__ */ s(
99
109
  n.Close,
100
110
  {
101
- ref: a,
111
+ ref: o,
102
112
  "aria-label": e["aria-label"] ?? t.toast.close,
103
113
  className: c(
104
114
  "text-foreground-subtle absolute top-2 right-2 inline-flex size-7 items-center justify-center rounded-md",
105
115
  "hover:text-foreground opacity-0 transition-opacity group-hover:opacity-100",
106
116
  "focus-visible:ring-ring focus-visible:ring-offset-card outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2",
107
- o
117
+ a
108
118
  ),
109
119
  "toast-close": "",
110
120
  ...e,
@@ -112,17 +122,17 @@ const h = l(function({ className: o, ...e }, a) {
112
122
  }
113
123
  );
114
124
  });
115
- h.displayName = "ToastClose";
125
+ v.displayName = "ToastClose";
116
126
  function D() {
117
- const { toasts: i, dismiss: o, remove: e } = k();
118
- v(() => {
127
+ const { toasts: i, dismiss: a, remove: e } = k();
128
+ h(() => {
119
129
  const t = i.filter((d) => !d.open);
120
130
  if (t.length === 0) return;
121
131
  const r = t.map((d) => window.setTimeout(() => e(d.id), 200));
122
132
  return () => r.forEach((d) => window.clearTimeout(d));
123
133
  }, [i, e]);
124
- const a = m();
125
- return /* @__PURE__ */ f(A, { label: a.toast.region, children: [
134
+ const o = m();
135
+ return /* @__PURE__ */ f(A, { label: o.toast.region, children: [
126
136
  i.map((t) => /* @__PURE__ */ f(
127
137
  p,
128
138
  {
@@ -130,13 +140,13 @@ function D() {
130
140
  open: t.open,
131
141
  duration: t.duration === 0 ? 1 / 0 : t.duration,
132
142
  onOpenChange: (r) => {
133
- r || o(t.id);
143
+ r || a(t.id);
134
144
  },
135
145
  children: [
136
146
  t.title && /* @__PURE__ */ s(g, { children: t.title }),
137
147
  t.description && /* @__PURE__ */ s(x, { children: t.description }),
138
148
  t.action && /* @__PURE__ */ s(b, { altText: t.action.altText, onClick: t.action.onClick, className: "mt-1", children: t.action.label }),
139
- /* @__PURE__ */ s(h, {})
149
+ /* @__PURE__ */ s(v, {})
140
150
  ]
141
151
  },
142
152
  t.id
@@ -148,7 +158,7 @@ D.displayName = "Toaster";
148
158
  export {
149
159
  p as Toast,
150
160
  b as ToastAction,
151
- h as ToastClose,
161
+ v as ToastClose,
152
162
  x as ToastDescription,
153
163
  A as ToastProvider,
154
164
  g as ToastTitle,
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","sources":["../../../src/components/ui/Toast.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n useEffect,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type ReactElement,\n} from 'react';\nimport * as ToastPrimitive from '@radix-ui/react-toast';\nimport { AlertTriangle, CheckCircle2, Info, X, XCircle } from '@/icons';\nimport { cn } from '@/lib/utils';\nimport { useStrings } from '@/hooks/use-strings';\nimport { cva, type VariantProps } from '@/lib/cva';\nimport { useToast } from '@/hooks/use-toast';\n\nexport const ToastProvider = ToastPrimitive.Provider;\n\nexport const ToastViewport = forwardRef<\n ElementRef<typeof ToastPrimitive.Viewport>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Viewport>\n>(function ToastViewport({ className, label, ...props }, ref) {\n const strings = useStrings();\n return (\n <ToastPrimitive.Viewport\n ref={ref}\n // Radix's default is \"Notifications ({hotkey})\" — route it through the\n // strings so the region landmark is localised like the rest.\n label={label ?? strings.toast.region}\n className={cn(\n 'fixed right-0 bottom-0 z-[var(--z-toast)] flex max-h-dvh w-full flex-col-reverse gap-2 p-6',\n // Respect notched/home-indicator insets (consumers set viewport-fit=cover).\n 'pr-[max(1.5rem,env(safe-area-inset-right))] pb-[max(1.5rem,env(safe-area-inset-bottom))] pl-[max(1.5rem,env(safe-area-inset-left))]',\n 'sm:top-4 sm:right-4 sm:bottom-auto sm:max-w-sm sm:flex-col',\n className,\n )}\n {...props}\n />\n );\n});\nToastViewport.displayName = 'ToastViewport';\n\nconst toast = cva(\n [\n 'group pointer-events-auto relative flex w-full items-start gap-3',\n 'overflow-hidden rounded-lg border p-4 pr-8 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full',\n 'data-[state=closed]:slide-out-to-right-full',\n 'data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]',\n 'data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform',\n 'data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]',\n ],\n {\n variants: {\n variant: {\n default: 'border-border bg-card text-card-foreground',\n success: 'border-success-border-soft bg-success-soft text-success-text',\n warning: 'border-warning-border-soft bg-warning-soft text-warning-text',\n danger: 'border-danger-border-soft bg-danger-soft text-danger-text',\n info: 'border-info-border-soft bg-info-soft text-info-text',\n },\n },\n defaultVariants: { variant: 'default' },\n },\n);\n\nconst iconMap = {\n default: null,\n success: <CheckCircle2 className=\"text-success-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n warning: <AlertTriangle className=\"text-warning-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n danger: <XCircle className=\"text-danger-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n info: <Info className=\"text-info-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n} satisfies Record<'default' | 'success' | 'warning' | 'danger' | 'info', ReactElement | null>;\n\nexport interface ToastProps\n extends ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, VariantProps<typeof toast> {}\n\nexport const Toast = forwardRef<ElementRef<typeof ToastPrimitive.Root>, ToastProps>(function Toast(\n { className, variant = 'default', children, ...props },\n ref,\n) {\n return (\n <ToastPrimitive.Root ref={ref} className={cn(toast({ variant }), className)} {...props}>\n {iconMap[variant ?? 'default']}\n <div className=\"flex-1 space-y-1\">{children}</div>\n </ToastPrimitive.Root>\n );\n});\nToast.displayName = 'Toast';\n\nexport const ToastTitle = forwardRef<\n ElementRef<typeof ToastPrimitive.Title>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Title>\n>(function ToastTitle({ className, ...props }, ref) {\n return (\n <ToastPrimitive.Title ref={ref} className={cn('text-sm font-medium', className)} {...props} />\n );\n});\nToastTitle.displayName = 'ToastTitle';\n\nexport const ToastDescription = forwardRef<\n ElementRef<typeof ToastPrimitive.Description>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Description>\n>(function ToastDescription({ className, ...props }, ref) {\n return (\n <ToastPrimitive.Description\n ref={ref}\n className={cn('text-sm opacity-90', className)}\n {...props}\n />\n );\n});\nToastDescription.displayName = 'ToastDescription';\n\nexport const ToastAction = forwardRef<\n ElementRef<typeof ToastPrimitive.Action>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Action>\n>(function ToastAction({ className, ...props }, ref) {\n return (\n <ToastPrimitive.Action\n ref={ref}\n className={cn(\n 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium',\n 'transition-colors outline-none hover:bg-current/10',\n 'focus-visible:ring-ring focus-visible:ring-offset-card focus-visible:ring-2 focus-visible:ring-offset-2',\n className,\n )}\n {...props}\n />\n );\n});\nToastAction.displayName = 'ToastAction';\n\nexport const ToastClose = forwardRef<\n ElementRef<typeof ToastPrimitive.Close>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Close>\n>(function ToastClose({ className, ...props }, ref) {\n const strings = useStrings();\n return (\n <ToastPrimitive.Close\n ref={ref}\n aria-label={props['aria-label'] ?? strings.toast.close}\n className={cn(\n 'text-foreground-subtle absolute top-2 right-2 inline-flex size-7 items-center justify-center rounded-md',\n 'hover:text-foreground opacity-0 transition-opacity group-hover:opacity-100',\n 'focus-visible:ring-ring focus-visible:ring-offset-card outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2',\n className,\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"size-4\" aria-hidden />\n </ToastPrimitive.Close>\n );\n});\nToastClose.displayName = 'ToastClose';\n\n/**\n * Drop-in host that connects the `useToast()` queue to the Radix primitives.\n * Mount it once near your app root — then `useToast().push({...})` (or the\n * standalone `toast()`) from anywhere renders here. Self-contained: it brings\n * its own ToastProvider + Viewport, so no other Toast wiring is needed.\n *\n * @example\n * function App() {\n * return (\n * <>\n * <Routes />\n * <Toaster />\n * </>\n * );\n * }\n */\nexport function Toaster() {\n const { toasts, dismiss, remove } = useToast();\n\n // Closing a toast sets open:false so Radix can play the slide-out; drop it\n // from the queue once that animation has had time to finish.\n useEffect(() => {\n const closing = toasts.filter((t) => !t.open);\n if (closing.length === 0) return;\n const timers = closing.map((t) => window.setTimeout(() => remove(t.id), 200));\n return () => timers.forEach((id) => window.clearTimeout(id));\n }, [toasts, remove]);\n\n const strings = useStrings();\n return (\n <ToastProvider label={strings.toast.region}>\n {toasts.map((t) => (\n <Toast\n key={t.id}\n variant={t.variant ?? 'default'}\n open={t.open}\n // Radix treats 0 as \"dismiss immediately\"; the queue's 0 means \"keep open\".\n duration={t.duration === 0 ? Infinity : t.duration}\n onOpenChange={(open) => {\n if (!open) dismiss(t.id);\n }}\n >\n {t.title && <ToastTitle>{t.title}</ToastTitle>}\n {t.description && <ToastDescription>{t.description}</ToastDescription>}\n {t.action && (\n <ToastAction altText={t.action.altText} onClick={t.action.onClick} className=\"mt-1\">\n {t.action.label}\n </ToastAction>\n )}\n <ToastClose />\n </Toast>\n ))}\n <ToastViewport />\n </ToastProvider>\n );\n}\nToaster.displayName = 'Toaster';\n\n/**\n * @example\n * <ToastProvider>\n * …app…\n * <Toast variant=\"success\">\n * <ToastTitle>Saved</ToastTitle>\n * <ToastDescription>Your changes are live.</ToastDescription>\n * <ToastAction altText=\"Undo\">Undo</ToastAction>\n * <ToastClose />\n * </Toast>\n * <ToastViewport />\n * </ToastProvider>\n *\n * @do Use the `useToast()` hook (in `src/hooks/use-toast.ts`) in app code —\n * the components here are the primitives the hook renders.\n * @dont Stack more than two toasts at a time. Newer toasts replace older ones.\n */\n"],"names":["ToastProvider","ToastPrimitive","ToastViewport","forwardRef","className","label","props","ref","strings","useStrings","jsx","cn","toast","cva","iconMap","CheckCircle2","AlertTriangle","XCircle","Info","Toast","variant","children","jsxs","ToastTitle","ToastDescription","ToastAction","ToastClose","X","Toaster","toasts","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AAb,EAACc,GAAA,EAAkB,YAAE,aAAY;AAAA,UAClD,EAAE,UACD,gBAAAd,EAACe,GAAA,EAAY,SAAS,EAAE,OAAO,SAAS,SAAS,EAAE,OAAO,SAAS,WAAU,QAC1E,UAAA,EAAE,OAAO,OACZ;AAAA,4BAEDC,GAAA,CAAA,CAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAhBP,EAAE;AAAA,IAAA,CAkBV;AAAA,sBACAxB,GAAA,CAAA,CAAc;AAAA,EAAA,GACjB;AAEJ;AACA0B,EAAQ,cAAc;"}
1
+ {"version":3,"file":"Toast.js","sources":["../../../src/components/ui/Toast.tsx"],"sourcesContent":["'use client';\n\nimport {\n forwardRef,\n useEffect,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type ReactElement,\n} from 'react';\nimport * as ToastPrimitive from '@radix-ui/react-toast';\nimport { AlertTriangle, CheckCircle2, Info, X, XCircle } from '@/icons';\nimport { cn } from '@/lib/utils';\nimport { useStrings } from '@/hooks/use-strings';\nimport { cva, type VariantProps } from '@/lib/cva';\nimport { useToast } from '@/hooks/use-toast';\n\nexport const ToastProvider = ToastPrimitive.Provider;\n\nexport const ToastViewport = forwardRef<\n ElementRef<typeof ToastPrimitive.Viewport>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Viewport>\n>(function ToastViewport({ className, label, ...props }, ref) {\n const strings = useStrings();\n return (\n <ToastPrimitive.Viewport\n data-slot=\"toast-viewport\"\n ref={ref}\n // Radix's default is \"Notifications ({hotkey})\" — route it through the\n // strings so the region landmark is localised like the rest.\n label={label ?? strings.toast.region}\n className={cn(\n 'fixed right-0 bottom-0 z-[var(--z-toast)] flex max-h-dvh w-full flex-col-reverse gap-2 p-6',\n // Respect notched/home-indicator insets (consumers set viewport-fit=cover).\n 'pr-[max(1.5rem,env(safe-area-inset-right))] pb-[max(1.5rem,env(safe-area-inset-bottom))] pl-[max(1.5rem,env(safe-area-inset-left))]',\n 'sm:top-4 sm:right-4 sm:bottom-auto sm:max-w-sm sm:flex-col',\n className,\n )}\n {...props}\n />\n );\n});\nToastViewport.displayName = 'ToastViewport';\n\nconst toast = cva(\n [\n 'group pointer-events-auto relative flex w-full items-start gap-3',\n 'overflow-hidden rounded-lg border p-4 pr-8 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full',\n 'data-[state=closed]:slide-out-to-right-full',\n 'data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]',\n 'data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform',\n 'data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]',\n ],\n {\n variants: {\n variant: {\n default: 'border-border bg-card text-card-foreground',\n success: 'border-success-border-soft bg-success-soft text-success-text',\n warning: 'border-warning-border-soft bg-warning-soft text-warning-text',\n danger: 'border-danger-border-soft bg-danger-soft text-danger-text',\n info: 'border-info-border-soft bg-info-soft text-info-text',\n },\n },\n defaultVariants: { variant: 'default' },\n },\n);\n\nconst iconMap = {\n default: null,\n success: <CheckCircle2 className=\"text-success-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n warning: <AlertTriangle className=\"text-warning-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n danger: <XCircle className=\"text-danger-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n info: <Info className=\"text-info-text mt-0.5 size-5 shrink-0\" aria-hidden />,\n} satisfies Record<'default' | 'success' | 'warning' | 'danger' | 'info', ReactElement | null>;\n\nexport interface ToastProps\n extends ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, VariantProps<typeof toast> {}\n\nexport const Toast = forwardRef<ElementRef<typeof ToastPrimitive.Root>, ToastProps>(function Toast(\n { className, variant = 'default', children, ...props },\n ref,\n) {\n return (\n <ToastPrimitive.Root\n ref={ref}\n data-slot=\"toast\"\n className={cn(toast({ variant }), className)}\n {...props}\n >\n {iconMap[variant ?? 'default']}\n <div className=\"flex-1 space-y-1\">{children}</div>\n </ToastPrimitive.Root>\n );\n});\nToast.displayName = 'Toast';\n\nexport const ToastTitle = forwardRef<\n ElementRef<typeof ToastPrimitive.Title>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Title>\n>(function ToastTitle({ className, ...props }, ref) {\n return (\n <ToastPrimitive.Title ref={ref} className={cn('text-sm font-medium', className)} {...props} />\n );\n});\nToastTitle.displayName = 'ToastTitle';\n\nexport const ToastDescription = forwardRef<\n ElementRef<typeof ToastPrimitive.Description>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Description>\n>(function ToastDescription({ className, ...props }, ref) {\n return (\n <ToastPrimitive.Description\n ref={ref}\n className={cn('text-sm opacity-90', className)}\n {...props}\n />\n );\n});\nToastDescription.displayName = 'ToastDescription';\n\nexport const ToastAction = forwardRef<\n ElementRef<typeof ToastPrimitive.Action>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Action>\n>(function ToastAction({ className, ...props }, ref) {\n return (\n <ToastPrimitive.Action\n ref={ref}\n className={cn(\n 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium',\n 'transition-colors outline-none hover:bg-current/10',\n 'focus-visible:ring-ring focus-visible:ring-offset-card focus-visible:ring-2 focus-visible:ring-offset-2',\n className,\n )}\n {...props}\n />\n );\n});\nToastAction.displayName = 'ToastAction';\n\nexport const ToastClose = forwardRef<\n ElementRef<typeof ToastPrimitive.Close>,\n ComponentPropsWithoutRef<typeof ToastPrimitive.Close>\n>(function ToastClose({ className, ...props }, ref) {\n const strings = useStrings();\n return (\n <ToastPrimitive.Close\n ref={ref}\n aria-label={props['aria-label'] ?? strings.toast.close}\n className={cn(\n 'text-foreground-subtle absolute top-2 right-2 inline-flex size-7 items-center justify-center rounded-md',\n 'hover:text-foreground opacity-0 transition-opacity group-hover:opacity-100',\n 'focus-visible:ring-ring focus-visible:ring-offset-card outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2',\n className,\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"size-4\" aria-hidden />\n </ToastPrimitive.Close>\n );\n});\nToastClose.displayName = 'ToastClose';\n\n/**\n * Drop-in host that connects the `useToast()` queue to the Radix primitives.\n * Mount it once near your app root — then `useToast().push({...})` (or the\n * standalone `toast()`) from anywhere renders here. Self-contained: it brings\n * its own ToastProvider + Viewport, so no other Toast wiring is needed.\n *\n * @example\n * function App() {\n * return (\n * <>\n * <Routes />\n * <Toaster />\n * </>\n * );\n * }\n */\nexport function Toaster() {\n const { toasts, dismiss, remove } = useToast();\n\n // Closing a toast sets open:false so Radix can play the slide-out; drop it\n // from the queue once that animation has had time to finish.\n useEffect(() => {\n const closing = toasts.filter((t) => !t.open);\n if (closing.length === 0) return;\n const timers = closing.map((t) => window.setTimeout(() => remove(t.id), 200));\n return () => timers.forEach((id) => window.clearTimeout(id));\n }, [toasts, remove]);\n\n const strings = useStrings();\n return (\n <ToastProvider label={strings.toast.region}>\n {toasts.map((t) => (\n <Toast\n key={t.id}\n variant={t.variant ?? 'default'}\n open={t.open}\n // Radix treats 0 as \"dismiss immediately\"; the queue's 0 means \"keep open\".\n duration={t.duration === 0 ? Infinity : t.duration}\n onOpenChange={(open) => {\n if (!open) dismiss(t.id);\n }}\n >\n {t.title && <ToastTitle>{t.title}</ToastTitle>}\n {t.description && <ToastDescription>{t.description}</ToastDescription>}\n {t.action && (\n <ToastAction altText={t.action.altText} onClick={t.action.onClick} className=\"mt-1\">\n {t.action.label}\n </ToastAction>\n )}\n <ToastClose />\n </Toast>\n ))}\n <ToastViewport />\n </ToastProvider>\n );\n}\nToaster.displayName = 'Toaster';\n\n/**\n * @example\n * <ToastProvider>\n * …app…\n * <Toast variant=\"success\">\n * <ToastTitle>Saved</ToastTitle>\n * <ToastDescription>Your changes are live.</ToastDescription>\n * <ToastAction altText=\"Undo\">Undo</ToastAction>\n * <ToastClose />\n * </Toast>\n * <ToastViewport />\n * </ToastProvider>\n *\n * @do Use the `useToast()` hook (in `src/hooks/use-toast.ts`) in app code —\n * the components here are the primitives the hook renders.\n * @dont Stack more than two toasts at a time. Newer toasts replace older ones.\n */\n"],"names":["ToastProvider","ToastPrimitive","ToastViewport","forwardRef","className","label","props","ref","strings","useStrings","jsx","cn","toast","cva","iconMap","CheckCircle2","AlertTriangle","XCircle","Info","Toast","variant","children","jsxs","ToastTitle","ToastDescription","ToastAction","ToastClose","X","Toaster","toasts","dismiss","remove","useToast","useEffect","closing","t","timers","id","open"],"mappings":";;;;;;;;;AAgBO,MAAMA,IAAgBC,EAAe,UAE/BC,IAAgBC,EAG3B,SAAuB,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,GAASC,GAAK;AAC5D,QAAMC,IAAUC,EAAA;AAChB,SACE,gBAAAC;AAAA,IAACT,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,KAAAM;AAAA,MAGA,OAAOF,KAASG,EAAQ,MAAM;AAAA,MAC9B,WAAWG;AAAA,QACT;AAAA;AAAA,QAEA;AAAA,QACA;AAAA,QACAP;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;AACDJ,EAAc,cAAc;AAE5B,MAAMU,IAAQC;AAAA,EACZ;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB,EAAE,SAAS,UAAA;AAAA,EAAU;AAE1C,GAEMC,IAAU;AAAA,EACd,SAAS;AAAA,EACT,SAAS,gBAAAJ,EAACK,GAAA,EAAa,WAAU,4CAA2C,eAAW,IAAC;AAAA,EACxF,SAAS,gBAAAL,EAACM,GAAA,EAAc,WAAU,4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I,CAAC,MACX,gBAAAP;AAAA,MAACH;AAAA,MAAA;AAAA,QAEC,SAAS,EAAE,WAAW;AAAA,QACtB,MAAM,EAAE;AAAA,QAER,UAAU,EAAE,aAAa,IAAI,QAAW,EAAE;AAAA,QAC1C,cAAc,CAACmB,MAAS;AACtB,UAAKA,KAAMR,EAAQ,EAAE,EAAE;AAAA,QACzB;AAAA,QAEC,UAAA;AAAA,UAAA,EAAE,SAAS,gBAAApB,EAACa,GAAA,EAAY,UAAA,EAAE,OAAM;AAAA,UAChC,EAAE,eAAe,gBAAAb,EAACc,GAAA,EAAkB,YAAE,aAAY;AAAA,UAClD,EAAE,UACD,gBAAAd,EAACe,GAAA,EAAY,SAAS,EAAE,OAAO,SAAS,SAAS,EAAE,OAAO,SAAS,WAAU,QAC1E,UAAA,EAAE,OAAO,OACZ;AAAA,4BAEDC,GAAA,CAAA,CAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAhBP,EAAE;AAAA,IAAA,CAkBV;AAAA,sBACAxB,GAAA,CAAA,CAAc;AAAA,EAAA,GACjB;AAEJ;AACA0B,EAAQ,cAAc;"}
@@ -1,26 +1,27 @@
1
1
  "use client";
2
- import { jsx as o, Fragment as p, jsxs as l } from "react/jsx-runtime";
2
+ import { jsx as t, Fragment as l, jsxs as p } from "react/jsx-runtime";
3
3
  import { forwardRef as m } from "react";
4
4
  import * as a from "@radix-ui/react-tooltip";
5
5
  import { cn as c } from "../../lib/utils.js";
6
6
  const f = ({
7
- delayDuration: t = 500,
7
+ delayDuration: o = 500,
8
8
  skipDelayDuration: e = 200,
9
9
  ...i
10
- }) => /* @__PURE__ */ o(
10
+ }) => /* @__PURE__ */ t(
11
11
  a.Provider,
12
12
  {
13
- delayDuration: t,
13
+ delayDuration: o,
14
14
  skipDelayDuration: e,
15
15
  ...i
16
16
  }
17
17
  );
18
18
  f.displayName = "TooltipProvider";
19
- const u = a.Root, T = a.Trigger, d = m(function({ className: e, sideOffset: i = 4, ...r }, n) {
20
- return /* @__PURE__ */ o(a.Portal, { children: /* @__PURE__ */ o(
19
+ const u = a.Root, T = a.Trigger, d = m(function({ className: e, sideOffset: i = 4, ...n }, r) {
20
+ return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
21
21
  a.Content,
22
22
  {
23
- ref: n,
23
+ "data-slot": "tooltip-content",
24
+ ref: r,
24
25
  sideOffset: i,
25
26
  className: c(
26
27
  "z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium",
@@ -31,22 +32,22 @@ const u = a.Root, T = a.Trigger, d = m(function({ className: e, sideOffset: i =
31
32
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
32
33
  e
33
34
  ),
34
- ...r
35
+ ...n
35
36
  }
36
37
  ) });
37
38
  });
38
39
  d.displayName = "TooltipContent";
39
40
  function x({
40
- children: t,
41
+ children: o,
41
42
  label: e,
42
43
  side: i = "top",
43
- align: r = "center",
44
- disabled: n,
44
+ align: n = "center",
45
+ disabled: r,
45
46
  delayDuration: s
46
47
  }) {
47
- return n ? /* @__PURE__ */ o(p, { children: t }) : /* @__PURE__ */ l(u, { delayDuration: s, children: [
48
- /* @__PURE__ */ o(T, { asChild: !0, children: t }),
49
- /* @__PURE__ */ o(d, { side: i, align: r, children: e })
48
+ return r ? /* @__PURE__ */ t(l, { children: o }) : /* @__PURE__ */ p(u, { delayDuration: s, children: [
49
+ /* @__PURE__ */ t(T, { asChild: !0, children: o }),
50
+ /* @__PURE__ */ t(d, { side: i, align: n, children: e })
50
51
  ] });
51
52
  }
52
53
  x.displayName = "Tooltip";
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../src/components/ui/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef, type ReactNode } from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '@/lib/utils';\n\n/**\n * Wrap the app in a single `<TooltipProvider>` near the root. All Tooltips\n * share the same `delayDuration` and `skipDelayDuration`.\n */\nexport const TooltipProvider = ({\n delayDuration = 500,\n skipDelayDuration = 200,\n ...props\n}: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => (\n <TooltipPrimitive.Provider\n delayDuration={delayDuration}\n skipDelayDuration={skipDelayDuration}\n {...props}\n />\n);\nTooltipProvider.displayName = 'TooltipProvider';\n\nexport const TooltipRoot = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport const TooltipContent = forwardRef<\n ElementRef<typeof TooltipPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(function TooltipContent({ className, sideOffset = 4, ...props }, ref) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium',\n 'bg-tooltip text-tooltip-foreground',\n 'max-w-xs shadow-sm',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n );\n});\nTooltipContent.displayName = 'TooltipContent';\n\nexport interface TooltipProps {\n children: ReactNode;\n label: ReactNode;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n /** Disable showing the tooltip (e.g. when text is not truncated). */\n disabled?: boolean;\n /** Override the global delay. */\n delayDuration?: number;\n}\n\n/**\n * Shorthand for the most common Tooltip case.\n *\n * @example\n * <Tooltip label=\"Copy link\"><IconButton aria-label=\"Copy\" icon={<Copy/>} /></Tooltip>\n *\n * @do Keep tooltip text short — one line, no full sentences. Use a Popover\n * for any content that needs structure.\n * @dont Wrap disabled buttons in Tooltip without `asChild + tabIndex={0}`.\n * Disabled elements don't receive focus, so the tooltip never opens.\n */\nexport function Tooltip({\n children,\n label,\n side = 'top',\n align = 'center',\n disabled,\n delayDuration,\n}: TooltipProps) {\n if (disabled) return <>{children}</>;\n return (\n <TooltipRoot delayDuration={delayDuration}>\n <TooltipTrigger asChild>{children}</TooltipTrigger>\n <TooltipContent side={side} align={align}>\n {label}\n </TooltipContent>\n </TooltipRoot>\n );\n}\nTooltip.displayName = 'Tooltip';\n"],"names":["TooltipProvider","delayDuration","skipDelayDuration","props","jsx","TooltipPrimitive","TooltipRoot","TooltipTrigger","TooltipContent","forwardRef","className","sideOffset","ref","cn","Tooltip","children","label","side","align","disabled","Fragment","jsxs"],"mappings":";;;;;AAUO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,eAAAC,IAAgB;AAAA,EAChB,mBAAAC,IAAoB;AAAA,EACpB,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,eAAAJ;AAAA,IACA,mBAAAC;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFH,EAAgB,cAAc;AAEvB,MAAMM,IAAcD,EAAiB,MAC/BE,IAAiBF,EAAiB,SAElCG,IAAiBC,EAG5B,SAAwB,EAAE,WAAAC,GAAW,YAAAC,IAAa,GAAG,GAAGR,EAAA,GAASS,GAAK;AACtE,SACE,gBAAAR,EAACC,EAAiB,QAAjB,EACC,UAAA,gBAAAD;AAAA,IAACC,EAAiB;AAAA,IAAjB;AAAA,MACC,KAAAO;AAAA,MACA,YAAAD;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGP;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ,CAAC;AACDK,EAAe,cAAc;AAwBtB,SAASM,EAAQ;AAAA,EACtB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,eAAAlB;AACF,GAAiB;AACf,SAAIkB,IAAiB,gBAAAf,EAAAgB,GAAA,EAAG,UAAAL,EAAA,CAAS,IAE/B,gBAAAM,EAACf,KAAY,eAAAL,GACX,UAAA;AAAA,IAAA,gBAAAG,EAACG,GAAA,EAAe,SAAO,IAAE,UAAAQ,EAAA,CAAS;AAAA,IAClC,gBAAAX,EAACI,GAAA,EAAe,MAAAS,GAAY,OAAAC,GACzB,UAAAF,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;AACAF,EAAQ,cAAc;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../src/components/ui/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef, type ReactNode } from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '@/lib/utils';\n\n/**\n * Wrap the app in a single `<TooltipProvider>` near the root. All Tooltips\n * share the same `delayDuration` and `skipDelayDuration`.\n */\nexport const TooltipProvider = ({\n delayDuration = 500,\n skipDelayDuration = 200,\n ...props\n}: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => (\n <TooltipPrimitive.Provider\n delayDuration={delayDuration}\n skipDelayDuration={skipDelayDuration}\n {...props}\n />\n);\nTooltipProvider.displayName = 'TooltipProvider';\n\nexport const TooltipRoot = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport const TooltipContent = forwardRef<\n ElementRef<typeof TooltipPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(function TooltipContent({ className, sideOffset = 4, ...props }, ref) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium',\n 'bg-tooltip text-tooltip-foreground',\n 'max-w-xs shadow-sm',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n );\n});\nTooltipContent.displayName = 'TooltipContent';\n\nexport interface TooltipProps {\n children: ReactNode;\n label: ReactNode;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n /** Disable showing the tooltip (e.g. when text is not truncated). */\n disabled?: boolean;\n /** Override the global delay. */\n delayDuration?: number;\n}\n\n/**\n * Shorthand for the most common Tooltip case.\n *\n * @example\n * <Tooltip label=\"Copy link\"><IconButton aria-label=\"Copy\" icon={<Copy/>} /></Tooltip>\n *\n * @do Keep tooltip text short — one line, no full sentences. Use a Popover\n * for any content that needs structure.\n * @dont Wrap disabled buttons in Tooltip without `asChild + tabIndex={0}`.\n * Disabled elements don't receive focus, so the tooltip never opens.\n */\nexport function Tooltip({\n children,\n label,\n side = 'top',\n align = 'center',\n disabled,\n delayDuration,\n}: TooltipProps) {\n if (disabled) return <>{children}</>;\n return (\n <TooltipRoot delayDuration={delayDuration}>\n <TooltipTrigger asChild>{children}</TooltipTrigger>\n <TooltipContent side={side} align={align}>\n {label}\n </TooltipContent>\n </TooltipRoot>\n );\n}\nTooltip.displayName = 'Tooltip';\n"],"names":["TooltipProvider","delayDuration","skipDelayDuration","props","jsx","TooltipPrimitive","TooltipRoot","TooltipTrigger","TooltipContent","forwardRef","className","sideOffset","ref","cn","Tooltip","children","label","side","align","disabled","Fragment","jsxs"],"mappings":";;;;;AAUO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,eAAAC,IAAgB;AAAA,EAChB,mBAAAC,IAAoB;AAAA,EACpB,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,eAAAJ;AAAA,IACA,mBAAAC;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFH,EAAgB,cAAc;AAEvB,MAAMM,IAAcD,EAAiB,MAC/BE,IAAiBF,EAAiB,SAElCG,IAAiBC,EAG5B,SAAwB,EAAE,WAAAC,GAAW,YAAAC,IAAa,GAAG,GAAGR,EAAA,GAASS,GAAK;AACtE,SACE,gBAAAR,EAACC,EAAiB,QAAjB,EACC,UAAA,gBAAAD;AAAA,IAACC,EAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,KAAAO;AAAA,MACA,YAAAD;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGP;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ,CAAC;AACDK,EAAe,cAAc;AAwBtB,SAASM,EAAQ;AAAA,EACtB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,eAAAlB;AACF,GAAiB;AACf,SAAIkB,IAAiB,gBAAAf,EAAAgB,GAAA,EAAG,UAAAL,EAAA,CAAS,IAE/B,gBAAAM,EAACf,KAAY,eAAAL,GACX,UAAA;AAAA,IAAA,gBAAAG,EAACG,GAAA,EAAe,SAAO,IAAE,UAAAQ,EAAA,CAAS;AAAA,IAClC,gBAAAX,EAACI,GAAA,EAAe,MAAAS,GAAY,OAAAC,GACzB,UAAAF,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;AACAF,EAAQ,cAAc;"}
@@ -1,15 +1,16 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import { jsxs as m, jsx as i } from "react/jsx-runtime";
3
3
  import { forwardRef as d } from "react";
4
- import { Slot as p } from "@radix-ui/react-slot";
4
+ import { Slot as u } from "@radix-ui/react-slot";
5
5
  import { useStrings as g } from "../../hooks/use-strings.js";
6
6
  import { cn as f } from "../../lib/utils.js";
7
- const x = d(function({ logo: n, nav: e, search: r, actions: i, navLabel: t, className: a, ...s }, m) {
8
- const u = g();
9
- return /* @__PURE__ */ l(
7
+ const x = d(function({ logo: n, nav: e, search: r, actions: o, navLabel: t, className: a, ...s }, l) {
8
+ const p = g();
9
+ return /* @__PURE__ */ m(
10
10
  "header",
11
11
  {
12
- ref: m,
12
+ "data-slot": "top-nav",
13
+ ref: l,
13
14
  className: f(
14
15
  "sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4",
15
16
  // Fixed three-column track from lg up: the centre slot keeps its
@@ -24,27 +25,27 @@ const x = d(function({ logo: n, nav: e, search: r, actions: i, navLabel: t, clas
24
25
  ),
25
26
  ...s,
26
27
  children: [
27
- /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-6", children: [
28
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-6", children: [
28
29
  n,
29
- e && /* @__PURE__ */ o(
30
+ e && /* @__PURE__ */ i(
30
31
  "nav",
31
32
  {
32
- "aria-label": t ?? u.topNav.label,
33
+ "aria-label": t ?? p.topNav.label,
33
34
  className: "hidden items-center gap-1 md:flex",
34
35
  children: e
35
36
  }
36
37
  )
37
38
  ] }),
38
- r && /* @__PURE__ */ o("div", { className: "mx-auto w-full max-w-md flex-1 lg:flex-none", children: r }),
39
- i && /* @__PURE__ */ o("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: i })
39
+ r && /* @__PURE__ */ i("div", { className: "mx-auto w-full max-w-md flex-1 lg:flex-none", children: r }),
40
+ o && /* @__PURE__ */ i("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: o })
40
41
  ]
41
42
  }
42
43
  );
43
44
  });
44
45
  x.displayName = "TopNav";
45
- const v = d(function({ href: n, active: e, asChild: r, className: i, children: t, ...a }, s) {
46
- return /* @__PURE__ */ o(
47
- r ? p : "a",
46
+ const v = d(function({ href: n, active: e, asChild: r, className: o, children: t, ...a }, s) {
47
+ return /* @__PURE__ */ i(
48
+ r ? u : "a",
48
49
  {
49
50
  ref: s,
50
51
  href: n,
@@ -54,7 +55,7 @@ const v = d(function({ href: n, active: e, asChild: r, className: i, children: t
54
55
  "transition-colors duration-[var(--duration-fast)]",
55
56
  e ? "text-foreground" : "text-foreground-muted hover:text-foreground",
56
57
  "focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2",
57
- i
58
+ o
58
59
  ),
59
60
  ...a,
60
61
  children: t
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.js","sources":["../../../src/components/ui/TopNav.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type AnchorHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useStrings } from '@/hooks/use-strings';\nimport { cn } from '@/lib/utils';\n\nexport interface TopNavProps extends HTMLAttributes<HTMLElement> {\n /** Logo / wordmark slot. Shown on the far left. */\n logo: ReactNode;\n /** Primary navigation links — typically a list of `<TopNavLink>`. */\n nav?: ReactNode;\n /** Search / command bar slot — fills the centre on wide screens. */\n search?: ReactNode;\n /** Right-aligned cluster — notifications, theme toggle, user menu. */\n actions?: ReactNode;\n /** Accessible name of the inner `<nav>` landmark. Default \"Primary\". */\n navLabel?: string;\n}\n\n/**\n * App-level top bar. Layout: `logo · nav · search · actions`. Search and nav\n * are optional.\n *\n * @example\n * <TopNav\n * logo={<Logo />}\n * nav={<><TopNavLink href=\"/\" active>Home</TopNavLink>…</>}\n * search={<Input type=\"search\" placeholder=\"Search…\" />}\n * actions={<><Bell /><Avatar /></>}\n * />\n *\n * @do Pick one primary nav style — links here or in the Sidebar, not both.\n * @dont Stack two rows of navigation in the TopNav. If you need tabs as well,\n * put them below the bar inside the page content.\n */\nexport const TopNav = forwardRef<HTMLElement, TopNavProps>(function TopNav(\n { logo, nav, search, actions, navLabel, className, ...props },\n ref,\n) {\n const strings = useStrings();\n return (\n <header\n ref={ref}\n className={cn(\n 'sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4',\n // Fixed three-column track from lg up: the centre slot keeps its\n // position however wide the logo slot grows, so navigating between\n // pages (breadcrumbs of different lengths) never shifts the search.\n // Below lg the bar stays flex — there is not enough room for three\n // tracks, and logo slots that vary in width (breadcrumbs) are hidden\n // at those widths anyway.\n search && 'lg:grid lg:grid-cols-[minmax(0,1fr)_minmax(0,28rem)_minmax(0,1fr)]',\n 'border-border bg-background border-b px-4',\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 items-center gap-6\">\n {logo}\n {nav && (\n <nav\n aria-label={navLabel ?? strings.topNav.label}\n className=\"hidden items-center gap-1 md:flex\"\n >\n {nav}\n </nav>\n )}\n </div>\n {search && <div className=\"mx-auto w-full max-w-md flex-1 lg:flex-none\">{search}</div>}\n {actions && <div className=\"ml-auto flex shrink-0 items-center gap-2\">{actions}</div>}\n </header>\n );\n});\nTopNav.displayName = 'TopNav';\n\nexport interface TopNavLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n href?: string;\n active?: boolean;\n /** Render the child (e.g. router `<Link>`) instead of an `<a>`. */\n asChild?: boolean;\n}\n\nexport const TopNavLink = forwardRef<HTMLAnchorElement, TopNavLinkProps>(function TopNavLink(\n { href, active, asChild, className, children, ...props },\n ref,\n) {\n const Comp = asChild ? Slot : 'a';\n return (\n <Comp\n ref={ref}\n href={href}\n aria-current={active ? 'page' : undefined}\n className={cn(\n 'inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none',\n 'transition-colors duration-[var(--duration-fast)]',\n active ? 'text-foreground' : 'text-foreground-muted hover:text-foreground',\n 'focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2',\n className,\n )}\n {...props}\n >\n {children}\n </Comp>\n );\n});\nTopNavLink.displayName = 'TopNavLink';\n"],"names":["TopNav","forwardRef","logo","nav","search","actions","navLabel","className","props","ref","strings","useStrings","jsxs","cn","jsx","TopNavLink","href","active","asChild","children","Slot"],"mappings":";;;;;;AAoCO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,UAAAW;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AACDJ,EAAW,cAAc;"}
1
+ {"version":3,"file":"TopNav.js","sources":["../../../src/components/ui/TopNav.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type AnchorHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useStrings } from '@/hooks/use-strings';\nimport { cn } from '@/lib/utils';\n\nexport interface TopNavProps extends HTMLAttributes<HTMLElement> {\n /** Logo / wordmark slot. Shown on the far left. */\n logo: ReactNode;\n /** Primary navigation links — typically a list of `<TopNavLink>`. */\n nav?: ReactNode;\n /** Search / command bar slot — fills the centre on wide screens. */\n search?: ReactNode;\n /** Right-aligned cluster — notifications, theme toggle, user menu. */\n actions?: ReactNode;\n /** Accessible name of the inner `<nav>` landmark. Default \"Primary\". */\n navLabel?: string;\n}\n\n/**\n * App-level top bar. Layout: `logo · nav · search · actions`. Search and nav\n * are optional.\n *\n * @example\n * <TopNav\n * logo={<Logo />}\n * nav={<><TopNavLink href=\"/\" active>Home</TopNavLink>…</>}\n * search={<Input type=\"search\" placeholder=\"Search…\" />}\n * actions={<><Bell /><Avatar /></>}\n * />\n *\n * @do Pick one primary nav style — links here or in the Sidebar, not both.\n * @dont Stack two rows of navigation in the TopNav. If you need tabs as well,\n * put them below the bar inside the page content.\n */\nexport const TopNav = forwardRef<HTMLElement, TopNavProps>(function TopNav(\n { logo, nav, search, actions, navLabel, className, ...props },\n ref,\n) {\n const strings = useStrings();\n return (\n <header\n data-slot=\"top-nav\"\n ref={ref}\n className={cn(\n 'sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4',\n // Fixed three-column track from lg up: the centre slot keeps its\n // position however wide the logo slot grows, so navigating between\n // pages (breadcrumbs of different lengths) never shifts the search.\n // Below lg the bar stays flex — there is not enough room for three\n // tracks, and logo slots that vary in width (breadcrumbs) are hidden\n // at those widths anyway.\n search && 'lg:grid lg:grid-cols-[minmax(0,1fr)_minmax(0,28rem)_minmax(0,1fr)]',\n 'border-border bg-background border-b px-4',\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 items-center gap-6\">\n {logo}\n {nav && (\n <nav\n aria-label={navLabel ?? strings.topNav.label}\n className=\"hidden items-center gap-1 md:flex\"\n >\n {nav}\n </nav>\n )}\n </div>\n {search && <div className=\"mx-auto w-full max-w-md flex-1 lg:flex-none\">{search}</div>}\n {actions && <div className=\"ml-auto flex shrink-0 items-center gap-2\">{actions}</div>}\n </header>\n );\n});\nTopNav.displayName = 'TopNav';\n\nexport interface TopNavLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n href?: string;\n active?: boolean;\n /** Render the child (e.g. router `<Link>`) instead of an `<a>`. */\n asChild?: boolean;\n}\n\nexport const TopNavLink = forwardRef<HTMLAnchorElement, TopNavLinkProps>(function TopNavLink(\n { href, active, asChild, className, children, ...props },\n ref,\n) {\n const Comp = asChild ? Slot : 'a';\n return (\n <Comp\n ref={ref}\n href={href}\n aria-current={active ? 'page' : undefined}\n className={cn(\n 'inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none',\n 'transition-colors duration-[var(--duration-fast)]',\n active ? 'text-foreground' : 'text-foreground-muted hover:text-foreground',\n 'focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2',\n className,\n )}\n {...props}\n >\n {children}\n </Comp>\n );\n});\nTopNavLink.displayName = 'TopNavLink';\n"],"names":["TopNav","forwardRef","logo","nav","search","actions","navLabel","className","props","ref","strings","useStrings","jsxs","cn","jsx","TopNavLink","href","active","asChild","children","Slot"],"mappings":";;;;;;AAoCO,MAAMA,IAASC,EAAqC,SACzD,EAAE,MAAAC,GAAM,KAAAC,GAAK,QAAAC,GAAQ,SAAAC,GAAS,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GACtDC,GACA;AACA,QAAMC,IAAUC,EAAA;AAChB,SACE,gBAAAC;AAAA,IAAC;AAAA,I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