acai-ui-library 0.1.13 → 0.1.14

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 (63) hide show
  1. package/dist/components/alert.cjs +3 -2
  2. package/dist/components/alert.cjs.map +1 -1
  3. package/dist/components/alert.js +3 -2
  4. package/dist/components/alert.js.map +1 -1
  5. package/dist/components/card.cjs +1 -1
  6. package/dist/components/card.cjs.map +1 -1
  7. package/dist/components/card.js +1 -1
  8. package/dist/components/card.js.map +1 -1
  9. package/dist/components/checkbox.cjs +2 -1
  10. package/dist/components/checkbox.cjs.map +1 -1
  11. package/dist/components/checkbox.js +2 -1
  12. package/dist/components/checkbox.js.map +1 -1
  13. package/dist/components/data-table.cjs +2 -1
  14. package/dist/components/data-table.cjs.map +1 -1
  15. package/dist/components/data-table.js +2 -1
  16. package/dist/components/data-table.js.map +1 -1
  17. package/dist/components/date-picker.cjs.map +1 -1
  18. package/dist/components/date-picker.js.map +1 -1
  19. package/dist/components/impersonation-banner.cjs +137 -0
  20. package/dist/components/impersonation-banner.cjs.map +1 -0
  21. package/dist/components/impersonation-banner.d.cts +36 -0
  22. package/dist/components/impersonation-banner.d.ts +36 -0
  23. package/dist/components/impersonation-banner.js +101 -0
  24. package/dist/components/impersonation-banner.js.map +1 -0
  25. package/dist/components/input.cjs +2 -1
  26. package/dist/components/input.cjs.map +1 -1
  27. package/dist/components/input.js +2 -1
  28. package/dist/components/input.js.map +1 -1
  29. package/dist/components/item.cjs +1 -2
  30. package/dist/components/item.cjs.map +1 -1
  31. package/dist/components/item.js +1 -2
  32. package/dist/components/item.js.map +1 -1
  33. package/dist/components/pagination.cjs +3 -1
  34. package/dist/components/pagination.cjs.map +1 -1
  35. package/dist/components/pagination.d.cts +1 -1
  36. package/dist/components/pagination.d.ts +1 -1
  37. package/dist/components/pagination.js +3 -1
  38. package/dist/components/pagination.js.map +1 -1
  39. package/dist/components/read-only-guard.cjs +103 -0
  40. package/dist/components/read-only-guard.cjs.map +1 -0
  41. package/dist/components/read-only-guard.d.cts +40 -0
  42. package/dist/components/read-only-guard.d.ts +40 -0
  43. package/dist/components/read-only-guard.js +64 -0
  44. package/dist/components/read-only-guard.js.map +1 -0
  45. package/dist/components/stepper.cjs.map +1 -1
  46. package/dist/components/stepper.js.map +1 -1
  47. package/dist/components/typography.cjs +4 -4
  48. package/dist/components/typography.cjs.map +1 -1
  49. package/dist/components/typography.js +4 -4
  50. package/dist/components/typography.js.map +1 -1
  51. package/dist/index.cjs +236 -12
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +3 -0
  54. package/dist/index.d.ts +3 -0
  55. package/dist/index.js +224 -12
  56. package/dist/index.js.map +1 -1
  57. package/dist/lib/impersonation.cjs +127 -0
  58. package/dist/lib/impersonation.cjs.map +1 -0
  59. package/dist/lib/impersonation.d.cts +45 -0
  60. package/dist/lib/impersonation.d.ts +45 -0
  61. package/dist/lib/impersonation.js +86 -0
  62. package/dist/lib/impersonation.js.map +1 -0
  63. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/stepper.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { Check } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\n/* ---------------------------------- Types --------------------------------- */\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Zero-indexed active step */\n activeStep: number\n /** When true, each step's circle+label is rendered inside a button. */\n clickable?: boolean\n /** Called when a clickable step is activated (click or Enter/Space). */\n onStepChange?: (index: number) => void\n}\n\nexport interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Label displayed below the step circle */\n label: string\n}\n\n/* ----------------------------- Internal context ---------------------------- */\n\ninterface StepperContextValue {\n activeStep: number\n totalSteps: number\n clickable: boolean\n onStepChange?: (index: number) => void\n registerButton: (index: number, el: HTMLButtonElement | null) => void\n}\n\nconst StepperContext = React.createContext<StepperContextValue>({\n activeStep: 0,\n totalSteps: 0,\n clickable: false,\n registerButton: () => {},\n})\n\n/* --------------------------------- Stepper -------------------------------- */\n\nconst Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n (\n {\n activeStep,\n clickable = false,\n onStepChange,\n className,\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const steps = React.Children.toArray(children)\n const buttonRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n\n const registerButton = React.useCallback(\n (index: number, el: HTMLButtonElement | null) => {\n buttonRefs.current[index] = el\n },\n []\n )\n\n const focusButton = (index: number) => {\n const btn = buttonRefs.current[index]\n if (btn && !btn.disabled) btn.focus()\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e)\n if (!clickable) return\n if (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\") return\n\n const current = buttonRefs.current.findIndex(\n (b) => b === document.activeElement\n )\n if (current === -1) return\n\n const dir = e.key === \"ArrowRight\" ? 1 : -1\n const last = steps.length - 1\n let next = current + dir\n // Skip disabled (upcoming) buttons.\n while (next >= 0 && next <= last) {\n const btn = buttonRefs.current[next]\n if (btn && !btn.disabled) {\n e.preventDefault()\n focusButton(next)\n return\n }\n next += dir\n }\n }\n\n return (\n <StepperContext.Provider\n value={{\n activeStep,\n totalSteps: steps.length,\n clickable,\n onStepChange,\n registerButton,\n }}\n >\n <div\n ref={ref}\n className={cn(\"flex w-full items-start\", className)}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {steps.map((child, index) => (\n <React.Fragment key={index}>\n {/* Render the StepperItem with injected index */}\n {React.isValidElement<StepperItemProps & { _index?: number }>(child)\n ? React.cloneElement(child, { _index: index } as any)\n : child}\n\n {/* Connecting line between steps */}\n {index < steps.length - 1 && (\n <div className=\"flex flex-1 items-center pt-[16px] px-2\">\n <div\n className={cn(\n \"h-[2px] w-full transition-colors duration-300 ease-out\",\n index < activeStep\n ? \"bg-[var(--hc-primary-600)]\"\n : \"bg-[var(--hc-grey-200)]\"\n )}\n />\n </div>\n )}\n </React.Fragment>\n ))}\n </div>\n </StepperContext.Provider>\n )\n }\n)\nStepper.displayName = \"Stepper\"\n\n/* ------------------------------- StepperItem ------------------------------ */\n\nconst StepperItem = React.forwardRef<\n HTMLDivElement,\n StepperItemProps & { _index?: number }\n>(({ label, className, _index = 0, ...props }, ref) => {\n const { activeStep, clickable, onStepChange, registerButton } =\n React.useContext(StepperContext)\n\n const status: \"completed\" | \"active\" | \"upcoming\" =\n _index < activeStep\n ? \"completed\"\n : _index === activeStep\n ? \"active\"\n : \"upcoming\"\n\n const circle = (\n <div\n className={cn(\n \"flex h-[32px] w-[32px] shrink-0 items-center justify-center rounded-full text-[14px] transition-colors duration-300 ease-out\",\n status === \"upcoming\" &&\n \"border-[2px] border-[var(--hc-grey-200)] bg-white text-[var(--hc-grey-400)]\",\n status === \"active\" &&\n \"bg-[var(--hc-primary-600)] font-semibold text-white\",\n status === \"completed\" && \"bg-[var(--hc-primary-600)] text-white\"\n )}\n >\n {status === \"completed\" ? (\n <Check className=\"h-[14px] w-[14px]\" />\n ) : (\n _index + 1\n )}\n </div>\n )\n\n const labelEl = (\n <span className=\"mt-[8px] text-center text-[12px] text-foreground\">\n {label}\n </span>\n )\n\n if (clickable) {\n const disabled = _index > activeStep\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n <button\n type=\"button\"\n ref={(el) => registerButton(_index, el)}\n disabled={disabled}\n tabIndex={status === \"active\" ? 0 : -1}\n onClick={() => !disabled && onStepChange?.(_index)}\n className={cn(\n \"flex flex-col items-center rounded-[4px] outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-[var(--hc-primary-600)] focus-visible:ring-offset-2\",\n disabled ? \"cursor-default\" : \"cursor-pointer\"\n )}\n aria-current={status === \"active\" ? \"step\" : undefined}\n >\n {circle}\n {labelEl}\n </button>\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n {circle}\n {labelEl}\n </div>\n )\n})\nStepperItem.displayName = \"StepperItem\"\n\nexport { Stepper, StepperItem }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,0BAAsB;;;ACDtB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADwGY;AA/EZ,IAAM,iBAAuB,oBAAmC;AAAA,EAC9D,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB,MAAM;AAAA,EAAC;AACzB,CAAC;AAID,IAAM,UAAgB;AAAA,EACpB,CACE;AAAA,IACE;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,QAAc,eAAS,QAAQ,QAAQ;AAC7C,UAAM,aAAmB,aAAwC,CAAC,CAAC;AAEnE,UAAM,iBAAuB;AAAA,MAC3B,CAAC,OAAe,OAAiC;AAC/C,mBAAW,QAAQ,KAAK,IAAI;AAAA,MAC9B;AAAA,MACA,CAAC;AAAA,IACH;AAEA,UAAM,cAAc,CAAC,UAAkB;AACrC,YAAM,MAAM,WAAW,QAAQ,KAAK;AACpC,UAAI,OAAO,CAAC,IAAI,SAAU,KAAI,MAAM;AAAA,IACtC;AAEA,UAAM,gBAAgB,CAAC,MAA2C;AAChE,kBAAY,CAAC;AACb,UAAI,CAAC,UAAW;AAChB,UAAI,EAAE,QAAQ,eAAe,EAAE,QAAQ,aAAc;AAErD,YAAM,UAAU,WAAW,QAAQ;AAAA,QACjC,CAAC,MAAM,MAAM,SAAS;AAAA,MACxB;AACA,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WAAW;AAAA,QACT;AAAA,QACA,WAAW,cACT;AAAA,QACF,WAAW,YACT;AAAA,QACF,WAAW,eAAe;AAAA,MAC5B;AAAA,MAEC,qBAAW,cACV,4CAAC,6BAAM,WAAU,qBAAoB,IAErC,SAAS;AAAA;AAAA,EAEb;AAGF,QAAM,UACJ,4CAAC,UAAK,WAAU,oDACb,iBACH;AAGF,MAAI,WAAW;AACb,UAAM,WAAW,SAAS;AAC1B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,QACpD,GAAG;AAAA,QAEJ;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,KAAK,CAAC,OAAO,eAAe,QAAQ,EAAE;AAAA,YACtC;AAAA,YACA,UAAU,WAAW,WAAW,IAAI;AAAA,YACpC,SAAS,MAAM,CAAC,YAAY,eAAe,MAAM;AAAA,YACjD,WAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,WAAW,mBAAmB;AAAA,YAChC;AAAA,YACA,gBAAc,WAAW,WAAW,SAAS;AAAA,YAE5C;AAAA;AAAA,cACA;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA,MAEH;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,YAAY,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/stepper.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { Check } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\n/* ---------------------------------- Types --------------------------------- */\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Zero-indexed active step */\n activeStep: number\n /** When true, each step's circle+label is rendered inside a button. */\n clickable?: boolean\n /** Called when a clickable step is activated (click or Enter/Space). */\n onStepChange?: (index: number) => void\n}\n\nexport interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Label displayed below the step circle */\n label: string\n}\n\n/* ----------------------------- Internal context ---------------------------- */\n\ninterface StepperContextValue {\n activeStep: number\n totalSteps: number\n clickable: boolean\n onStepChange?: (index: number) => void\n registerButton: (index: number, el: HTMLButtonElement | null) => void\n}\n\nconst StepperContext = React.createContext<StepperContextValue>({\n activeStep: 0,\n totalSteps: 0,\n clickable: false,\n registerButton: () => {},\n})\n\n/* --------------------------------- Stepper -------------------------------- */\n\nconst Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n (\n {\n activeStep,\n clickable = false,\n onStepChange,\n className,\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const steps = React.Children.toArray(children)\n const buttonRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n\n const registerButton = React.useCallback(\n (index: number, el: HTMLButtonElement | null) => {\n buttonRefs.current[index] = el\n },\n []\n )\n\n const focusButton = (index: number) => {\n const btn = buttonRefs.current[index]\n if (btn && !btn.disabled) btn.focus()\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e)\n if (!clickable) return\n if (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\") return\n\n const current = buttonRefs.current.findIndex(\n (b) => b === document.activeElement\n )\n if (current === -1) return\n\n const dir = e.key === \"ArrowRight\" ? 1 : -1\n const last = steps.length - 1\n let next = current + dir\n // Skip disabled (upcoming) buttons.\n while (next >= 0 && next <= last) {\n const btn = buttonRefs.current[next]\n if (btn && !btn.disabled) {\n e.preventDefault()\n focusButton(next)\n return\n }\n next += dir\n }\n }\n\n return (\n <StepperContext.Provider\n value={{\n activeStep,\n totalSteps: steps.length,\n clickable,\n onStepChange,\n registerButton,\n }}\n >\n {/* Arrow keys bubble up from the focusable step buttons; the container only\n delegates them (roving focus), it is not itself an interactive element. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n ref={ref}\n className={cn(\"flex w-full items-start\", className)}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {steps.map((child, index) => (\n <React.Fragment key={index}>\n {/* Render the StepperItem with injected index */}\n {React.isValidElement<StepperItemProps & { _index?: number }>(child)\n ? React.cloneElement(child, { _index: index } as any)\n : child}\n\n {/* Connecting line between steps */}\n {index < steps.length - 1 && (\n <div className=\"flex flex-1 items-center pt-[16px] px-2\">\n <div\n className={cn(\n \"h-[2px] w-full transition-colors duration-300 ease-out\",\n index < activeStep\n ? \"bg-[var(--hc-primary-600)]\"\n : \"bg-[var(--hc-grey-200)]\"\n )}\n />\n </div>\n )}\n </React.Fragment>\n ))}\n </div>\n </StepperContext.Provider>\n )\n }\n)\nStepper.displayName = \"Stepper\"\n\n/* ------------------------------- StepperItem ------------------------------ */\n\nconst StepperItem = React.forwardRef<\n HTMLDivElement,\n StepperItemProps & { _index?: number }\n>(({ label, className, _index = 0, ...props }, ref) => {\n const { activeStep, clickable, onStepChange, registerButton } =\n React.useContext(StepperContext)\n\n const status: \"completed\" | \"active\" | \"upcoming\" =\n _index < activeStep\n ? \"completed\"\n : _index === activeStep\n ? \"active\"\n : \"upcoming\"\n\n const circle = (\n <div\n className={cn(\n \"flex h-[32px] w-[32px] shrink-0 items-center justify-center rounded-full text-[14px] transition-colors duration-300 ease-out\",\n status === \"upcoming\" &&\n \"border-[2px] border-[var(--hc-grey-200)] bg-white text-[var(--hc-grey-400)]\",\n status === \"active\" &&\n \"bg-[var(--hc-primary-600)] font-semibold text-white\",\n status === \"completed\" && \"bg-[var(--hc-primary-600)] text-white\"\n )}\n >\n {status === \"completed\" ? (\n <Check className=\"h-[14px] w-[14px]\" />\n ) : (\n _index + 1\n )}\n </div>\n )\n\n const labelEl = (\n <span className=\"mt-[8px] text-center text-[12px] text-foreground\">\n {label}\n </span>\n )\n\n if (clickable) {\n const disabled = _index > activeStep\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n <button\n type=\"button\"\n ref={(el) => registerButton(_index, el)}\n disabled={disabled}\n tabIndex={status === \"active\" ? 0 : -1}\n onClick={() => !disabled && onStepChange?.(_index)}\n className={cn(\n \"flex flex-col items-center rounded-[4px] outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-[var(--hc-primary-600)] focus-visible:ring-offset-2\",\n disabled ? \"cursor-default\" : \"cursor-pointer\"\n )}\n aria-current={status === \"active\" ? \"step\" : undefined}\n >\n {circle}\n {labelEl}\n </button>\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n {circle}\n {labelEl}\n </div>\n )\n})\nStepperItem.displayName = \"StepperItem\"\n\nexport { Stepper, StepperItem }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,0BAAsB;;;ACDtB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD2GY;AAlFZ,IAAM,iBAAuB,oBAAmC;AAAA,EAC9D,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB,MAAM;AAAA,EAAC;AACzB,CAAC;AAID,IAAM,UAAgB;AAAA,EACpB,CACE;AAAA,IACE;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,QAAc,eAAS,QAAQ,QAAQ;AAC7C,UAAM,aAAmB,aAAwC,CAAC,CAAC;AAEnE,UAAM,iBAAuB;AAAA,MAC3B,CAAC,OAAe,OAAiC;AAC/C,mBAAW,QAAQ,KAAK,I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;AAAA,MAEH;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,YAAY,cAAc;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/stepper.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { Check } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\n/* ---------------------------------- Types --------------------------------- */\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Zero-indexed active step */\n activeStep: number\n /** When true, each step's circle+label is rendered inside a button. */\n clickable?: boolean\n /** Called when a clickable step is activated (click or Enter/Space). */\n onStepChange?: (index: number) => void\n}\n\nexport interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Label displayed below the step circle */\n label: string\n}\n\n/* ----------------------------- Internal context ---------------------------- */\n\ninterface StepperContextValue {\n activeStep: number\n totalSteps: number\n clickable: boolean\n onStepChange?: (index: number) => void\n registerButton: (index: number, el: HTMLButtonElement | null) => void\n}\n\nconst StepperContext = React.createContext<StepperContextValue>({\n activeStep: 0,\n totalSteps: 0,\n clickable: false,\n registerButton: () => {},\n})\n\n/* --------------------------------- Stepper -------------------------------- */\n\nconst Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n (\n {\n activeStep,\n clickable = false,\n onStepChange,\n className,\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const steps = React.Children.toArray(children)\n const buttonRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n\n const registerButton = React.useCallback(\n (index: number, el: HTMLButtonElement | null) => {\n buttonRefs.current[index] = el\n },\n []\n )\n\n const focusButton = (index: number) => {\n const btn = buttonRefs.current[index]\n if (btn && !btn.disabled) btn.focus()\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e)\n if (!clickable) return\n if (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\") return\n\n const current = buttonRefs.current.findIndex(\n (b) => b === document.activeElement\n )\n if (current === -1) return\n\n const dir = e.key === \"ArrowRight\" ? 1 : -1\n const last = steps.length - 1\n let next = current + dir\n // Skip disabled (upcoming) buttons.\n while (next >= 0 && next <= last) {\n const btn = buttonRefs.current[next]\n if (btn && !btn.disabled) {\n e.preventDefault()\n focusButton(next)\n return\n }\n next += dir\n }\n }\n\n return (\n <StepperContext.Provider\n value={{\n activeStep,\n totalSteps: steps.length,\n clickable,\n onStepChange,\n registerButton,\n }}\n >\n <div\n ref={ref}\n className={cn(\"flex w-full items-start\", className)}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {steps.map((child, index) => (\n <React.Fragment key={index}>\n {/* Render the StepperItem with injected index */}\n {React.isValidElement<StepperItemProps & { _index?: number }>(child)\n ? React.cloneElement(child, { _index: index } as any)\n : child}\n\n {/* Connecting line between steps */}\n {index < steps.length - 1 && (\n <div className=\"flex flex-1 items-center pt-[16px] px-2\">\n <div\n className={cn(\n \"h-[2px] w-full transition-colors duration-300 ease-out\",\n index < activeStep\n ? \"bg-[var(--hc-primary-600)]\"\n : \"bg-[var(--hc-grey-200)]\"\n )}\n />\n </div>\n )}\n </React.Fragment>\n ))}\n </div>\n </StepperContext.Provider>\n )\n }\n)\nStepper.displayName = \"Stepper\"\n\n/* ------------------------------- StepperItem ------------------------------ */\n\nconst StepperItem = React.forwardRef<\n HTMLDivElement,\n StepperItemProps & { _index?: number }\n>(({ label, className, _index = 0, ...props }, ref) => {\n const { activeStep, clickable, onStepChange, registerButton } =\n React.useContext(StepperContext)\n\n const status: \"completed\" | \"active\" | \"upcoming\" =\n _index < activeStep\n ? \"completed\"\n : _index === activeStep\n ? \"active\"\n : \"upcoming\"\n\n const circle = (\n <div\n className={cn(\n \"flex h-[32px] w-[32px] shrink-0 items-center justify-center rounded-full text-[14px] transition-colors duration-300 ease-out\",\n status === \"upcoming\" &&\n \"border-[2px] border-[var(--hc-grey-200)] bg-white text-[var(--hc-grey-400)]\",\n status === \"active\" &&\n \"bg-[var(--hc-primary-600)] font-semibold text-white\",\n status === \"completed\" && \"bg-[var(--hc-primary-600)] text-white\"\n )}\n >\n {status === \"completed\" ? (\n <Check className=\"h-[14px] w-[14px]\" />\n ) : (\n _index + 1\n )}\n </div>\n )\n\n const labelEl = (\n <span className=\"mt-[8px] text-center text-[12px] text-foreground\">\n {label}\n </span>\n )\n\n if (clickable) {\n const disabled = _index > activeStep\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n <button\n type=\"button\"\n ref={(el) => registerButton(_index, el)}\n disabled={disabled}\n tabIndex={status === \"active\" ? 0 : -1}\n onClick={() => !disabled && onStepChange?.(_index)}\n className={cn(\n \"flex flex-col items-center rounded-[4px] outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-[var(--hc-primary-600)] focus-visible:ring-offset-2\",\n disabled ? \"cursor-default\" : \"cursor-pointer\"\n )}\n aria-current={status === \"active\" ? \"step\" : undefined}\n >\n {circle}\n {labelEl}\n </button>\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n {circle}\n {labelEl}\n </div>\n )\n})\nStepperItem.displayName = \"StepperItem\"\n\nexport { Stepper, StepperItem }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,aAAa;;;ACDtB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADwGY,SASM,KATN;AA/EZ,IAAM,iBAAuB,oBAAmC;AAAA,EAC9D,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB,MAAM;AAAA,EAAC;AACzB,CAAC;AAID,IAAM,UAAgB;AAAA,EACpB,CACE;AAAA,IACE;AAAA,IACA,Y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,cACA,WAAW,mBAAmB;AAAA,YAChC;AAAA,YACA,gBAAc,WAAW,WAAW,SAAS;AAAA,YAE5C;AAAA;AAAA,cACA;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA,MAEH;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,YAAY,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/stepper.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { Check } from \"lucide-react\"\nimport { cn } from \"../lib/utils\"\n\n/* ---------------------------------- Types --------------------------------- */\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Zero-indexed active step */\n activeStep: number\n /** When true, each step's circle+label is rendered inside a button. */\n clickable?: boolean\n /** Called when a clickable step is activated (click or Enter/Space). */\n onStepChange?: (index: number) => void\n}\n\nexport interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Label displayed below the step circle */\n label: string\n}\n\n/* ----------------------------- Internal context ---------------------------- */\n\ninterface StepperContextValue {\n activeStep: number\n totalSteps: number\n clickable: boolean\n onStepChange?: (index: number) => void\n registerButton: (index: number, el: HTMLButtonElement | null) => void\n}\n\nconst StepperContext = React.createContext<StepperContextValue>({\n activeStep: 0,\n totalSteps: 0,\n clickable: false,\n registerButton: () => {},\n})\n\n/* --------------------------------- Stepper -------------------------------- */\n\nconst Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n (\n {\n activeStep,\n clickable = false,\n onStepChange,\n className,\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const steps = React.Children.toArray(children)\n const buttonRefs = React.useRef<Array<HTMLButtonElement | null>>([])\n\n const registerButton = React.useCallback(\n (index: number, el: HTMLButtonElement | null) => {\n buttonRefs.current[index] = el\n },\n []\n )\n\n const focusButton = (index: number) => {\n const btn = buttonRefs.current[index]\n if (btn && !btn.disabled) btn.focus()\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e)\n if (!clickable) return\n if (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\") return\n\n const current = buttonRefs.current.findIndex(\n (b) => b === document.activeElement\n )\n if (current === -1) return\n\n const dir = e.key === \"ArrowRight\" ? 1 : -1\n const last = steps.length - 1\n let next = current + dir\n // Skip disabled (upcoming) buttons.\n while (next >= 0 && next <= last) {\n const btn = buttonRefs.current[next]\n if (btn && !btn.disabled) {\n e.preventDefault()\n focusButton(next)\n return\n }\n next += dir\n }\n }\n\n return (\n <StepperContext.Provider\n value={{\n activeStep,\n totalSteps: steps.length,\n clickable,\n onStepChange,\n registerButton,\n }}\n >\n {/* Arrow keys bubble up from the focusable step buttons; the container only\n delegates them (roving focus), it is not itself an interactive element. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n ref={ref}\n className={cn(\"flex w-full items-start\", className)}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {steps.map((child, index) => (\n <React.Fragment key={index}>\n {/* Render the StepperItem with injected index */}\n {React.isValidElement<StepperItemProps & { _index?: number }>(child)\n ? React.cloneElement(child, { _index: index } as any)\n : child}\n\n {/* Connecting line between steps */}\n {index < steps.length - 1 && (\n <div className=\"flex flex-1 items-center pt-[16px] px-2\">\n <div\n className={cn(\n \"h-[2px] w-full transition-colors duration-300 ease-out\",\n index < activeStep\n ? \"bg-[var(--hc-primary-600)]\"\n : \"bg-[var(--hc-grey-200)]\"\n )}\n />\n </div>\n )}\n </React.Fragment>\n ))}\n </div>\n </StepperContext.Provider>\n )\n }\n)\nStepper.displayName = \"Stepper\"\n\n/* ------------------------------- StepperItem ------------------------------ */\n\nconst StepperItem = React.forwardRef<\n HTMLDivElement,\n StepperItemProps & { _index?: number }\n>(({ label, className, _index = 0, ...props }, ref) => {\n const { activeStep, clickable, onStepChange, registerButton } =\n React.useContext(StepperContext)\n\n const status: \"completed\" | \"active\" | \"upcoming\" =\n _index < activeStep\n ? \"completed\"\n : _index === activeStep\n ? \"active\"\n : \"upcoming\"\n\n const circle = (\n <div\n className={cn(\n \"flex h-[32px] w-[32px] shrink-0 items-center justify-center rounded-full text-[14px] transition-colors duration-300 ease-out\",\n status === \"upcoming\" &&\n \"border-[2px] border-[var(--hc-grey-200)] bg-white text-[var(--hc-grey-400)]\",\n status === \"active\" &&\n \"bg-[var(--hc-primary-600)] font-semibold text-white\",\n status === \"completed\" && \"bg-[var(--hc-primary-600)] text-white\"\n )}\n >\n {status === \"completed\" ? (\n <Check className=\"h-[14px] w-[14px]\" />\n ) : (\n _index + 1\n )}\n </div>\n )\n\n const labelEl = (\n <span className=\"mt-[8px] text-center text-[12px] text-foreground\">\n {label}\n </span>\n )\n\n if (clickable) {\n const disabled = _index > activeStep\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n <button\n type=\"button\"\n ref={(el) => registerButton(_index, el)}\n disabled={disabled}\n tabIndex={status === \"active\" ? 0 : -1}\n onClick={() => !disabled && onStepChange?.(_index)}\n className={cn(\n \"flex flex-col items-center rounded-[4px] outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-[var(--hc-primary-600)] focus-visible:ring-offset-2\",\n disabled ? \"cursor-default\" : \"cursor-pointer\"\n )}\n aria-current={status === \"active\" ? \"step\" : undefined}\n >\n {circle}\n {labelEl}\n </button>\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", className)}\n {...props}\n >\n {circle}\n {labelEl}\n </div>\n )\n})\nStepperItem.displayName = \"StepperItem\"\n\nexport { Stepper, StepperItem }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,S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AAS;AAC1B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,QACpD,GAAG;AAAA,QAEJ;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,KAAK,CAAC,OAAO,eAAe,QAAQ,EAAE;AAAA,YACtC;AAAA,YACA,UAAU,WAAW,WAAW,IAAI;AAAA,YACpC,SAAS,MAAM,CAAC,YAAY,eAAe,MAAM;AAAA,YACjD,WAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,WAAW,mBAAmB;AAAA,YAChC;AAAA,YACA,gBAAc,WAAW,WAAW,SAAS;AAAA,YAE5C;AAAA;AAAA,cACA;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA,MAEH;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,YAAY,cAAc;","names":[]}
