commerce-toolkit 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/accordion-trigger-CpTcclGS.cjs +2 -0
  2. package/dist/accordion-trigger-CpTcclGS.cjs.map +1 -0
  3. package/dist/accordion-trigger-DFuN29lS.js +455 -0
  4. package/dist/accordion-trigger-DFuN29lS.js.map +1 -0
  5. package/dist/accordion.cjs +1 -1
  6. package/dist/accordion.js +7 -8
  7. package/dist/{alert-dismiss-EYWAId7r.js → alert-dismiss-B7_uKkyV.js} +2 -2
  8. package/dist/{alert-dismiss-EYWAId7r.js.map → alert-dismiss-B7_uKkyV.js.map} +1 -1
  9. package/dist/{alert-dismiss-m6lm9pLf.cjs → alert-dismiss-BO3hXWMt.cjs} +2 -2
  10. package/dist/{alert-dismiss-m6lm9pLf.cjs.map → alert-dismiss-BO3hXWMt.cjs.map} +1 -1
  11. package/dist/alert.cjs +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/blog-post-card-author-CBXo2FqS.cjs +2 -0
  14. package/dist/blog-post-card-author-CBXo2FqS.cjs.map +1 -0
  15. package/dist/{blog-post-card-author-C1GuND4f.js → blog-post-card-author-VkGle9g8.js} +30 -24
  16. package/dist/blog-post-card-author-VkGle9g8.js.map +1 -0
  17. package/dist/blog-post-card.cjs +1 -1
  18. package/dist/blog-post-card.cjs.map +1 -1
  19. package/dist/blog-post-card.js +28 -34
  20. package/dist/blog-post-card.js.map +1 -1
  21. package/dist/button-BgvMm9T3.cjs +7 -0
  22. package/dist/button-BgvMm9T3.cjs.map +1 -0
  23. package/dist/{button-W0_PtryU.js → button-C0iR-l2_.js} +2 -2
  24. package/dist/button-C0iR-l2_.js.map +1 -0
  25. package/dist/carousel-next-C6jpZTlN.js +1480 -0
  26. package/dist/carousel-next-C6jpZTlN.js.map +1 -0
  27. package/dist/carousel-next-DEHDO98_.cjs +2 -0
  28. package/dist/{carousel-next-BGIZglEF.cjs.map → carousel-next-DEHDO98_.cjs.map} +1 -1
  29. package/dist/carousel.cjs +1 -1
  30. package/dist/carousel.js +1 -1
  31. package/dist/category-card-link-BXoWFETv.cjs +2 -0
  32. package/dist/category-card-link-BXoWFETv.cjs.map +1 -0
  33. package/dist/category-card-link-D85RfMpf.js +186 -0
  34. package/dist/category-card-link-D85RfMpf.js.map +1 -0
  35. package/dist/category-card.cjs +1 -1
  36. package/dist/category-card.cjs.map +1 -1
  37. package/dist/category-card.js +23 -27
  38. package/dist/category-card.js.map +1 -1
  39. package/dist/compare-card.cjs +1 -1
  40. package/dist/compare-card.js +2 -2
  41. package/dist/components/accordion/accordion.d.ts +1 -2
  42. package/dist/components/accordion/accordion.d.ts.map +1 -1
  43. package/dist/components/accordion/primitives/accordion-chevron.d.ts.map +1 -1
  44. package/dist/components/accordion/primitives/accordion-content-area.d.ts.map +1 -1
  45. package/dist/components/accordion/primitives/accordion-item.d.ts.map +1 -1
  46. package/dist/components/accordion/primitives/accordion-root.d.ts +2 -10
  47. package/dist/components/accordion/primitives/accordion-root.d.ts.map +1 -1
  48. package/dist/components/accordion/primitives/accordion-title.d.ts.map +1 -1
  49. package/dist/components/accordion/primitives.d.ts +1 -1
  50. package/dist/components/accordion/primitives.d.ts.map +1 -1
  51. package/dist/components/blog-post-card/blog-post-card.d.ts +2 -1
  52. package/dist/components/blog-post-card/blog-post-card.d.ts.map +1 -1
  53. package/dist/components/blog-post-card/primitives/blog-post-card-root.d.ts +2 -1
  54. package/dist/components/blog-post-card/primitives/blog-post-card-root.d.ts.map +1 -1
  55. package/dist/components/blog-post-card/primitives/blog-post-card-skeleton.d.ts +2 -4
  56. package/dist/components/blog-post-card/primitives/blog-post-card-skeleton.d.ts.map +1 -1
  57. package/dist/components/blog-post-card/primitives/blog-post-card-thumbnail.d.ts.map +1 -1
  58. package/dist/components/calendar/calendar.d.ts +13 -24
  59. package/dist/components/calendar/calendar.d.ts.map +1 -1
  60. package/dist/components/carousel/primitives/carousel-controls.d.ts.map +1 -1
  61. package/dist/components/carousel/primitives/carousel-root.d.ts +1 -3
  62. package/dist/components/carousel/primitives/carousel-root.d.ts.map +1 -1
  63. package/dist/components/carousel/primitives/carousel-scrollbar.d.ts.map +1 -1
  64. package/dist/components/category-card/category-card.d.ts +2 -4
  65. package/dist/components/category-card/category-card.d.ts.map +1 -1
  66. package/dist/components/category-card/primitives/category-card-fallback.d.ts.map +1 -1
  67. package/dist/components/category-card/primitives/category-card-icon.d.ts.map +1 -1
  68. package/dist/components/category-card/primitives/category-card-image.d.ts.map +1 -1
  69. package/dist/components/category-card/primitives/category-card-link.d.ts.map +1 -1
  70. package/dist/components/category-card/primitives/category-card-overlay.d.ts.map +1 -1
  71. package/dist/components/category-card/primitives/category-card-root.d.ts +2 -14
  72. package/dist/components/category-card/primitives/category-card-root.d.ts.map +1 -1
  73. package/dist/components/category-card/primitives/category-card-skeleton.d.ts.map +1 -1
  74. package/dist/components/category-card/primitives/category-card-thumbnail.d.ts.map +1 -1
  75. package/dist/components/category-card/primitives/category-card-title.d.ts.map +1 -1
  76. package/dist/components/category-card/primitives.d.ts +1 -1
  77. package/dist/components/category-card/primitives.d.ts.map +1 -1
  78. package/dist/components/price/price.d.ts +1 -1
  79. package/dist/components/price/price.d.ts.map +1 -1
  80. package/dist/components/price/primitives/price-root.d.ts +2 -4
  81. package/dist/components/price/primitives/price-root.d.ts.map +1 -1
  82. package/dist/components/product-card/primitives/product-card-checkbox.d.ts.map +1 -1
  83. package/dist/components/product-card/primitives/product-card-fallback.d.ts.map +1 -1
  84. package/dist/components/product-card/primitives/product-card-image.d.ts.map +1 -1
  85. package/dist/components/product-card/primitives/product-card-label.d.ts.map +1 -1
  86. package/dist/components/product-card/primitives/product-card-link.d.ts.map +1 -1
  87. package/dist/components/product-card/primitives/product-card-price.d.ts.map +1 -1
  88. package/dist/components/product-card/primitives/product-card-root.d.ts +2 -10
  89. package/dist/components/product-card/primitives/product-card-root.d.ts.map +1 -1
  90. package/dist/components/product-card/primitives/product-card-skeleton.d.ts.map +1 -1
  91. package/dist/components/product-card/primitives/product-card-subtitle.d.ts.map +1 -1
  92. package/dist/components/product-card/primitives/product-card-thumbnail.d.ts.map +1 -1
  93. package/dist/components/product-card/primitives/product-card-title.d.ts.map +1 -1
  94. package/dist/components/product-card/primitives.d.ts +1 -1
  95. package/dist/components/product-card/primitives.d.ts.map +1 -1
  96. package/dist/components/product-card/product-card.d.ts +2 -3
  97. package/dist/components/product-card/product-card.d.ts.map +1 -1
  98. package/dist/components/range-input/range-input.d.ts +0 -1
  99. package/dist/components/range-input/range-input.d.ts.map +1 -1
  100. package/dist/{dropdown-menu-node-CAwgTGIA.cjs → dropdown-menu-node-BDXDWc1l.cjs} +3 -3
  101. package/dist/{dropdown-menu-node-CAwgTGIA.cjs.map → dropdown-menu-node-BDXDWc1l.cjs.map} +1 -1
  102. package/dist/{dropdown-menu-node-x6qIrxA6.js → dropdown-menu-node-OJHgOERz.js} +2 -1
  103. package/dist/{dropdown-menu-node-x6qIrxA6.js.map → dropdown-menu-node-OJHgOERz.js.map} +1 -1
  104. package/dist/dropdown-menu.cjs +1 -1
  105. package/dist/dropdown-menu.js +1 -1
  106. package/dist/file-input.cjs +1 -1
  107. package/dist/file-input.js +1 -1
  108. package/dist/index.cjs +12 -7
  109. package/dist/index.cjs.map +1 -1
  110. package/dist/index.js +1525 -1417
  111. package/dist/index.js.map +1 -1
  112. package/dist/{price-strike-Ciakdz8c.js → price-strike-D9Pzzzkr.js} +9 -18
  113. package/dist/price-strike-D9Pzzzkr.js.map +1 -0
  114. package/dist/price-strike-DqOP577f.cjs +2 -0
  115. package/dist/price-strike-DqOP577f.cjs.map +1 -0
  116. package/dist/price.cjs +1 -1
  117. package/dist/price.js +1 -1
  118. package/dist/product-card-label-CP4yzMhB.js +244 -0
  119. package/dist/product-card-label-CP4yzMhB.js.map +1 -0
  120. package/dist/product-card-label-DHKOJFTo.cjs +2 -0
  121. package/dist/product-card-label-DHKOJFTo.cjs.map +1 -0
  122. package/dist/product-card-root-BnBOoYFY.js +27 -0
  123. package/dist/product-card-root-BnBOoYFY.js.map +1 -0
  124. package/dist/product-card-root-DNqlSx52.cjs +2 -0
  125. package/dist/product-card-root-DNqlSx52.cjs.map +1 -0
  126. package/dist/product-card-skeleton-BgN1OCwY.cjs +2 -0
  127. package/dist/product-card-skeleton-BgN1OCwY.cjs.map +1 -0
  128. package/dist/product-card-skeleton-C-xXJrKi.js +29 -0
  129. package/dist/product-card-skeleton-C-xXJrKi.js.map +1 -0
  130. package/dist/product-card.cjs +1 -1
  131. package/dist/product-card.js +19 -20
  132. package/dist/{reveal-trigger-ScuufoFq.js → reveal-trigger-DT_deyzM.js} +2 -2
  133. package/dist/{reveal-trigger-ScuufoFq.js.map → reveal-trigger-DT_deyzM.js.map} +1 -1
  134. package/dist/{reveal-trigger-CCTnO9e2.cjs → reveal-trigger-ntEvLci1.cjs} +2 -2
  135. package/dist/{reveal-trigger-CCTnO9e2.cjs.map → reveal-trigger-ntEvLci1.cjs.map} +1 -1
  136. package/dist/reveal.cjs +1 -1
  137. package/dist/reveal.js +1 -1
  138. package/package.json +1 -1
  139. package/dist/accordion-trigger-Bj1Laf6l.cjs +0 -2
  140. package/dist/accordion-trigger-Bj1Laf6l.cjs.map +0 -1
  141. package/dist/accordion-trigger-Cdkd0tWD.js +0 -494
  142. package/dist/accordion-trigger-Cdkd0tWD.js.map +0 -1
  143. package/dist/blog-post-card-author-B55DKFff.cjs +0 -2
  144. package/dist/blog-post-card-author-B55DKFff.cjs.map +0 -1
  145. package/dist/blog-post-card-author-C1GuND4f.js.map +0 -1
  146. package/dist/button-W0_PtryU.js.map +0 -1
  147. package/dist/button-ibzOCImJ.cjs +0 -7
  148. package/dist/button-ibzOCImJ.cjs.map +0 -1
  149. package/dist/carousel-next-BGIZglEF.cjs +0 -2
  150. package/dist/carousel-next-BzKOs3K-.js +0 -1495
  151. package/dist/carousel-next-BzKOs3K-.js.map +0 -1
  152. package/dist/category-card-link-BSmQDScF.cjs +0 -2
  153. package/dist/category-card-link-BSmQDScF.cjs.map +0 -1
  154. package/dist/category-card-link-mgtggmo_.js +0 -211
  155. package/dist/category-card-link-mgtggmo_.js.map +0 -1
  156. package/dist/chevron-down-BDpc8q6H.cjs +0 -7
  157. package/dist/chevron-down-BDpc8q6H.cjs.map +0 -1
  158. package/dist/chevron-down-CjW8zgR8.js +0 -13
  159. package/dist/chevron-down-CjW8zgR8.js.map +0 -1
  160. package/dist/price-strike-BTE4S5Na.cjs +0 -2
  161. package/dist/price-strike-BTE4S5Na.cjs.map +0 -1
  162. package/dist/price-strike-Ciakdz8c.js.map +0 -1
  163. package/dist/product-card-label-BQeJxNcX.cjs +0 -2
  164. package/dist/product-card-label-BQeJxNcX.cjs.map +0 -1
  165. package/dist/product-card-label-C6D-fYjj.js +0 -285
  166. package/dist/product-card-label-C6D-fYjj.js.map +0 -1
  167. package/dist/product-card-root-BGUa-vQ_.js +0 -43
  168. package/dist/product-card-root-BGUa-vQ_.js.map +0 -1
  169. package/dist/product-card-root-Q5lwSPd8.cjs +0 -2
  170. package/dist/product-card-root-Q5lwSPd8.cjs.map +0 -1
  171. package/dist/product-card-skeleton-B8DGleVJ.js +0 -33
  172. package/dist/product-card-skeleton-B8DGleVJ.js.map +0 -1
  173. package/dist/product-card-skeleton-CCbWpq16.cjs +0 -2
  174. package/dist/product-card-skeleton-CCbWpq16.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"reveal-trigger-ScuufoFq.js","sources":["../src/components/animated-underline/animated-underline.tsx","../src/components/reveal/primitives/reveal-root.tsx","../src/components/reveal/primitives/reveal-viewport.tsx","../src/components/reveal/primitives/reveal-controls.tsx","../src/components/reveal/primitives/reveal-trigger.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type AnimatedUnderlineProps = ComponentProps<'span'> & {\n children: string;\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --animated-underline-hover: hsl(var(--primary));\n * --animated-underline-text: hsl(var(--foreground));\n * --animated-underline-font-family: var(--font-family-body);\n * }\n * ```\n */\nexport function AnimatedUnderline({ className, children, ...props }: AnimatedUnderlineProps) {\n return (\n <span\n className={cn(\n 'origin-left font-semibold leading-normal text-[var(--animated-underline-text,hsl(var(--foreground)))] transition-[background-size] duration-300 [background:linear-gradient(0deg,var(--animated-underline-hover,hsl(var(--primary))),var(--animated-underline-hover,hsl(var(--primary))))_no-repeat_left_bottom_/_0_2px] [font-family:var(--animated-underline-font-family,var(--font-family-body))] hover:bg-[size:100%_2px] group-focus/underline:bg-[size:100%_2px]',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n","'use client';\n\nimport { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport { cn } from '@/lib';\n\ninterface RevealContext {\n isOpen: boolean;\n hasOverflow: boolean;\n variant: 'underline' | 'button';\n showLabel: string;\n hideLabel: string;\n maxHeight: number;\n contentRef: RefObject<HTMLDivElement | null>;\n toggleOpen: () => void;\n}\n\nconst RevealContext = createContext<RevealContext | undefined>(undefined);\n\nexport interface RevealRootProps extends ComponentProps<'div'> {\n variant?: 'underline' | 'button';\n showLabel?: string;\n hideLabel?: string;\n defaultOpen?: boolean;\n maxHeight?: number;\n children: ReactNode;\n}\n\nexport function RevealRoot({\n children,\n className,\n variant = 'underline',\n showLabel = 'Show more',\n hideLabel = 'Show less',\n defaultOpen = false,\n maxHeight = 160,\n ...props\n}: RevealRootProps) {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const [hasOverflow, setHasOverflow] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function checkHeight() {\n if (contentRef.current) {\n const contentHeight = contentRef.current.scrollHeight;\n\n setHasOverflow(contentHeight > maxHeight);\n }\n }\n\n checkHeight();\n\n const resizeObserver = new ResizeObserver(checkHeight);\n\n if (contentRef.current) {\n resizeObserver.observe(contentRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [maxHeight]);\n\n const toggleOpen = useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n const contextValues = useMemo(\n () => ({\n isOpen,\n hasOverflow,\n variant,\n showLabel,\n hideLabel,\n maxHeight,\n contentRef,\n toggleOpen,\n }),\n [isOpen, hasOverflow, variant, showLabel, hideLabel, maxHeight, toggleOpen],\n );\n\n return (\n <RevealContext.Provider value={contextValues}>\n <div className={cn('relative', className)} {...props}>\n {children}\n </div>\n </RevealContext.Provider>\n );\n}\n\nexport function useReveal() {\n const context = use(RevealContext);\n\n if (context === undefined) {\n throw new Error('useReveal must be used within a RevealRoot');\n }\n\n return context;\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nexport type RevealViewportProps = ComponentProps<'div'>;\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport function RevealViewport({ children, className, ...props }: RevealViewportProps) {\n const { hasOverflow, isOpen, maxHeight, contentRef } = useReveal();\n\n return (\n <div\n className={cn(\n hasOverflow &&\n !isOpen &&\n '[mask-image:linear-gradient(to_top,transparent,black_50px,black_calc(100%-50px))]',\n 'overflow-hidden',\n className,\n )}\n ref={contentRef}\n style={{ maxHeight: isOpen ? 'none' : maxHeight }}\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealControlsProps = ComponentProps<'div'>;\n\nexport function RevealControls({ children, className, ...props }: RevealControlsProps) {\n const { hasOverflow } = useReveal();\n\n if (!hasOverflow) return null;\n\n return (\n <div className={cn('flex w-full items-end pt-4', className)} {...props}>\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { AnimatedUnderline } from '@/components/animated-underline';\nimport { Button } from '@/components/button';\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealTriggerProps = ComponentProps<'button'>;\n\nexport function RevealTrigger({ children, className, ...props }: RevealTriggerProps) {\n const { variant, showLabel, hideLabel, isOpen, toggleOpen } = useReveal();\n\n return (\n <>\n {variant === 'underline' && (\n <button\n className={cn('group/underline text-sm focus:outline-none', className)}\n onClick={() => toggleOpen()}\n type=\"button\"\n {...props}\n >\n <AnimatedUnderline>{isOpen ? hideLabel : showLabel}</AnimatedUnderline>\n </button>\n )}\n {variant === 'button' && (\n <Button\n className={className}\n onClick={() => toggleOpen()}\n size=\"x-small\"\n type=\"button\"\n variant=\"outline\"\n {...props}\n >\n {isOpen ? hideLabel : showLabel}\n </Button>\n )}\n </>\n );\n}\n"],"names":["AnimatedUnderline","className","children","props","jsx","cn","RevealContext","createContext","RevealRoot","variant","showLabel","hideLabel","defaultOpen","maxHeight","isOpen","setIsOpen","useState","hasOverflow","setHasOverflow","contentRef","useRef","useEffect","checkHeight","contentHeight","resizeObserver","toggleOpen","useCallback","prev","contextValues","useMemo","useReveal","context","use","RevealViewport","RevealControls","RevealTrigger","jsxs","Fragment","Button"],"mappings":";;;;AAoBO,SAASA,EAAkB,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAiC;AAC3F,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;ACdA,MAAMI,IAAgBC,EAAyC,MAAS;AAWjE,SAASC,EAAW;AAAA,EACzB,UAAAN;AAAA,EACA,WAAAD;AAAA,EACA,SAAAQ,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,aAAAC,IAAc;AAAA,EACd,WAAAC,IAAY;AAAA,EACZ,GAAGV;AACL,GAAoB;AAClB,QAAM,CAACW,GAA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AAA;AAAA,IAAA;AAAA,EACxB,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"reveal-trigger-DT_deyzM.js","sources":["../src/components/animated-underline/animated-underline.tsx","../src/components/reveal/primitives/reveal-root.tsx","../src/components/reveal/primitives/reveal-viewport.tsx","../src/components/reveal/primitives/reveal-controls.tsx","../src/components/reveal/primitives/reveal-trigger.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type AnimatedUnderlineProps = ComponentProps<'span'> & {\n children: string;\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --animated-underline-hover: hsl(var(--primary));\n * --animated-underline-text: hsl(var(--foreground));\n * --animated-underline-font-family: var(--font-family-body);\n * }\n * ```\n */\nexport function AnimatedUnderline({ className, children, ...props }: AnimatedUnderlineProps) {\n return (\n <span\n className={cn(\n 'origin-left font-semibold leading-normal text-[var(--animated-underline-text,hsl(var(--foreground)))] transition-[background-size] duration-300 [background:linear-gradient(0deg,var(--animated-underline-hover,hsl(var(--primary))),var(--animated-underline-hover,hsl(var(--primary))))_no-repeat_left_bottom_/_0_2px] [font-family:var(--animated-underline-font-family,var(--font-family-body))] hover:bg-[size:100%_2px] group-focus/underline:bg-[size:100%_2px]',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n","'use client';\n\nimport { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport { cn } from '@/lib';\n\ninterface RevealContext {\n isOpen: boolean;\n hasOverflow: boolean;\n variant: 'underline' | 'button';\n showLabel: string;\n hideLabel: string;\n maxHeight: number;\n contentRef: RefObject<HTMLDivElement | null>;\n toggleOpen: () => void;\n}\n\nconst RevealContext = createContext<RevealContext | undefined>(undefined);\n\nexport interface RevealRootProps extends ComponentProps<'div'> {\n variant?: 'underline' | 'button';\n showLabel?: string;\n hideLabel?: string;\n defaultOpen?: boolean;\n maxHeight?: number;\n children: ReactNode;\n}\n\nexport function RevealRoot({\n children,\n className,\n variant = 'underline',\n showLabel = 'Show more',\n hideLabel = 'Show less',\n defaultOpen = false,\n maxHeight = 160,\n ...props\n}: RevealRootProps) {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const [hasOverflow, setHasOverflow] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function checkHeight() {\n if (contentRef.current) {\n const contentHeight = contentRef.current.scrollHeight;\n\n setHasOverflow(contentHeight > maxHeight);\n }\n }\n\n checkHeight();\n\n const resizeObserver = new ResizeObserver(checkHeight);\n\n if (contentRef.current) {\n resizeObserver.observe(contentRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [maxHeight]);\n\n const toggleOpen = useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n const contextValues = useMemo(\n () => ({\n isOpen,\n hasOverflow,\n variant,\n showLabel,\n hideLabel,\n maxHeight,\n contentRef,\n toggleOpen,\n }),\n [isOpen, hasOverflow, variant, showLabel, hideLabel, maxHeight, toggleOpen],\n );\n\n return (\n <RevealContext.Provider value={contextValues}>\n <div className={cn('relative', className)} {...props}>\n {children}\n </div>\n </RevealContext.Provider>\n );\n}\n\nexport function useReveal() {\n const context = use(RevealContext);\n\n if (context === undefined) {\n throw new Error('useReveal must be used within a RevealRoot');\n }\n\n return context;\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nexport type RevealViewportProps = ComponentProps<'div'>;\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport function RevealViewport({ children, className, ...props }: RevealViewportProps) {\n const { hasOverflow, isOpen, maxHeight, contentRef } = useReveal();\n\n return (\n <div\n className={cn(\n hasOverflow &&\n !isOpen &&\n '[mask-image:linear-gradient(to_top,transparent,black_50px,black_calc(100%-50px))]',\n 'overflow-hidden',\n className,\n )}\n ref={contentRef}\n style={{ maxHeight: isOpen ? 'none' : maxHeight }}\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealControlsProps = ComponentProps<'div'>;\n\nexport function RevealControls({ children, className, ...props }: RevealControlsProps) {\n const { hasOverflow } = useReveal();\n\n if (!hasOverflow) return null;\n\n return (\n <div className={cn('flex w-full items-end pt-4', className)} {...props}>\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { AnimatedUnderline } from '@/components/animated-underline';\nimport { Button } from '@/components/button';\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealTriggerProps = ComponentProps<'button'>;\n\nexport function RevealTrigger({ children, className, ...props }: RevealTriggerProps) {\n const { variant, showLabel, hideLabel, isOpen, toggleOpen } = useReveal();\n\n return (\n <>\n {variant === 'underline' && (\n <button\n className={cn('group/underline text-sm focus:outline-none', className)}\n onClick={() => toggleOpen()}\n type=\"button\"\n {...props}\n >\n <AnimatedUnderline>{isOpen ? hideLabel : showLabel}</AnimatedUnderline>\n </button>\n )}\n {variant === 'button' && (\n <Button\n className={className}\n onClick={() => toggleOpen()}\n size=\"x-small\"\n type=\"button\"\n variant=\"outline\"\n {...props}\n >\n {isOpen ? hideLabel : showLabel}\n </Button>\n )}\n </>\n );\n}\n"],"names":["AnimatedUnderline","className","children","props","jsx","cn","RevealContext","createContext","RevealRoot","variant","showLabel","hideLabel","defaultOpen","maxHeight","isOpen","setIsOpen","useState","hasOverflow","setHasOverflow","contentRef","useRef","useEffect","checkHeight","contentHeight","resizeObserver","toggleOpen","useCallback","prev","contextValues","useMemo","useReveal","context","use","RevealViewport","RevealControls","RevealTrigger","jsxs","Fragment","Button"],"mappings":";;;;AAoBO,SAASA,EAAkB,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAiC;AAC3F,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW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AAS,MAAMwB,EAAA;AAAA,QACf,MAAK;AAAA,QACJ,GAAGtB;AAAA,QAEJ,UAAA,gBAAAC,EAACJ,GAAA,EAAmB,UAAAc,IAASH,IAAYD,EAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAGtDD,MAAY,YACX,gBAAAL;AAAA,MAACkC;AAAA,MAAA;AAAA,QACC,WAAArC;AAAA,QACA,SAAS,MAAMwB,EAAA;AAAA,QACf,MAAK;AAAA,QACL,MAAK;AAAA,QACL,SAAQ;AAAA,QACP,GAAGtB;AAAA,QAEH,cAASQ,IAAYD;AAAA,MAAA;AAAA,IAAA;AAAA,EACxB,GAEJ;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("react/jsx-runtime"),u=require("./utils-DoxiiusW.cjs"),j=require("./button-ibzOCImJ.cjs"),l=require("react");function p({className:e,children:t,...n}){return r.jsx("span",{className:u.cn("origin-left font-semibold leading-normal text-[var(--animated-underline-text,hsl(var(--foreground)))] transition-[background-size] duration-300 [background:linear-gradient(0deg,var(--animated-underline-hover,hsl(var(--primary))),var(--animated-underline-hover,hsl(var(--primary))))_no-repeat_left_bottom_/_0_2px] [font-family:var(--animated-underline-font-family,var(--font-family-body))] hover:bg-[size:100%_2px] group-focus/underline:bg-[size:100%_2px]",e),...n,children:t})}const R=l.createContext(void 0);function k({children:e,className:t,variant:n="underline",showLabel:o="Show more",hideLabel:s="Show less",defaultOpen:a=!1,maxHeight:i=160,...d}){const[m,b]=l.useState(a),[g,w]=l.useState(!0),c=l.useRef(null);l.useEffect(()=>{function v(){if(c.current){const _=c.current.scrollHeight;w(_>i)}}v();const x=new ResizeObserver(v);return c.current&&x.observe(c.current),()=>{x.disconnect()}},[i]);const h=l.useCallback(()=>{b(v=>!v)},[]),O=l.useMemo(()=>({isOpen:m,hasOverflow:g,variant:n,showLabel:o,hideLabel:s,maxHeight:i,contentRef:c,toggleOpen:h}),[m,g,n,o,s,i,h]);return r.jsx(R.Provider,{value:O,children:r.jsx("div",{className:u.cn("relative",t),...d,children:e})})}function f(){const e=l.use(R);if(e===void 0)throw new Error("useReveal must be used within a RevealRoot");return e}function y({children:e,className:t,...n}){const{hasOverflow:o,isOpen:s,maxHeight:a,contentRef:i}=f();return r.jsx("div",{className:u.cn(o&&!s&&"[mask-image:linear-gradient(to_top,transparent,black_50px,black_calc(100%-50px))]","overflow-hidden",t),ref:i,style:{maxHeight:s?"none":a},...n,children:e})}function C({children:e,className:t,...n}){const{hasOverflow:o}=f();return o?r.jsx("div",{className:u.cn("flex w-full items-end pt-4",t),...n,children:e}):null}function z({children:e,className:t,...n}){const{variant:o,showLabel:s,hideLabel:a,isOpen:i,toggleOpen:d}=f();return r.jsxs(r.Fragment,{children:[o==="underline"&&r.jsx("button",{className:u.cn("group/underline text-sm focus:outline-none",t),onClick:()=>d(),type:"button",...n,children:r.jsx(p,{children:i?a:s})}),o==="button"&&r.jsx(j.Button,{className:t,onClick:()=>d(),size:"x-small",type:"button",variant:"outline",...n,children:i?a:s})]})}exports.AnimatedUnderline=p;exports.RevealControls=C;exports.RevealRoot=k;exports.RevealTrigger=z;exports.RevealViewport=y;exports.useReveal=f;
2
- //# sourceMappingURL=reveal-trigger-CCTnO9e2.cjs.map
1
+ "use strict";const r=require("react/jsx-runtime"),u=require("./utils-DoxiiusW.cjs"),j=require("./button-BgvMm9T3.cjs"),l=require("react");function p({className:e,children:t,...n}){return r.jsx("span",{className:u.cn("origin-left font-semibold leading-normal text-[var(--animated-underline-text,hsl(var(--foreground)))] transition-[background-size] duration-300 [background:linear-gradient(0deg,var(--animated-underline-hover,hsl(var(--primary))),var(--animated-underline-hover,hsl(var(--primary))))_no-repeat_left_bottom_/_0_2px] [font-family:var(--animated-underline-font-family,var(--font-family-body))] hover:bg-[size:100%_2px] group-focus/underline:bg-[size:100%_2px]",e),...n,children:t})}const R=l.createContext(void 0);function k({children:e,className:t,variant:n="underline",showLabel:o="Show more",hideLabel:s="Show less",defaultOpen:a=!1,maxHeight:i=160,...d}){const[m,b]=l.useState(a),[g,w]=l.useState(!0),c=l.useRef(null);l.useEffect(()=>{function v(){if(c.current){const _=c.current.scrollHeight;w(_>i)}}v();const x=new ResizeObserver(v);return c.current&&x.observe(c.current),()=>{x.disconnect()}},[i]);const h=l.useCallback(()=>{b(v=>!v)},[]),O=l.useMemo(()=>({isOpen:m,hasOverflow:g,variant:n,showLabel:o,hideLabel:s,maxHeight:i,contentRef:c,toggleOpen:h}),[m,g,n,o,s,i,h]);return r.jsx(R.Provider,{value:O,children:r.jsx("div",{className:u.cn("relative",t),...d,children:e})})}function f(){const e=l.use(R);if(e===void 0)throw new Error("useReveal must be used within a RevealRoot");return e}function y({children:e,className:t,...n}){const{hasOverflow:o,isOpen:s,maxHeight:a,contentRef:i}=f();return r.jsx("div",{className:u.cn(o&&!s&&"[mask-image:linear-gradient(to_top,transparent,black_50px,black_calc(100%-50px))]","overflow-hidden",t),ref:i,style:{maxHeight:s?"none":a},...n,children:e})}function C({children:e,className:t,...n}){const{hasOverflow:o}=f();return o?r.jsx("div",{className:u.cn("flex w-full items-end pt-4",t),...n,children:e}):null}function z({children:e,className:t,...n}){const{variant:o,showLabel:s,hideLabel:a,isOpen:i,toggleOpen:d}=f();return r.jsxs(r.Fragment,{children:[o==="underline"&&r.jsx("button",{className:u.cn("group/underline text-sm focus:outline-none",t),onClick:()=>d(),type:"button",...n,children:r.jsx(p,{children:i?a:s})}),o==="button"&&r.jsx(j.Button,{className:t,onClick:()=>d(),size:"x-small",type:"button",variant:"outline",...n,children:i?a:s})]})}exports.AnimatedUnderline=p;exports.RevealControls=C;exports.RevealRoot=k;exports.RevealTrigger=z;exports.RevealViewport=y;exports.useReveal=f;
2
+ //# sourceMappingURL=reveal-trigger-ntEvLci1.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"reveal-trigger-CCTnO9e2.cjs","sources":["../src/components/animated-underline/animated-underline.tsx","../src/components/reveal/primitives/reveal-root.tsx","../src/components/reveal/primitives/reveal-viewport.tsx","../src/components/reveal/primitives/reveal-controls.tsx","../src/components/reveal/primitives/reveal-trigger.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type AnimatedUnderlineProps = ComponentProps<'span'> & {\n children: string;\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --animated-underline-hover: hsl(var(--primary));\n * --animated-underline-text: hsl(var(--foreground));\n * --animated-underline-font-family: var(--font-family-body);\n * }\n * ```\n */\nexport function AnimatedUnderline({ className, children, ...props }: AnimatedUnderlineProps) {\n return (\n <span\n className={cn(\n 'origin-left font-semibold leading-normal text-[var(--animated-underline-text,hsl(var(--foreground)))] transition-[background-size] duration-300 [background:linear-gradient(0deg,var(--animated-underline-hover,hsl(var(--primary))),var(--animated-underline-hover,hsl(var(--primary))))_no-repeat_left_bottom_/_0_2px] [font-family:var(--animated-underline-font-family,var(--font-family-body))] hover:bg-[size:100%_2px] group-focus/underline:bg-[size:100%_2px]',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n","'use client';\n\nimport { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport { cn } from '@/lib';\n\ninterface RevealContext {\n isOpen: boolean;\n hasOverflow: boolean;\n variant: 'underline' | 'button';\n showLabel: string;\n hideLabel: string;\n maxHeight: number;\n contentRef: RefObject<HTMLDivElement | null>;\n toggleOpen: () => void;\n}\n\nconst RevealContext = createContext<RevealContext | undefined>(undefined);\n\nexport interface RevealRootProps extends ComponentProps<'div'> {\n variant?: 'underline' | 'button';\n showLabel?: string;\n hideLabel?: string;\n defaultOpen?: boolean;\n maxHeight?: number;\n children: ReactNode;\n}\n\nexport function RevealRoot({\n children,\n className,\n variant = 'underline',\n showLabel = 'Show more',\n hideLabel = 'Show less',\n defaultOpen = false,\n maxHeight = 160,\n ...props\n}: RevealRootProps) {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const [hasOverflow, setHasOverflow] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function checkHeight() {\n if (contentRef.current) {\n const contentHeight = contentRef.current.scrollHeight;\n\n setHasOverflow(contentHeight > maxHeight);\n }\n }\n\n checkHeight();\n\n const resizeObserver = new ResizeObserver(checkHeight);\n\n if (contentRef.current) {\n resizeObserver.observe(contentRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [maxHeight]);\n\n const toggleOpen = useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n const contextValues = useMemo(\n () => ({\n isOpen,\n hasOverflow,\n variant,\n showLabel,\n hideLabel,\n maxHeight,\n contentRef,\n toggleOpen,\n }),\n [isOpen, hasOverflow, variant, showLabel, hideLabel, maxHeight, toggleOpen],\n );\n\n return (\n <RevealContext.Provider value={contextValues}>\n <div className={cn('relative', className)} {...props}>\n {children}\n </div>\n </RevealContext.Provider>\n );\n}\n\nexport function useReveal() {\n const context = use(RevealContext);\n\n if (context === undefined) {\n throw new Error('useReveal must be used within a RevealRoot');\n }\n\n return context;\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nexport type RevealViewportProps = ComponentProps<'div'>;\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport function RevealViewport({ children, className, ...props }: RevealViewportProps) {\n const { hasOverflow, isOpen, maxHeight, contentRef } = useReveal();\n\n return (\n <div\n className={cn(\n hasOverflow &&\n !isOpen &&\n '[mask-image:linear-gradient(to_top,transparent,black_50px,black_calc(100%-50px))]',\n 'overflow-hidden',\n className,\n )}\n ref={contentRef}\n style={{ maxHeight: isOpen ? 'none' : maxHeight }}\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealControlsProps = ComponentProps<'div'>;\n\nexport function RevealControls({ children, className, ...props }: RevealControlsProps) {\n const { hasOverflow } = useReveal();\n\n if (!hasOverflow) return null;\n\n return (\n <div className={cn('flex w-full items-end pt-4', className)} {...props}>\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { AnimatedUnderline } from '@/components/animated-underline';\nimport { Button } from '@/components/button';\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealTriggerProps = ComponentProps<'button'>;\n\nexport function RevealTrigger({ children, className, ...props }: RevealTriggerProps) {\n const { variant, showLabel, hideLabel, isOpen, toggleOpen } = useReveal();\n\n return (\n <>\n {variant === 'underline' && (\n <button\n className={cn('group/underline text-sm focus:outline-none', className)}\n onClick={() => toggleOpen()}\n type=\"button\"\n {...props}\n >\n <AnimatedUnderline>{isOpen ? hideLabel : showLabel}</AnimatedUnderline>\n </button>\n )}\n {variant === 'button' && (\n <Button\n className={className}\n onClick={() => toggleOpen()}\n size=\"x-small\"\n type=\"button\"\n variant=\"outline\"\n {...props}\n >\n {isOpen ? hideLabel : showLabel}\n </Button>\n )}\n </>\n );\n}\n"],"names":["AnimatedUnderline","className","children","props","jsx","cn","RevealContext","createContext","RevealRoot","variant","showLabel","hideLabel","defaultOpen","maxHeight","isOpen","setIsOpen","useState","hasOverflow","setHasOverflow","contentRef","useRef","useEffect","checkHeight","contentHeight","resizeObserver","toggleOpen","useCallback","prev","contextValues","useMemo","useReveal","context","use","RevealViewport","RevealControls","RevealTrigger","jsxs","Fragment","Button"],"mappings":"0IAoBO,SAASA,EAAkB,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,GAAiC,CAC3F,OACEC,EAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,GACT,ycACAJ,CAAA,EAED,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP,CCdA,MAAMI,EAAgBC,EAAAA,cAAyC,MAAS,EAWjE,SAASC,EAAW,CACzB,SAAAN,EACA,UAAAD,EACA,QAAAQ,EAAU,YACV,UAAAC,E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c,EAAa,OAAAH,EAAQ,UAAAD,EAAW,WAAAM,CAAA,EAAeW,EAAA,EAEvD,OACE1B,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GACTY,GACE,CAACH,GACD,oFACF,kBACAb,CAAA,EAEF,IAAKkB,EACL,MAAO,CAAE,UAAWL,EAAS,OAASD,CAAA,EACrC,GAAGV,EAEH,SAAAD,CAAA,CAAA,CAGP,CCnBO,SAASgC,EAAe,CAAE,SAAAhC,EAAU,UAAAD,EAAW,GAAGE,GAA8B,CACrF,KAAM,CAAE,YAAAc,CAAA,EAAgBa,EAAA,EAExB,OAAKb,EAGHb,MAAC,OAAI,UAAWC,EAAAA,GAAG,6BAA8BJ,CAAS,EAAI,GAAGE,EAC9D,SAAAD,EACH,EALuB,IAO3B,CCRO,SAASiC,EAAc,CAAE,SAAAjC,EAAU,UAAAD,EAAW,GAAGE,GAA6B,CACnF,KAAM,CAAE,QAAAM,EAAS,UAAAC,EAAW,UAAAC,EAAW,OAAAG,EAAQ,WAAAW,CAAA,EAAeK,EAAA,EAE9D,OACEM,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAA5B,IAAY,aACXL,EAAAA,IAAC,SAAA,CACC,UAAWC,EAAAA,GAAG,6CAA8CJ,CAAS,EACrE,QAAS,IAAMwB,EAAA,EACf,KAAK,SACJ,GAAGtB,EAEJ,SAAAC,EAAAA,IAACJ,EAAA,CAAmB,SAAAc,EAASH,EAAYD,CAAA,CAAU,CAAA,CAAA,EAGtDD,IAAY,UACXL,EAAAA,IAACkC,EAAAA,OAAA,CACC,UAAArC,EACA,QAAS,IAAMwB,EAAA,EACf,KAAK,UACL,KAAK,SACL,QAAQ,UACP,GAAGtB,EAEH,WAASQ,EAAYD,CAAA,CAAA,CACxB,EAEJ,CAEJ"}
1
+ {"version":3,"file":"reveal-trigger-ntEvLci1.cjs","sources":["../src/components/animated-underline/animated-underline.tsx","../src/components/reveal/primitives/reveal-root.tsx","../src/components/reveal/primitives/reveal-viewport.tsx","../src/components/reveal/primitives/reveal-controls.tsx","../src/components/reveal/primitives/reveal-trigger.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type AnimatedUnderlineProps = ComponentProps<'span'> & {\n children: string;\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --animated-underline-hover: hsl(var(--primary));\n * --animated-underline-text: hsl(var(--foreground));\n * --animated-underline-font-family: var(--font-family-body);\n * }\n * ```\n */\nexport function AnimatedUnderline({ className, children, ...props }: AnimatedUnderlineProps) {\n return (\n <span\n className={cn(\n 'origin-left font-semibold leading-normal text-[var(--animated-underline-text,hsl(var(--foreground)))] transition-[background-size] duration-300 [background:linear-gradient(0deg,var(--animated-underline-hover,hsl(var(--primary))),var(--animated-underline-hover,hsl(var(--primary))))_no-repeat_left_bottom_/_0_2px] [font-family:var(--animated-underline-font-family,var(--font-family-body))] hover:bg-[size:100%_2px] group-focus/underline:bg-[size:100%_2px]',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n","'use client';\n\nimport { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport { cn } from '@/lib';\n\ninterface RevealContext {\n isOpen: boolean;\n hasOverflow: boolean;\n variant: 'underline' | 'button';\n showLabel: string;\n hideLabel: string;\n maxHeight: number;\n contentRef: RefObject<HTMLDivElement | null>;\n toggleOpen: () => void;\n}\n\nconst RevealContext = createContext<RevealContext | undefined>(undefined);\n\nexport interface RevealRootProps extends ComponentProps<'div'> {\n variant?: 'underline' | 'button';\n showLabel?: string;\n hideLabel?: string;\n defaultOpen?: boolean;\n maxHeight?: number;\n children: ReactNode;\n}\n\nexport function RevealRoot({\n children,\n className,\n variant = 'underline',\n showLabel = 'Show more',\n hideLabel = 'Show less',\n defaultOpen = false,\n maxHeight = 160,\n ...props\n}: RevealRootProps) {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const [hasOverflow, setHasOverflow] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function checkHeight() {\n if (contentRef.current) {\n const contentHeight = contentRef.current.scrollHeight;\n\n setHasOverflow(contentHeight > maxHeight);\n }\n }\n\n checkHeight();\n\n const resizeObserver = new ResizeObserver(checkHeight);\n\n if (contentRef.current) {\n resizeObserver.observe(contentRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [maxHeight]);\n\n const toggleOpen = useCallback(() => {\n setIsOpen((prev) => !prev);\n }, []);\n\n const contextValues = useMemo(\n () => ({\n isOpen,\n hasOverflow,\n variant,\n showLabel,\n hideLabel,\n maxHeight,\n contentRef,\n toggleOpen,\n }),\n [isOpen, hasOverflow, variant, showLabel, hideLabel, maxHeight, toggleOpen],\n );\n\n return (\n <RevealContext.Provider value={contextValues}>\n <div className={cn('relative', className)} {...props}>\n {children}\n </div>\n </RevealContext.Provider>\n );\n}\n\nexport function useReveal() {\n const context = use(RevealContext);\n\n if (context === undefined) {\n throw new Error('useReveal must be used within a RevealRoot');\n }\n\n return context;\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nexport type RevealViewportProps = ComponentProps<'div'>;\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport function RevealViewport({ children, className, ...props }: RevealViewportProps) {\n const { hasOverflow, isOpen, maxHeight, contentRef } = useReveal();\n\n return (\n <div\n className={cn(\n hasOverflow &&\n !isOpen &&\n '[mask-image:linear-gradient(to_top,transparent,black_50px,black_calc(100%-50px))]',\n 'overflow-hidden',\n className,\n )}\n ref={contentRef}\n style={{ maxHeight: isOpen ? 'none' : maxHeight }}\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealControlsProps = ComponentProps<'div'>;\n\nexport function RevealControls({ children, className, ...props }: RevealControlsProps) {\n const { hasOverflow } = useReveal();\n\n if (!hasOverflow) return null;\n\n return (\n <div className={cn('flex w-full items-end pt-4', className)} {...props}>\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { AnimatedUnderline } from '@/components/animated-underline';\nimport { Button } from '@/components/button';\nimport { useReveal } from '@/components/reveal';\nimport { cn } from '@/lib';\n\nexport type RevealTriggerProps = ComponentProps<'button'>;\n\nexport function RevealTrigger({ children, className, ...props }: RevealTriggerProps) {\n const { variant, showLabel, hideLabel, isOpen, toggleOpen } = useReveal();\n\n return (\n <>\n {variant === 'underline' && (\n <button\n className={cn('group/underline text-sm focus:outline-none', className)}\n onClick={() => toggleOpen()}\n type=\"button\"\n {...props}\n >\n <AnimatedUnderline>{isOpen ? hideLabel : showLabel}</AnimatedUnderline>\n </button>\n )}\n {variant === 'button' && (\n <Button\n className={className}\n onClick={() => toggleOpen()}\n size=\"x-small\"\n type=\"button\"\n variant=\"outline\"\n {...props}\n >\n {isOpen ? hideLabel : showLabel}\n </Button>\n )}\n </>\n );\n}\n"],"names":["AnimatedUnderline","className","children","props","jsx","cn","RevealContext","createContext","RevealRoot","variant","showLabel","hideLabel","defaultOpen","maxHeight","isOpen","setIsOpen","useState","hasOverflow","setHasOverflow","contentRef","useRef","useEffect","checkHeight","contentHeight","resizeObserver","toggleOpen","useCallback","prev","contextValues","useMemo","useReveal","context","use","RevealViewport","RevealControls","RevealTrigger","jsxs","Fragment","Button"],"mappings":"0IAoBO,SAASA,EAAkB,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,GAAiC,CAC3F,OACEC,EAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,GACT,ycACAJ,CAAA,EAED,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP,CCdA,MAAMI,EAAgBC,EAAAA,cAAyC,MAAS,EAWjE,SAASC,EAAW,CACzB,SAAAN,EACA,UAAAD,EACA,QAAAQ,EAAU,YACV,UAAAC,E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c,EAAa,OAAAH,EAAQ,UAAAD,EAAW,WAAAM,CAAA,EAAeW,EAAA,EAEvD,OACE1B,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GACTY,GACE,CAACH,GACD,oFACF,kBACAb,CAAA,EAEF,IAAKkB,EACL,MAAO,CAAE,UAAWL,EAAS,OAASD,CAAA,EACrC,GAAGV,EAEH,SAAAD,CAAA,CAAA,CAGP,CCnBO,SAASgC,EAAe,CAAE,SAAAhC,EAAU,UAAAD,EAAW,GAAGE,GAA8B,CACrF,KAAM,CAAE,YAAAc,CAAA,EAAgBa,EAAA,EAExB,OAAKb,EAGHb,MAAC,OAAI,UAAWC,EAAAA,GAAG,6BAA8BJ,CAAS,EAAI,GAAGE,EAC9D,SAAAD,EACH,EALuB,IAO3B,CCRO,SAASiC,EAAc,CAAE,SAAAjC,EAAU,UAAAD,EAAW,GAAGE,GAA6B,CACnF,KAAM,CAAE,QAAAM,EAAS,UAAAC,EAAW,UAAAC,EAAW,OAAAG,EAAQ,WAAAW,CAAA,EAAeK,EAAA,EAE9D,OACEM,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAA5B,IAAY,aACXL,EAAAA,IAAC,SAAA,CACC,UAAWC,EAAAA,GAAG,6CAA8CJ,CAAS,EACrE,QAAS,IAAMwB,EAAA,EACf,KAAK,SACJ,GAAGtB,EAEJ,SAAAC,EAAAA,IAACJ,EAAA,CAAmB,SAAAc,EAASH,EAAYD,CAAA,CAAU,CAAA,CAAA,EAGtDD,IAAY,UACXL,EAAAA,IAACkC,EAAAA,OAAA,CACC,UAAArC,EACA,QAAS,IAAMwB,EAAA,EACf,KAAK,UACL,KAAK,SACL,QAAQ,UACP,GAAGtB,EAEH,WAASQ,EAAYD,CAAA,CAAA,CACxB,EAEJ,CAEJ"}
package/dist/reveal.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./reveal-trigger-CCTnO9e2.cjs");exports.Controls=e.RevealControls;exports.Root=e.RevealRoot;exports.Trigger=e.RevealTrigger;exports.Viewport=e.RevealViewport;exports.useReveal=e.useReveal;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./reveal-trigger-ntEvLci1.cjs");exports.Controls=e.RevealControls;exports.Root=e.RevealRoot;exports.Trigger=e.RevealTrigger;exports.Viewport=e.RevealViewport;exports.useReveal=e.useReveal;
2
2
  //# sourceMappingURL=reveal.cjs.map
package/dist/reveal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as s, R as e, c as r, a as t, u as R } from "./reveal-trigger-ScuufoFq.js";
1
+ import { b as s, R as e, c as r, a as t, u as R } from "./reveal-trigger-DT_deyzM.js";
2
2
  export {
3
3
  s as Controls,
4
4
  e as Root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commerce-toolkit",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "A collection of modern, accessible commerce UI components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,2 +0,0 @@
1
- "use strict";const r=require("react/jsx-runtime"),A=require("./utils-DoxiiusW.cjs"),l=require("react"),K=require("./index-DO-atGp-.cjs"),ue=require("./index-ioB9fNr9.cjs"),z=require("./index-_XxjJPRD.cjs"),B=require("./index-BqyOu62e.cjs"),M=require("./index-C8aODXfJ.cjs"),R=require("./index-C9i1xBih.cjs"),pe=require("./index-MQ0c3ZX_.cjs"),fe=require("./index-Bd0gQB0k.cjs"),F=require("./index-WIv2ndLu.cjs"),ve=require("./index-Cje7xxa1.cjs");function xe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const f=xe(l);var w="Collapsible",[ge,U]=K.createContextScope(w),[me,$]=ge(w),Y=f.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:n,defaultOpen:a,disabled:c,onOpenChange:i,...d}=e,[u,p]=M.useControllableState({prop:n,defaultProp:a??!1,onChange:i,caller:w});return r.jsx(me,{scope:o,disabled:c,contentId:F.useId(),open:u,onOpenToggle:f.useCallback(()=>p(v=>!v),[p]),children:r.jsx(R.Primitive.div,{"data-state":H(u),"data-disabled":c?"":void 0,...d,ref:t})})});Y.displayName=w;var J="CollapsibleTrigger",Q=f.forwardRef((e,t)=>{const{__scopeCollapsible:o,...n}=e,a=$(J,o);return r.jsx(R.Primitive.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":H(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:B.composeEventHandlers(e.onClick,a.onOpenToggle)})});Q.displayName=J;var q="CollapsibleContent",W=f.forwardRef((e,t)=>{const{forceMount:o,...n}=e,a=$(q,e.__scopeCollapsible);return r.jsx(fe.Presence,{present:o||a.open,children:({present:c})=>r.jsx(he,{...n,ref:t,present:c})})});W.displayName=q;var he=f.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:n,children:a,...c}=e,i=$(q,o),[d,u]=f.useState(n),p=f.useRef(null),v=z.useComposedRefs(t,p),x=f.useRef(0),y=x.current,m=f.useRef(0),P=m.current,h=i.open||d,C=f.useRef(h),b=f.useRef(void 0);return f.useEffect(()=>{const s=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(s)},[]),pe.useLayoutEffect2(()=>{const s=p.current;if(s){b.current=b.current||{transitionDuration:s.style.transitionDuration,animationName:s.style.animationName},s.style.transitionDuration="0s",s.style.animationName="none";const I=s.getBoundingClientRect();x.current=I.height,m.current=I.width,C.current||(s.style.transitionDuration=b.current.transitionDuration,s.style.animationName=b.current.animationName),u(n)}},[i.open,n]),r.jsx(R.Primitive.div,{"data-state":H(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...c,ref:v,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":P?`${P}px`:void 0,...e.style},children:h&&a})});function H(e){return e?"open":"closed"}var Ce=Y,be=Q,Ae=W,g="Accordion",ye=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[L,Ie,Re]=ue.createCollection(g),[N]=K.createContextScope(g,[Re,U]),V=U(),X=l.forwardRef((e,t)=>{const{type:o,...n}=e,a=n,c=n;return r.jsx(L.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?r.jsx(we,{...c,ref:t}):r.jsx(_e,{...a,ref:t})})});X.displayName=g;var[Z,je]=N(g),[ee,Pe]=N(g,{collapsible:!1}),_e=l.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:a=()=>{},collapsible:c=!1,...i}=e,[d,u]=M.useControllableState({prop:o,defaultProp:n??"",onChange:a,caller:g});return r.jsx(Z,{scope:e.__scopeAccordion,value:l.useMemo(()=>d?[d]:[],[d]),onItemOpen:u,onItemClose:l.useCallback(()=>c&&u(""),[c,u]),children:r.jsx(ee,{scope:e.__scopeAccordion,collapsible:c,children:r.jsx(oe,{...i,ref:t})})})}),we=l.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:a=()=>{},...c}=e,[i,d]=M.useControllableState({prop:o,defaultProp:n??[],onChange:a,caller:g}),u=l.useCallback(v=>d((x=[])=>[...x,v]),[d]),p=l.useCallback(v=>d((x=[])=>x.filter(y=>y!==v)),[d]);return r.jsx(Z,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:p,children:r.jsx(ee,{scope:e.__scopeAccordion,collapsible:!0,children:r.jsx(oe,{...c,ref:t})})})}),[Ne,k]=N(g),oe=l.forwardRef((e,t)=>{const{__scopeAccordion:o,disabled:n,dir:a,orientation:c="vertical",...i}=e,d=l.useRef(null),u=z.useComposedRefs(d,t),p=Ie(o),x=ve.useDirection(a)==="ltr",y=B.composeEventHandlers(e.onKeyDown,m=>{if(!ye.includes(m.key))return;const P=m.target,h=p().filter(T=>!T.ref.current?.disabled),C=h.findIndex(T=>T.ref.current===P),b=h.length;if(C===-1)return;m.preventDefault();let s=C;const I=0,S=b-1,E=()=>{s=C+1,s>S&&(s=I)},O=()=>{s=C-1,s<I&&(s=S)};switch(m.key){case"Home":s=I;break;case"End":s=S;break;case"ArrowRight":c==="horizontal"&&(x?E():O());break;case"ArrowDown":c==="vertical"&&E();break;case"ArrowLeft":c==="horizontal"&&(x?O():E());break;case"ArrowUp":c==="vertical"&&O();break}const de=s%b;h[de].ref.current?.focus()});return r.jsx(Ne,{scope:o,disabled:n,direction:a,orientation:c,children:r.jsx(L.Slot,{scope:o,children:r.jsx(R.Primitive.div,{...i,"data-orientation":c,ref:u,onKeyDown:n?void 0:y})})})}),_="AccordionItem",[ke,G]=N(_),te=l.forwardRef((e,t)=>{const{__scopeAccordion:o,value:n,...a}=e,c=k(_,o),i=je(_,o),d=V(o),u=F.useId(),p=n&&i.value.includes(n)||!1,v=c.disabled||e.disabled;return r.jsx(ke,{scope:o,open:p,disabled:v,triggerId:u,children:r.jsx(Ce,{"data-orientation":c.orientation,"data-state":se(p),...d,...a,ref:t,disabled:v,open:p,onOpenChange:x=>{x?i.onItemOpen(n):i.onItemClose(n)}})})});te.displayName=_;var ne="AccordionHeader",re=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,a=k(g,o),c=G(ne,o);return r.jsx(R.Primitive.h3,{"data-orientation":a.orientation,"data-state":se(c.open),"data-disabled":c.disabled?"":void 0,...n,ref:t})});re.displayName=ne;var D="AccordionTrigger",ae=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,a=k(g,o),c=G(D,o),i=Pe(D,o),d=V(o);return r.jsx(L.ItemSlot,{scope:o,children:r.jsx(be,{"aria-disabled":c.open&&!i.collapsible||void 0,"data-orientation":a.orientation,id:c.triggerId,...d,...n,ref:t})})});ae.displayName=D;var ce="AccordionContent",ie=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,a=k(g,o),c=G(ce,o),i=V(o);return r.jsx(Ae,{role:"region","aria-labelledby":c.triggerId,"data-orientation":a.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ie.displayName=ce;function se(e){return e?"open":"closed"}var Se=X,Ee=te,Oe=re,Te=ae,De=ie;function Me({children:e,className:t,...o}){const{colorScheme:n}=j();return r.jsx(Ee,{className:A.cn("focus:outline-2 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--accordion-focus,hsl(var(--primary)))] has-[:focus-visible]:ring-offset-4",{light:"ring-offset-[var(--acordion-light-offset,hsl(var(--background)))]",dark:"ring-offset-[var(--acordion-dark-offset,hsl(var(--foreground)))]"}[n],t),"data-slot":"accordion-item",...o,children:e})}const le=l.createContext(void 0);function $e({className:e,colorScheme:t="light",children:o,...n}){const a=l.useMemo(()=>({colorScheme:t}),[t]);return r.jsx(le.Provider,{value:a,children:r.jsx(Se,{className:A.cn(e),"data-slot":"accordion-root",...n,children:o})})}function j(){const e=l.use(le);if(e===void 0)throw new Error("useAccordion must be used within an AccordionRoot");return e}function qe({className:e,children:t,...o}){const[n,a]=l.useState(!1);return l.useEffect(()=>{a(!0)},[]),r.jsx(De,{className:A.cn("overflow-hidden",n&&"data-[state=closed]:animate-collapse data-[state=open]:animate-expand"),"data-slot":"accordion-content",...o,children:t})}function He({children:e,className:t,...o}){const{colorScheme:n}=j();return r.jsx("div",{className:A.cn("py-3 text-base font-light leading-normal [font-family:var(--accordion-content-font-family,var(--font-family-body))]",{light:"text-[var(--accordion-light-content-text,hsl(var(--foreground)))]",dark:"text-[var(--accordion-dark-content-text,hsl(var(--background)))]"}[n],t),"data-slot":"accordion-content-area",...o,children:e})}function Le({children:e,className:t,...o}){return r.jsx(Oe,{className:t,...o,children:e})}function Ve({children:e,className:t,...o}){const{colorScheme:n}=j();return r.jsx("div",{className:A.cn("flex-1 select-none text-sm font-normal uppercase transition-colors duration-300 ease-out [font-family:var(--accordion-title-font-family,var(--font-family-mono))]",{light:"text-[var(--accordion-light-title-text,hsl(var(--contrast-400)))] group-hover:text-[var(--accordion-light-title-text-hover,hsl(var(--foreground)))]",dark:"text-[var(--accordion-dark-title-text,hsl(var(--contrast-200)))] group-hover:text-[var(--accordion-dark-title-text-hover,hsl(var(--background)))]"}[n],t),...o,children:e})}function Ge({className:e,...t}){const{colorScheme:o}=j();return r.jsxs("svg",{className:A.cn("mt-1 shrink-0 [&>line]:origin-center [&>line]:transition [&>line]:duration-300 [&>line]:ease-out",{light:"stroke-[var(--accordion-light-title-icon,hsl(var(--contrast-500)))] group-hover:stroke-[var(--accordion-light-title-icon-hover,hsl(var(--foreground)))]",dark:"stroke-[var(--accordion-dark-title-icon,hsl(var(--contrast-200)))] group-hover:stroke-[var(--accordion-dark-title-icon-hover,hsl(var(--background)))]"}[o],e),"data-slot":"accordion-chevron",viewBox:"0 0 10 10",width:16,...t,children:[r.jsx("line",{className:"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:-rotate-90",strokeLinecap:"round",x1:2,x2:5,y1:2,y2:5}),r.jsx("line",{className:"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:rotate-90",strokeLinecap:"round",x1:8,x2:5,y1:2,y2:5})]})}function Ke({className:e,children:t,...o}){return r.jsx(Te,{className:A.cn("group flex w-full cursor-pointer items-start gap-8 border-none py-3 text-start focus:outline-none @md:py-4",e),"data-slot":"accordion-trigger",...o,children:t})}exports.AccordionChevron=Ge;exports.AccordionContent=qe;exports.AccordionContentArea=He;exports.AccordionHeader=Le;exports.AccordionItem=Me;exports.AccordionRoot=$e;exports.AccordionTitle=Ve;exports.AccordionTrigger=Ke;exports.useAccordion=j;
2
- //# sourceMappingURL=accordion-trigger-Bj1Laf6l.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accordion-trigger-Bj1Laf6l.cjs","sources":["../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@_5wh3wn4mb6wukeaw22ryera4jq/node_modules/@radix-ui/react-collapsible/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@19_ypscna4y3y4no7anhyuspcgzt4/node_modules/@radix-ui/react-accordion/dist/index.mjs","../src/components/accordion/primitives/accordion-item.tsx","../src/components/accordion/primitives/accordion-root.tsx","../src/components/accordion/primitives/accordion-content.tsx","../src/components/accordion/primitives/accordion-content-area.tsx","../src/components/accordion/primitives/accordion-header.tsx","../src/components/accordion/primitives/accordion-title.tsx","../src/components/accordion/primitives/accordion-chevron.tsx","../src/components/accordion/primitives/accordion-trigger.tsx"],"sourcesContent":["\"use client\";\n\n// src/collapsible.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar COLLAPSIBLE_NAME = \"Collapsible\";\nvar [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\nvar [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);\nvar Collapsible = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME\n });\n return /* @__PURE__ */ jsx(\n CollapsibleProvider,\n {\n scope: __scopeCollapsible,\n disabled,\n contentId: useId(),\n open,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(open),\n \"data-disabled\": disabled ? \"\" : void 0,\n ...collapsibleProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nCollapsible.displayName = COLLAPSIBLE_NAME;\nvar TRIGGER_NAME = \"CollapsibleTrigger\";\nvar CollapsibleTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open || false,\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n disabled: context.disabled,\n ...triggerProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nCollapsibleTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"CollapsibleContent\";\nvar CollapsibleContent = React.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });\n }\n);\nCollapsibleContent.displayName = CONTENT_NAME;\nvar CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef(void 0);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n node.style.transitionDuration = \"0s\";\n node.style.animationName = \"none\";\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration;\n node.style.animationName = originalStylesRef.current.animationName;\n }\n setIsPresent(present);\n }\n }, [context.open, present]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n id: context.contentId,\n hidden: !isOpen,\n ...contentProps,\n ref: composedRefs,\n style: {\n [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,\n [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,\n ...props.style\n },\n children: isOpen && children\n }\n );\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root = Collapsible;\nvar Trigger = CollapsibleTrigger;\nvar Content = CollapsibleContent;\nexport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n Content,\n Root,\n Trigger,\n createCollapsibleScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/accordion.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport { createCollapsibleScope } from \"@radix-ui/react-collapsible\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ACCORDION_NAME = \"Accordion\";\nvar ACCORDION_KEYS = [\"Home\", \"End\", \"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\"];\nvar [Collection, useCollection, createCollectionScope] = createCollection(ACCORDION_NAME);\nvar [createAccordionContext, createAccordionScope] = createContextScope(ACCORDION_NAME, [\n createCollectionScope,\n createCollapsibleScope\n]);\nvar useCollapsibleScope = createCollapsibleScope();\nvar Accordion = React.forwardRef(\n (props, forwardedRef) => {\n const { type, ...accordionProps } = props;\n const singleProps = accordionProps;\n const multipleProps = accordionProps;\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeAccordion, children: type === \"multiple\" ? /* @__PURE__ */ jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });\n }\n);\nAccordion.displayName = ACCORDION_NAME;\nvar [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);\nvar [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(\n ACCORDION_NAME,\n { collapsible: false }\n);\nvar AccordionImplSingle = React.forwardRef(\n (props, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {\n },\n collapsible = false,\n ...accordionSingleProps\n } = props;\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? \"\",\n onChange: onValueChange,\n caller: ACCORDION_NAME\n });\n return /* @__PURE__ */ jsx(\n AccordionValueProvider,\n {\n scope: props.__scopeAccordion,\n value: React.useMemo(() => value ? [value] : [], [value]),\n onItemOpen: setValue,\n onItemClose: React.useCallback(() => collapsible && setValue(\"\"), [collapsible, setValue]),\n children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })\n }\n );\n }\n);\nvar AccordionImplMultiple = React.forwardRef((props, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {\n },\n ...accordionMultipleProps\n } = props;\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n caller: ACCORDION_NAME\n });\n const handleItemOpen = React.useCallback(\n (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n const handleItemClose = React.useCallback(\n (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),\n [setValue]\n );\n return /* @__PURE__ */ jsx(\n AccordionValueProvider,\n {\n scope: props.__scopeAccordion,\n value,\n onItemOpen: handleItemOpen,\n onItemClose: handleItemClose,\n children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })\n }\n );\n});\nvar [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);\nvar AccordionImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, disabled, dir, orientation = \"vertical\", ...accordionProps } = props;\n const accordionRef = React.useRef(null);\n const composedRefs = useComposedRefs(accordionRef, forwardedRef);\n const getItems = useCollection(__scopeAccordion);\n const direction = useDirection(dir);\n const isDirectionLTR = direction === \"ltr\";\n const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {\n if (!ACCORDION_KEYS.includes(event.key)) return;\n const target = event.target;\n const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);\n const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);\n const triggerCount = triggerCollection.length;\n if (triggerIndex === -1) return;\n event.preventDefault();\n let nextIndex = triggerIndex;\n const homeIndex = 0;\n const endIndex = triggerCount - 1;\n const moveNext = () => {\n nextIndex = triggerIndex + 1;\n if (nextIndex > endIndex) {\n nextIndex = homeIndex;\n }\n };\n const movePrev = () => {\n nextIndex = triggerIndex - 1;\n if (nextIndex < homeIndex) {\n nextIndex = endIndex;\n }\n };\n switch (event.key) {\n case \"Home\":\n nextIndex = homeIndex;\n break;\n case \"End\":\n nextIndex = endIndex;\n break;\n case \"ArrowRight\":\n if (orientation === \"horizontal\") {\n if (isDirectionLTR) {\n moveNext();\n } else {\n movePrev();\n }\n }\n break;\n case \"ArrowDown\":\n if (orientation === \"vertical\") {\n moveNext();\n }\n break;\n case \"ArrowLeft\":\n if (orientation === \"horizontal\") {\n if (isDirectionLTR) {\n movePrev();\n } else {\n moveNext();\n }\n }\n break;\n case \"ArrowUp\":\n if (orientation === \"vertical\") {\n movePrev();\n }\n break;\n }\n const clampedIndex = nextIndex % triggerCount;\n triggerCollection[clampedIndex].ref.current?.focus();\n });\n return /* @__PURE__ */ jsx(\n AccordionImplProvider,\n {\n scope: __scopeAccordion,\n disabled,\n direction: dir,\n orientation,\n children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...accordionProps,\n \"data-orientation\": orientation,\n ref: composedRefs,\n onKeyDown: disabled ? void 0 : handleKeyDown\n }\n ) })\n }\n );\n }\n);\nvar ITEM_NAME = \"AccordionItem\";\nvar [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME);\nvar AccordionItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, value, ...accordionItemProps } = props;\n const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);\n const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n const triggerId = useId();\n const open = value && valueContext.value.includes(value) || false;\n const disabled = accordionContext.disabled || props.disabled;\n return /* @__PURE__ */ jsx(\n AccordionItemProvider,\n {\n scope: __scopeAccordion,\n open,\n disabled,\n triggerId,\n children: /* @__PURE__ */ jsx(\n CollapsiblePrimitive.Root,\n {\n \"data-orientation\": accordionContext.orientation,\n \"data-state\": getState(open),\n ...collapsibleScope,\n ...accordionItemProps,\n ref: forwardedRef,\n disabled,\n open,\n onOpenChange: (open2) => {\n if (open2) {\n valueContext.onItemOpen(value);\n } else {\n valueContext.onItemClose(value);\n }\n }\n }\n )\n }\n );\n }\n);\nAccordionItem.displayName = ITEM_NAME;\nvar HEADER_NAME = \"AccordionHeader\";\nvar AccordionHeader = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, ...headerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);\n return /* @__PURE__ */ jsx(\n Primitive.h3,\n {\n \"data-orientation\": accordionContext.orientation,\n \"data-state\": getState(itemContext.open),\n \"data-disabled\": itemContext.disabled ? \"\" : void 0,\n ...headerProps,\n ref: forwardedRef\n }\n );\n }\n);\nAccordionHeader.displayName = HEADER_NAME;\nvar TRIGGER_NAME = \"AccordionTrigger\";\nvar AccordionTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, ...triggerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(\n CollapsiblePrimitive.Trigger,\n {\n \"aria-disabled\": itemContext.open && !collapsibleContext.collapsible || void 0,\n \"data-orientation\": accordionContext.orientation,\n id: itemContext.triggerId,\n ...collapsibleScope,\n ...triggerProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nAccordionTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"AccordionContent\";\nvar AccordionContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, ...contentProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return /* @__PURE__ */ jsx(\n CollapsiblePrimitive.Content,\n {\n role: \"region\",\n \"aria-labelledby\": itemContext.triggerId,\n \"data-orientation\": accordionContext.orientation,\n ...collapsibleScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n [\"--radix-accordion-content-height\"]: \"var(--radix-collapsible-content-height)\",\n [\"--radix-accordion-content-width\"]: \"var(--radix-collapsible-content-width)\",\n ...props.style\n }\n }\n );\n }\n);\nAccordionContent.displayName = CONTENT_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Accordion;\nvar Item = AccordionItem;\nvar Header = AccordionHeader;\nvar Trigger2 = AccordionTrigger;\nvar Content2 = AccordionContent;\nexport {\n Accordion,\n AccordionContent,\n AccordionHeader,\n AccordionItem,\n AccordionTrigger,\n Content2 as Content,\n Header,\n Item,\n Root2 as Root,\n Trigger2 as Trigger,\n createAccordionScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport type { ComponentProps } from 'react';\n\nimport { useAccordion } from '@/components/accordion';\nimport { cn } from '@/lib';\n\nexport type AccordionItemProps = ComponentProps<typeof AccordionPrimitive.Item>;\n\nexport function AccordionItem({ children, className, ...props }: AccordionItemProps) {\n const { colorScheme } = useAccordion();\n\n return (\n <AccordionPrimitive.Item\n className={cn(\n 'focus:outline-2 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--accordion-focus,hsl(var(--primary)))] has-[:focus-visible]:ring-offset-4',\n {\n light: 'ring-offset-[var(--acordion-light-offset,hsl(var(--background)))]',\n dark: 'ring-offset-[var(--acordion-dark-offset,hsl(var(--foreground)))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"accordion-item\"\n {...props}\n >\n {children}\n </AccordionPrimitive.Item>\n );\n}\n","'use client';\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { createContext, use, useMemo } from 'react';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\ninterface AccordionContext {\n colorScheme: 'light' | 'dark';\n}\n\nexport const AccordionContext = createContext<AccordionContext | undefined>(undefined);\n\nexport type AccordionRootProps = ComponentProps<typeof AccordionPrimitive.Root> & {\n colorScheme?: 'light' | 'dark';\n};\n\nexport function AccordionRoot({\n className,\n colorScheme = 'light',\n children,\n ...props\n}: AccordionRootProps) {\n const contextValues = useMemo(\n () => ({\n colorScheme,\n }),\n [colorScheme],\n );\n\n return (\n <AccordionContext.Provider value={contextValues}>\n <AccordionPrimitive.Root className={cn(className)} data-slot=\"accordion-root\" {...props}>\n {children}\n </AccordionPrimitive.Root>\n </AccordionContext.Provider>\n );\n}\n\nexport function useAccordion() {\n const context = use(AccordionContext);\n\n if (context === undefined) {\n throw new Error('useAccordion must be used within an AccordionRoot');\n }\n\n return context;\n}\n","'use client';\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { useEffect, useState } from 'react';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type AccordionContentProps = ComponentProps<typeof AccordionPrimitive.Content>;\n\nexport function AccordionContent({ className, children, ...props }: AccordionContentProps) {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return (\n <AccordionPrimitive.Content\n className={cn(\n 'overflow-hidden',\n // We need to delay the animation until the component is mounted to avoid the animation from being triggered when the component is first rendered.\n isMounted && 'data-[state=closed]:animate-collapse data-[state=open]:animate-expand',\n )}\n data-slot=\"accordion-content\"\n {...props}\n >\n {children}\n </AccordionPrimitive.Content>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { useAccordion } from '@/components/accordion';\nimport { cn } from '@/lib';\n\nexport type AccordionContentAreaProps = ComponentProps<'div'>;\n\nexport function AccordionContentArea({ children, className, ...props }: AccordionContentAreaProps) {\n const { colorScheme } = useAccordion();\n\n return (\n <div\n className={cn(\n 'py-3 text-base font-light leading-normal [font-family:var(--accordion-content-font-family,var(--font-family-body))]',\n {\n light: 'text-[var(--accordion-light-content-text,hsl(var(--foreground)))]',\n dark: 'text-[var(--accordion-dark-content-text,hsl(var(--background)))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"accordion-content-area\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport type { ComponentProps } from 'react';\n\nexport type AccordionHeaderProps = ComponentProps<typeof AccordionPrimitive.Header>;\n\nexport function AccordionHeader({ children, className, ...props }: AccordionHeaderProps) {\n return (\n <AccordionPrimitive.Header className={className} {...props}>\n {children}\n </AccordionPrimitive.Header>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { useAccordion } from '@/components/accordion';\nimport { cn } from '@/lib';\n\nexport type AccordionTitleProps = ComponentProps<'div'>;\n\nexport function AccordionTitle({ children, className, ...props }: AccordionTitleProps) {\n const { colorScheme } = useAccordion();\n\n return (\n <div\n className={cn(\n 'flex-1 select-none text-sm font-normal uppercase transition-colors duration-300 ease-out [font-family:var(--accordion-title-font-family,var(--font-family-mono))]',\n {\n light:\n 'text-[var(--accordion-light-title-text,hsl(var(--contrast-400)))] group-hover:text-[var(--accordion-light-title-text-hover,hsl(var(--foreground)))]',\n dark: 'text-[var(--accordion-dark-title-text,hsl(var(--contrast-200)))] group-hover:text-[var(--accordion-dark-title-text-hover,hsl(var(--background)))]',\n }[colorScheme],\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { useAccordion } from '@/components/accordion';\nimport { cn } from '@/lib';\n\nexport type AccordionChevronProps = ComponentProps<'svg'>;\n\nexport function AccordionChevron({ className, ...props }: AccordionChevronProps) {\n const { colorScheme } = useAccordion();\n\n return (\n <svg\n className={cn(\n 'mt-1 shrink-0 [&>line]:origin-center [&>line]:transition [&>line]:duration-300 [&>line]:ease-out',\n {\n light:\n 'stroke-[var(--accordion-light-title-icon,hsl(var(--contrast-500)))] group-hover:stroke-[var(--accordion-light-title-icon-hover,hsl(var(--foreground)))]',\n dark: 'stroke-[var(--accordion-dark-title-icon,hsl(var(--contrast-200)))] group-hover:stroke-[var(--accordion-dark-title-icon-hover,hsl(var(--background)))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"accordion-chevron\"\n viewBox=\"0 0 10 10\"\n width={16}\n {...props}\n >\n {/* Left Line of Chevron */}\n <line\n className=\"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:-rotate-90\"\n strokeLinecap=\"round\"\n x1={2}\n x2={5}\n y1={2}\n y2={5}\n />\n {/* Right Line of Chevron */}\n <line\n className=\"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:rotate-90\"\n strokeLinecap=\"round\"\n x1={8}\n x2={5}\n y1={2}\n y2={5}\n />\n </svg>\n );\n}\n","'use client';\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type AccordionTriggerProps = ComponentProps<typeof AccordionPrimitive.Trigger>;\n\nexport function AccordionTrigger({ className, children, ...props }: AccordionTriggerProps) {\n return (\n <AccordionPrimitive.Trigger\n className={cn(\n 'group flex w-full cursor-pointer items-start gap-8 border-none py-3 text-start focus:outline-none @md:py-4',\n className,\n )}\n data-slot=\"accordion-trigger\"\n {...props}\n >\n {children}\n </AccordionPrimitive.Trigger>\n );\n}\n"],"names":["COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","createContextScope","CollapsibleProvider","useCollapsibleContext","Collapsible","React","props","forwardedRef","__scopeCollapsible","openProp","defaultOpen","disabled","onOpenChange","collapsibleProps","open","setOpen","useControllableState","jsx","useId","prevOpen","Primitive","getState","TRIGGER_NAME","CollapsibleTrigger","triggerProps","context","composeEventHandlers","CONTENT_NAME","CollapsibleContent","forceMount","contentProps","Presence","present","CollapsibleContentImpl","children","isPresent","setIsPresent","ref","composedRefs","useComposedRefs","heightRef","height","widthRef","width","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","useLayoutEffect","node","rect","Root","Trigger","Content","ACCORDION_NAME","ACCORDION_KEYS","Collection","useCollection","createCollectionScope","createCollection","createAccordionContext","useCollapsibleScope","Accordion","type","accordionProps","singleProps","multipleProps","AccordionImplMultiple","AccordionImplSingle","AccordionValueProvider","useAccordionValueContext","AccordionCollapsibleProvider","useAccordionCollapsibleContext","valueProp","defaultValue","onValueChange","collapsible","accordionSingleProps","value","setValue","AccordionImpl","accordionMultipleProps","handleItemOpen","itemValue","prevValue","handleItemClose","value2","AccordionImplProvider","useAccordionContext","__scopeAccordion","dir","orientation","accordionRef","getItems","isDirectionLTR","useDirection","handleKeyDown","event","target","triggerCollection","item","triggerIndex","triggerCount","nextIndex","homeIndex","endIndex","moveNext","movePrev","clampedIndex","ITEM_NAME","AccordionItemProvider","useAccordionItemContext","AccordionItem","accordionItemProps","accordionContext","valueContext","collapsibleScope","triggerId","CollapsiblePrimitive.Root","open2","HEADER_NAME","AccordionHeader","headerProps","itemContext","AccordionTrigger","collapsibleContext","CollapsiblePrimitive.Trigger","AccordionContent","CollapsiblePrimitive.Content","Root2","Item","Header","Trigger2","Content2","className","colorScheme","useAccordion","AccordionPrimitive.Item","cn","AccordionContext","createContext","AccordionRoot","contextValues","useMemo","AccordionPrimitive.Root","use","isMounted","setIsMounted","useState","useEffect","AccordionPrimitive.Content","AccordionContentArea","AccordionPrimitive.Header","AccordionTitle","AccordionChevron","jsxs","AccordionPrimitive.Trigger"],"mappings":"2tBAaA,IAAIA,EAAmB,cACnB,CAACC,GAA0BC,CAAsB,EAAIC,EAAAA,mBAAmBH,CAAgB,EACxF,CAACI,GAAqBC,CAAqB,EAAIJ,GA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