@@ -75,19 +75,19 @@ function resolveColor(color, defaultColorClass) {
75
75
  return colorMap[color];
76
76
  }
77
77
  var H1 = React.forwardRef(
78
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { ref, className: cn("scroll-m-20 text-3xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
78
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { ref, className: cn("scroll-m-20 text-3xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
79
79
  );
80
80
  H1.displayName = "H1";
81
81
  var H2 = React.forwardRef(
82
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { ref, className: cn("scroll-m-20 text-2xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
82
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { ref, className: cn("scroll-m-20 text-2xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
83
83
  );
84
84
  H2.displayName = "H2";
85
85
  var H3 = React.forwardRef(
86
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { ref, className: cn("scroll-m-20 text-xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
86
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { ref, className: cn("scroll-m-20 text-xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
87
87
  );
88
88
  H3.displayName = "H3";
89
89
  var H4 = React.forwardRef(
90
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { ref, className: cn("scroll-m-20 text-lg tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
90
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { ref, className: cn("scroll-m-20 text-lg tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
91
91
  );
92
92
  H4.displayName = "H4";
93
93
  var Body = React.forwardRef(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/typography.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../lib/utils\"\n\nexport type TypographyWeight = \"extrabold\" | \"bold\" | \"semibold\" | \"medium\" | \"regular\" | \"light\"\n\nexport type TypographyColor =\n | \"default\"\n | \"secondary\"\n | \"foreground\"\n | \"muted\"\n | \"success\"\n | \"warning\"\n | \"destructive\"\n | \"inherit\"\n\nconst weightMap: Record<TypographyWeight, string> = {\n extrabold: \"font-extrabold\",\n bold: \"font-bold\",\n semibold: \"font-semibold\",\n medium: \"font-medium\",\n regular: \"font-normal\",\n light: \"font-light\",\n}\n\nconst colorMap: Record<Exclude<TypographyColor, \"default\">, string> = {\n secondary: \"text-muted-foreground\",\n foreground: \"text-[var(--hc-color-foreground)]\",\n muted: \"text-muted-foreground\",\n success: \"text-[var(--hc-color-success)]\",\n warning: \"text-[var(--hc-color-warning)]\",\n destructive: \"text-[var(--hc-color-destructive)]\",\n inherit: \"text-inherit\",\n}\n\ninterface TypographyHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\ninterface TypographyParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\nfunction resolveColor(color: TypographyColor | undefined, defaultColorClass: string): string {\n if (!color || color === \"default\") return defaultColorClass\n return colorMap[color]\n}\n\nconst H1 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h1 ref={ref} className={cn(\"scroll-m-20 text-3xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH1.displayName = \"H1\"\n\nconst H2 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h2 ref={ref} className={cn(\"scroll-m-20 text-2xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH2.displayName = \"H2\"\n\nconst H3 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h3 ref={ref} className={cn(\"scroll-m-20 text-xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH3.displayName = \"H3\"\n\nconst H4 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h4 ref={ref} className={cn(\"scroll-m-20 text-lg tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH4.displayName = \"H4\"\n\nconst Body = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-base leading-7\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nBody.displayName = \"Body\"\n\nconst Small = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nSmall.displayName = \"Small\"\n\nconst Caption = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-xs\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nCaption.displayName = \"Caption\"\n\nconst Lead = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"medium\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-lg\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nLead.displayName = \"Lead\"\n\nconst Muted = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nMuted.displayName = \"Muted\"\n\nconst Code = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, ...props }, ref) => (\n <code\n ref={ref}\n className={cn(\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n className\n )}\n {...props}\n />\n )\n)\nCode.displayName = \"Code\"\n\nexport { H1, H2, H3, H4, Body, Small, Caption, Lead, Muted, Code }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;;;ACAvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD8CI;AApCJ,IAAM,YAA8C;AAAA,EAClD,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AACT;AAEA,IAAM,WAAgE;AAAA,EACpE,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AACX;AAYA,SAAS,aAAa,OAAoC,mBAAmC;AAC3F,MAAI,CAAC,SAAS,UAAU,UAAW,QAAO;AAC1C,SAAO,SAAS,KAAK;AACvB;AAEA,IAAM,KAAW;AAAA,EACf,CAAC,EAAE,WAAW,SAAS,YAAY,OAAO,GAAG,MAAM,GAAG,QACpD,4CAAC,QAAG,KAAU,WAAW,GAAG,uCAAuC,aAAa,OAAO,iBAAiB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAEzJ;AACA,GAAG,cAAc;AAEjB,IAAM,KAAW;AAAA,EACf,CAAC,EAAE,WAAW,SAAS,YAAY,OAAO,GAAG,MAAM,GAAG,QACpD,4CAAC,QAAG,KAAU,WAAW,GAAG,uCAAuC,aAAa,OAAO,iBAAiB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAEzJ;AACA,GAA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AW,GAAG,WAAW,aAAa,OAAO,iBAAiB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAE5H;AACA,KAAK,cAAc;AAEnB,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,SAAS,WAAW,OAAO,GAAG,MAAM,GAAG,QACnD,4CAAC,OAAE,KAAU,WAAW,GAAG,WAAW,aAAa,OAAO,uBAAuB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAElI;AACA,MAAM,cAAc;AAEpB,IAAM,OAAa;AAAA,EACjB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,KAAK,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/typography.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../lib/utils\"\n\nexport type TypographyWeight = \"extrabold\" | \"bold\" | \"semibold\" | \"medium\" | \"regular\" | \"light\"\n\nexport type TypographyColor =\n | \"default\"\n | \"secondary\"\n | \"foreground\"\n | \"muted\"\n | \"success\"\n | \"warning\"\n | \"destructive\"\n | \"inherit\"\n\nconst weightMap: Record<TypographyWeight, string> = {\n extrabold: \"font-extrabold\",\n bold: \"font-bold\",\n semibold: \"font-semibold\",\n medium: \"font-medium\",\n regular: \"font-normal\",\n light: \"font-light\",\n}\n\nconst colorMap: Record<Exclude<TypographyColor, \"default\">, string> = {\n secondary: \"text-muted-foreground\",\n foreground: \"text-[var(--hc-color-foreground)]\",\n muted: \"text-muted-foreground\",\n success: \"text-[var(--hc-color-success)]\",\n warning: \"text-[var(--hc-color-warning)]\",\n destructive: \"text-[var(--hc-color-destructive)]\",\n inherit: \"text-inherit\",\n}\n\ninterface TypographyHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\ninterface TypographyParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\nfunction resolveColor(color: TypographyColor | undefined, defaultColorClass: string): string {\n if (!color || color === \"default\") return defaultColorClass\n return colorMap[color]\n}\n\nconst H1 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h1 ref={ref} className={cn(\"scroll-m-20 text-3xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h1>\n )\n)\nH1.displayName = \"H1\"\n\nconst H2 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h2 ref={ref} className={cn(\"scroll-m-20 text-2xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h2>\n )\n)\nH2.displayName = \"H2\"\n\nconst H3 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h3 ref={ref} className={cn(\"scroll-m-20 text-xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h3>\n )\n)\nH3.displayName = \"H3\"\n\nconst H4 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h4 ref={ref} className={cn(\"scroll-m-20 text-lg tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h4>\n )\n)\nH4.displayName = \"H4\"\n\nconst Body = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-base leading-7\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nBody.displayName = \"Body\"\n\nconst Small = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nSmall.displayName = \"Small\"\n\nconst Caption = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-xs\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nCaption.displayName = \"Caption\"\n\nconst Lead = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"medium\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-lg\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nLead.displayName = \"Lead\"\n\nconst Muted = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nMuted.displayName = \"Muted\"\n\nconst Code = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, ...props }, ref) => (\n <code\n ref={ref}\n className={cn(\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n className\n )}\n {...props}\n />\n )\n)\nCode.displayName = \"Code\"\n\nexport { H1, H2, H3, H4, Body, Small, Caption, Lead, Muted, Code }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;;;ACAvB,k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,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAElI;AACA,MAAM,cAAc;AAEpB,IAAM,OAAa;AAAA,EACjB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,KAAK,cAAc;","names":[]}
@@ -32,19 +32,19 @@ function resolveColor(color, defaultColorClass) {
32
32
  return colorMap[color];
33
33
  }
34
34
  var H1 = React.forwardRef(
35
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ jsx("h1", { ref, className: cn("scroll-m-20 text-3xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
35
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx("h1", { ref, className: cn("scroll-m-20 text-3xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
36
36
  );
37
37
  H1.displayName = "H1";
38
38
  var H2 = React.forwardRef(
39
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ jsx("h2", { ref, className: cn("scroll-m-20 text-2xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
39
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx("h2", { ref, className: cn("scroll-m-20 text-2xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
40
40
  );
41
41
  H2.displayName = "H2";
42
42
  var H3 = React.forwardRef(
43
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("scroll-m-20 text-xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
43
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("scroll-m-20 text-xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
44
44
  );
45
45
  H3.displayName = "H3";
46
46
  var H4 = React.forwardRef(
47
- ({ className, weight = "semibold", color, ...props }, ref) => /* @__PURE__ */ jsx("h4", { ref, className: cn("scroll-m-20 text-lg tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
47
+ ({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx("h4", { ref, className: cn("scroll-m-20 text-lg tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
48
48
  );
49
49
  H4.displayName = "H4";
50
50
  var Body = React.forwardRef(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/typography.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../lib/utils\"\n\nexport type TypographyWeight = \"extrabold\" | \"bold\" | \"semibold\" | \"medium\" | \"regular\" | \"light\"\n\nexport type TypographyColor =\n | \"default\"\n | \"secondary\"\n | \"foreground\"\n | \"muted\"\n | \"success\"\n | \"warning\"\n | \"destructive\"\n | \"inherit\"\n\nconst weightMap: Record<TypographyWeight, string> = {\n extrabold: \"font-extrabold\",\n bold: \"font-bold\",\n semibold: \"font-semibold\",\n medium: \"font-medium\",\n regular: \"font-normal\",\n light: \"font-light\",\n}\n\nconst colorMap: Record<Exclude<TypographyColor, \"default\">, string> = {\n secondary: \"text-muted-foreground\",\n foreground: \"text-[var(--hc-color-foreground)]\",\n muted: \"text-muted-foreground\",\n success: \"text-[var(--hc-color-success)]\",\n warning: \"text-[var(--hc-color-warning)]\",\n destructive: \"text-[var(--hc-color-destructive)]\",\n inherit: \"text-inherit\",\n}\n\ninterface TypographyHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\ninterface TypographyParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\nfunction resolveColor(color: TypographyColor | undefined, defaultColorClass: string): string {\n if (!color || color === \"default\") return defaultColorClass\n return colorMap[color]\n}\n\nconst H1 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h1 ref={ref} className={cn(\"scroll-m-20 text-3xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH1.displayName = \"H1\"\n\nconst H2 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h2 ref={ref} className={cn(\"scroll-m-20 text-2xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH2.displayName = \"H2\"\n\nconst H3 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h3 ref={ref} className={cn(\"scroll-m-20 text-xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH3.displayName = \"H3\"\n\nconst H4 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, ...props }, ref) => (\n <h4 ref={ref} className={cn(\"scroll-m-20 text-lg tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nH4.displayName = \"H4\"\n\nconst Body = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-base leading-7\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nBody.displayName = \"Body\"\n\nconst Small = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nSmall.displayName = \"Small\"\n\nconst Caption = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-xs\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nCaption.displayName = \"Caption\"\n\nconst Lead = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"medium\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-lg\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nLead.displayName = \"Lead\"\n\nconst Muted = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nMuted.displayName = \"Muted\"\n\nconst Code = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, ...props }, ref) => (\n <code\n ref={ref}\n className={cn(\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n className\n )}\n {...props}\n />\n )\n)\nCode.displayName = \"Code\"\n\nexport { H1, H2, H3, H4, Body, Small, Caption, Lead, Muted, Code }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;;;ACAvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD8CI;AApCJ,IAAM,YAA8C;AAAA,EAClD,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AACT;AAEA,IAAM,WAAgE;AAAA,EACpE,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SA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G,SAAS,GAAI,GAAG,OAAO;AAExI;AACA,KAAK,cAAc;AAEnB,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,SAAS,WAAW,OAAO,GAAG,MAAM,GAAG,QACnD,oBAAC,OAAE,KAAU,WAAW,GAAG,WAAW,aAAa,OAAO,uBAAuB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAElI;AACA,MAAM,cAAc;AAEpB,IAAM,UAAgB;AAAA,EACpB,CAAC,EAAE,WAAW,SAAS,WAAW,OAAO,GAAG,MAAM,GAAG,QACnD,oBAAC,OAAE,KAAU,WAAW,GAAG,WAAW,aAAa,OAAO,uBAAuB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAElI;AACA,QAAQ,cAAc;AAEtB,IAAM,OAAa;AAAA,EACjB,CAAC,EAAE,WAAW,SAAS,UAAU,OAAO,GAAG,MAAM,GAAG,QAClD,oBAAC,OAAE,KAAU,WAAW,GAAG,WAAW,aAAa,OAAO,iBAAiB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAE5H;AACA,KAAK,cAAc;AAEnB,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,SAAS,WAAW,OAAO,GAAG,MAAM,GAAG,QACnD,oBAAC,OAAE,KAAU,WAAW,GAAG,WAAW,aAAa,OAAO,uBAAuB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAAO;AAElI;AACA,MAAM,cAAc;AAEpB,IAAM,OAAa;AAAA,EACjB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,KAAK,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/typography.tsx","../../src/lib/utils.ts"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../lib/utils\"\n\nexport type TypographyWeight = \"extrabold\" | \"bold\" | \"semibold\" | \"medium\" | \"regular\" | \"light\"\n\nexport type TypographyColor =\n | \"default\"\n | \"secondary\"\n | \"foreground\"\n | \"muted\"\n | \"success\"\n | \"warning\"\n | \"destructive\"\n | \"inherit\"\n\nconst weightMap: Record<TypographyWeight, string> = {\n extrabold: \"font-extrabold\",\n bold: \"font-bold\",\n semibold: \"font-semibold\",\n medium: \"font-medium\",\n regular: \"font-normal\",\n light: \"font-light\",\n}\n\nconst colorMap: Record<Exclude<TypographyColor, \"default\">, string> = {\n secondary: \"text-muted-foreground\",\n foreground: \"text-[var(--hc-color-foreground)]\",\n muted: \"text-muted-foreground\",\n success: \"text-[var(--hc-color-success)]\",\n warning: \"text-[var(--hc-color-warning)]\",\n destructive: \"text-[var(--hc-color-destructive)]\",\n inherit: \"text-inherit\",\n}\n\ninterface TypographyHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\ninterface TypographyParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {\n weight?: TypographyWeight\n color?: TypographyColor\n}\n\nfunction resolveColor(color: TypographyColor | undefined, defaultColorClass: string): string {\n if (!color || color === \"default\") return defaultColorClass\n return colorMap[color]\n}\n\nconst H1 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h1 ref={ref} className={cn(\"scroll-m-20 text-3xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h1>\n )\n)\nH1.displayName = \"H1\"\n\nconst H2 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h2 ref={ref} className={cn(\"scroll-m-20 text-2xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h2>\n )\n)\nH2.displayName = \"H2\"\n\nconst H3 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h3 ref={ref} className={cn(\"scroll-m-20 text-xl tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h3>\n )\n)\nH3.displayName = \"H3\"\n\nconst H4 = React.forwardRef<HTMLHeadingElement, TypographyHeadingProps>(\n ({ className, weight = \"semibold\", color, children, ...props }, ref) => (\n <h4 ref={ref} className={cn(\"scroll-m-20 text-lg tracking-tight\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props}>\n {children}\n </h4>\n )\n)\nH4.displayName = \"H4\"\n\nconst Body = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-base leading-7\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nBody.displayName = \"Body\"\n\nconst Small = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nSmall.displayName = \"Small\"\n\nconst Caption = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-xs\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nCaption.displayName = \"Caption\"\n\nconst Lead = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"medium\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-lg\", resolveColor(color, \"text-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nLead.displayName = \"Lead\"\n\nconst Muted = React.forwardRef<HTMLParagraphElement, TypographyParagraphProps>(\n ({ className, weight = \"regular\", color, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm\", resolveColor(color, \"text-muted-foreground\"), weightMap[weight], className)} {...props} />\n )\n)\nMuted.displayName = \"Muted\"\n\nconst Code = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, ...props }, ref) => (\n <code\n ref={ref}\n className={cn(\n \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n className\n )}\n {...props}\n />\n )\n)\nCode.displayName = \"Code\"\n\nexport { H1, H2, H3, H4, Body, Small, Caption, Lead, Muted, Code }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,YAAY,WAAW;;;ACAvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD8CI;AApCJ,IAAM,YAA8C;AAAA,EAClD,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AACT;AAEA,IAAM,WAAgE;AAAA,EACpE,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AACX;AAYA,SAAS,aAAa,OAAoC,mBAAmC;AAC3F,MAAI,CAAC,SAAS,UAAU,UAAW,QAAO;AAC1C,SAAO,SAAS,KAAK;AACvB;AAEA,IAAM,KAAW;AAAA,EACf,CAAC,EAAE,WAAW,SAAS,YAAY,OAAO,UAAU,GAAG,MAAM,GAAG,QAC9D,oBAAC,QAAG,KAAU,WAAW,GAAG,uCAAuC,aAAa,OAAO,iBAAiB,GAAG,UAAU,MAAM,GAAG,SAAS,GAAI,GAAG,OAC3I,UACH;AAEJ;AACA,GAAG,cAAc;AAEjB,IAAM,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