@astra-kit/ui 0.0.0-stage → 0.0.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 (304) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +384 -2
  4. package/THIRD_PARTY_NOTICES.md +31 -0
  5. package/assets/fonts/geist-LICENSE.txt +93 -0
  6. package/assets/fonts/geist-latin-variable.woff2 +0 -0
  7. package/assets/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
  8. package/assets/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
  9. package/assets/fonts/ibmplexmono-LICENSE.txt +93 -0
  10. package/assets/fonts/inter-LICENSE.txt +93 -0
  11. package/assets/fonts/inter-latin-variable.woff2 +0 -0
  12. package/dist/adapters/unpic-image.d.ts +3 -0
  13. package/dist/adapters/unpic-image.js +98 -0
  14. package/dist/components/account-menu.d.ts +67 -0
  15. package/dist/components/account-menu.js +440 -0
  16. package/dist/components/action-button.d.ts +25 -0
  17. package/dist/components/action-button.js +264 -0
  18. package/dist/components/alert.d.ts +31 -0
  19. package/dist/components/alert.js +503 -0
  20. package/dist/components/animated-collapse.d.ts +19 -0
  21. package/dist/components/animated-collapse.js +170 -0
  22. package/dist/components/animated-count.d.ts +13 -0
  23. package/dist/components/animated-count.js +105 -0
  24. package/dist/components/animated-list-item.d.ts +25 -0
  25. package/dist/components/animated-list-item.js +134 -0
  26. package/dist/components/animated-theme-toggler.d.ts +12 -0
  27. package/dist/components/animated-theme-toggler.js +200 -0
  28. package/dist/components/avatar.d.ts +65 -0
  29. package/dist/components/avatar.js +463 -0
  30. package/dist/components/badge.d.ts +21 -0
  31. package/dist/components/badge.js +297 -0
  32. package/dist/components/button-interaction.d.ts +23 -0
  33. package/dist/components/button-interaction.js +22 -0
  34. package/dist/components/button-label.d.ts +8 -0
  35. package/dist/components/button-label.js +203 -0
  36. package/dist/components/button.d.ts +23 -0
  37. package/dist/components/button.js +145 -0
  38. package/dist/components/calendar.d.ts +47 -0
  39. package/dist/components/calendar.js +155 -0
  40. package/dist/components/card.d.ts +38 -0
  41. package/dist/components/card.js +904 -0
  42. package/dist/components/carousel.d.ts +71 -0
  43. package/dist/components/carousel.js +585 -0
  44. package/dist/components/checkbox.d.ts +15 -0
  45. package/dist/components/checkbox.js +324 -0
  46. package/dist/components/control-button.d.ts +16 -0
  47. package/dist/components/control-button.js +215 -0
  48. package/dist/components/data-table.d.ts +118 -0
  49. package/dist/components/data-table.js +895 -0
  50. package/dist/components/dialog-surface.d.ts +49 -0
  51. package/dist/components/dialog-surface.js +220 -0
  52. package/dist/components/dialog.d.ts +92 -0
  53. package/dist/components/dialog.js +320 -0
  54. package/dist/components/dropdown-menu.d.ts +57 -0
  55. package/dist/components/dropdown-menu.js +107 -0
  56. package/dist/components/field.d.ts +53 -0
  57. package/dist/components/field.js +710 -0
  58. package/dist/components/file-upload.d.ts +88 -0
  59. package/dist/components/file-upload.js +776 -0
  60. package/dist/components/filter-presets-bar.d.ts +73 -0
  61. package/dist/components/filter-presets-bar.js +510 -0
  62. package/dist/components/filter-query-bar.d.ts +21 -0
  63. package/dist/components/filter-query-bar.js +881 -0
  64. package/dist/components/filter-query-grammar.d.ts +188 -0
  65. package/dist/components/filter-query-grammar.js +875 -0
  66. package/dist/components/form.d.ts +29 -0
  67. package/dist/components/form.js +330 -0
  68. package/dist/components/highlighter.d.ts +15 -0
  69. package/dist/components/highlighter.js +152 -0
  70. package/dist/components/hover-card.d.ts +50 -0
  71. package/dist/components/hover-card.js +80 -0
  72. package/dist/components/input-group.d.ts +16 -0
  73. package/dist/components/input-group.js +277 -0
  74. package/dist/components/input.d.ts +17 -0
  75. package/dist/components/input.js +120 -0
  76. package/dist/components/label.d.ts +4 -0
  77. package/dist/components/label.js +43 -0
  78. package/dist/components/link.d.ts +9 -0
  79. package/dist/components/link.js +43 -0
  80. package/dist/components/morph-text.d.ts +14 -0
  81. package/dist/components/morph-text.js +210 -0
  82. package/dist/components/pagination.d.ts +59 -0
  83. package/dist/components/pagination.js +190 -0
  84. package/dist/components/popover.d.ts +17 -0
  85. package/dist/components/popover.js +40 -0
  86. package/dist/components/presence-swap.d.ts +22 -0
  87. package/dist/components/presence-swap.js +209 -0
  88. package/dist/components/primitives/alert-dialog.d.ts +68 -0
  89. package/dist/components/primitives/alert-dialog.js +629 -0
  90. package/dist/components/primitives/avatar.d.ts +46 -0
  91. package/dist/components/primitives/avatar.js +265 -0
  92. package/dist/components/primitives/calendar.d.ts +37 -0
  93. package/dist/components/primitives/calendar.js +1250 -0
  94. package/dist/components/primitives/carousel.d.ts +106 -0
  95. package/dist/components/primitives/carousel.js +928 -0
  96. package/dist/components/primitives/dialog.d.ts +62 -0
  97. package/dist/components/primitives/dialog.js +490 -0
  98. package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
  99. package/dist/components/primitives/dropdown-menu-items.js +265 -0
  100. package/dist/components/primitives/dropdown-menu.d.ts +64 -0
  101. package/dist/components/primitives/dropdown-menu.js +560 -0
  102. package/dist/components/primitives/hover-card.d.ts +50 -0
  103. package/dist/components/primitives/hover-card.js +507 -0
  104. package/dist/components/primitives/pagination.d.ts +65 -0
  105. package/dist/components/primitives/pagination.js +373 -0
  106. package/dist/components/primitives/popover.d.ts +22 -0
  107. package/dist/components/primitives/popover.js +213 -0
  108. package/dist/components/primitives/select.d.ts +37 -0
  109. package/dist/components/primitives/select.js +428 -0
  110. package/dist/components/primitives/tooltip.d.ts +30 -0
  111. package/dist/components/primitives/tooltip.js +277 -0
  112. package/dist/components/progress-ring.d.ts +20 -0
  113. package/dist/components/progress-ring.js +53 -0
  114. package/dist/components/radio-group.d.ts +34 -0
  115. package/dist/components/radio-group.js +392 -0
  116. package/dist/components/reaction-button.d.ts +30 -0
  117. package/dist/components/reaction-button.js +189 -0
  118. package/dist/components/rich-link-editor.d.ts +25 -0
  119. package/dist/components/rich-link-editor.js +320 -0
  120. package/dist/components/rich-markdown-content.d.ts +10 -0
  121. package/dist/components/rich-markdown-content.js +56 -0
  122. package/dist/components/rich-text-content.d.ts +19 -0
  123. package/dist/components/rich-text-content.js +26 -0
  124. package/dist/components/select.d.ts +55 -0
  125. package/dist/components/select.js +188 -0
  126. package/dist/components/separator.d.ts +3 -0
  127. package/dist/components/separator.js +48 -0
  128. package/dist/components/sheet.d.ts +19 -0
  129. package/dist/components/sheet.js +420 -0
  130. package/dist/components/sidebar-panel-context.d.ts +17 -0
  131. package/dist/components/sidebar-panel-context.js +14 -0
  132. package/dist/components/sidebar.d.ts +195 -0
  133. package/dist/components/sidebar.js +2041 -0
  134. package/dist/components/skeleton.d.ts +23 -0
  135. package/dist/components/skeleton.js +334 -0
  136. package/dist/components/split-button.d.ts +36 -0
  137. package/dist/components/split-button.js +306 -0
  138. package/dist/components/svgs/whatsappIcon.d.ts +3 -0
  139. package/dist/components/svgs/whatsappIcon.js +14 -0
  140. package/dist/components/switch.d.ts +13 -0
  141. package/dist/components/switch.js +444 -0
  142. package/dist/components/table.d.ts +10 -0
  143. package/dist/components/table.js +298 -0
  144. package/dist/components/tabs.d.ts +36 -0
  145. package/dist/components/tabs.js +636 -0
  146. package/dist/components/textarea.d.ts +16 -0
  147. package/dist/components/textarea.js +111 -0
  148. package/dist/components/themed-toaster.d.ts +7 -0
  149. package/dist/components/themed-toaster.js +86 -0
  150. package/dist/components/toaster.d.ts +12 -0
  151. package/dist/components/toaster.js +62 -0
  152. package/dist/components/tooltip.d.ts +43 -0
  153. package/dist/components/tooltip.js +65 -0
  154. package/dist/components/typing-animation.d.ts +34 -0
  155. package/dist/components/typing-animation.js +389 -0
  156. package/dist/constants/action-button.d.ts +20 -0
  157. package/dist/constants/action-button.js +17 -0
  158. package/dist/constants/alert.d.ts +16 -0
  159. package/dist/constants/alert.js +13 -0
  160. package/dist/constants/avatar.d.ts +38 -0
  161. package/dist/constants/avatar.js +32 -0
  162. package/dist/constants/badge.d.ts +6 -0
  163. package/dist/constants/badge.js +6 -0
  164. package/dist/constants/button.d.ts +16 -0
  165. package/dist/constants/button.js +16 -0
  166. package/dist/constants/calendar.d.ts +36 -0
  167. package/dist/constants/calendar.js +34 -0
  168. package/dist/constants/card.d.ts +23 -0
  169. package/dist/constants/card.js +20 -0
  170. package/dist/constants/carousel.d.ts +55 -0
  171. package/dist/constants/carousel.js +74 -0
  172. package/dist/constants/checkbox.d.ts +17 -0
  173. package/dist/constants/checkbox.js +17 -0
  174. package/dist/constants/dialog.d.ts +11 -0
  175. package/dist/constants/dialog.js +10 -0
  176. package/dist/constants/dropdown-menu.d.ts +10 -0
  177. package/dist/constants/dropdown-menu.js +37 -0
  178. package/dist/constants/field.d.ts +24 -0
  179. package/dist/constants/field.js +24 -0
  180. package/dist/constants/hover-card.d.ts +37 -0
  181. package/dist/constants/hover-card.js +85 -0
  182. package/dist/constants/morph-text.d.ts +13 -0
  183. package/dist/constants/morph-text.js +13 -0
  184. package/dist/constants/motion.d.ts +12 -0
  185. package/dist/constants/motion.js +12 -0
  186. package/dist/constants/pagination.d.ts +20 -0
  187. package/dist/constants/pagination.js +20 -0
  188. package/dist/constants/popover.d.ts +7 -0
  189. package/dist/constants/popover.js +33 -0
  190. package/dist/constants/radio-group.d.ts +10 -0
  191. package/dist/constants/radio-group.js +10 -0
  192. package/dist/constants/select.d.ts +7 -0
  193. package/dist/constants/select.js +34 -0
  194. package/dist/constants/sidebar.d.ts +9 -0
  195. package/dist/constants/sidebar.js +17 -0
  196. package/dist/constants/skeleton.d.ts +17 -0
  197. package/dist/constants/skeleton.js +17 -0
  198. package/dist/constants/split-button.d.ts +7 -0
  199. package/dist/constants/split-button.js +5 -0
  200. package/dist/constants/switch.d.ts +33 -0
  201. package/dist/constants/switch.js +41 -0
  202. package/dist/constants/tabs.d.ts +17 -0
  203. package/dist/constants/tabs.js +17 -0
  204. package/dist/constants/toast.d.ts +3 -0
  205. package/dist/constants/toast.js +3 -0
  206. package/dist/constants/tooltip.d.ts +13 -0
  207. package/dist/constants/tooltip.js +52 -0
  208. package/dist/hooks/use-horizontal-swipe.d.ts +23 -0
  209. package/dist/hooks/use-horizontal-swipe.js +80 -0
  210. package/dist/hooks/use-is-hydrated.d.ts +6 -0
  211. package/dist/hooks/use-is-hydrated.js +20 -0
  212. package/dist/hooks/use-mobile.d.ts +1 -0
  213. package/dist/hooks/use-mobile.js +19 -0
  214. package/dist/hooks/use-prefers-reduced-motion.d.ts +2 -0
  215. package/dist/hooks/use-prefers-reduced-motion.js +27 -0
  216. package/dist/hooks/use-rich-link-editor.d.ts +55 -0
  217. package/dist/hooks/use-rich-link-editor.js +515 -0
  218. package/dist/hooks/use-sidebar-persistence.d.ts +6 -0
  219. package/dist/hooks/use-sidebar-persistence.js +52 -0
  220. package/dist/hooks/use-today.d.ts +7 -0
  221. package/dist/hooks/use-today.js +50 -0
  222. package/dist/hooks/use-viewer-time-zone.d.ts +6 -0
  223. package/dist/hooks/use-viewer-time-zone.js +20 -0
  224. package/dist/hooks.d.ts +11 -0
  225. package/dist/hooks.js +11 -0
  226. package/dist/index.d.ts +71 -0
  227. package/dist/index.js +69 -0
  228. package/dist/lib/browser-clipboard.d.ts +13 -0
  229. package/dist/lib/browser-clipboard.js +48 -0
  230. package/dist/lib/column-filter-value.d.ts +12 -0
  231. package/dist/lib/column-filter-value.js +52 -0
  232. package/dist/lib/file-acceptance.d.ts +43 -0
  233. package/dist/lib/file-acceptance.js +107 -0
  234. package/dist/lib/format-file-size.d.ts +16 -0
  235. package/dist/lib/format-file-size.js +34 -0
  236. package/dist/lib/fuzzy-search.d.ts +17 -0
  237. package/dist/lib/fuzzy-search.js +183 -0
  238. package/dist/lib/horizontal-swipe.d.ts +23 -0
  239. package/dist/lib/horizontal-swipe.js +29 -0
  240. package/dist/lib/image-dimensions.d.ts +2 -0
  241. package/dist/lib/image-dimensions.js +7 -0
  242. package/dist/lib/name-initials.d.ts +7 -0
  243. package/dist/lib/name-initials.js +11 -0
  244. package/dist/lib/rich-text/link-markdown-constants.d.ts +147 -0
  245. package/dist/lib/rich-text/link-markdown-constants.js +458 -0
  246. package/dist/lib/rich-text/link-markdown-types.d.ts +53 -0
  247. package/dist/lib/rich-text/link-markdown-types.js +1 -0
  248. package/dist/lib/rich-text/link-markdown.d.ts +193 -0
  249. package/dist/lib/rich-text/link-markdown.js +592 -0
  250. package/dist/lib/rich-text/rich-markdown.d.ts +41 -0
  251. package/dist/lib/rich-text/rich-markdown.js +105 -0
  252. package/dist/lib/rich-text/rich-text-editor-dom.d.ts +26 -0
  253. package/dist/lib/rich-text/rich-text-editor-dom.js +79 -0
  254. package/dist/lib/toast-layer.d.ts +24 -0
  255. package/dist/lib/toast-layer.js +76 -0
  256. package/dist/lib/utils.d.ts +2 -0
  257. package/dist/lib/utils.js +2 -0
  258. package/dist/lib/year-month-filter.d.ts +16 -0
  259. package/dist/lib/year-month-filter.js +46 -0
  260. package/dist/motion/arc-floating-slot.d.ts +40 -0
  261. package/dist/motion/arc-floating-slot.js +177 -0
  262. package/dist/motion/arc-press.d.ts +6 -0
  263. package/dist/motion/arc-press.js +59 -0
  264. package/dist/motion/arc-swap.d.ts +22 -0
  265. package/dist/motion/arc-swap.js +49 -0
  266. package/dist/motion/arc-tokens.d.ts +53 -0
  267. package/dist/motion/arc-tokens.js +73 -0
  268. package/dist/motion/glide-indicator.d.ts +69 -0
  269. package/dist/motion/glide-indicator.js +309 -0
  270. package/dist/motion/glide-slot.d.ts +9 -0
  271. package/dist/motion/glide-slot.js +71 -0
  272. package/dist/motion/motion-slot.d.ts +12 -0
  273. package/dist/motion/motion-slot.js +376 -0
  274. package/dist/motion/overlay-warmth.d.ts +24 -0
  275. package/dist/motion/overlay-warmth.js +70 -0
  276. package/dist/motion/presence.d.ts +40 -0
  277. package/dist/motion/presence.js +101 -0
  278. package/dist/motion/surface-keyframes.d.ts +24 -0
  279. package/dist/motion/surface-keyframes.js +141 -0
  280. package/dist/motion/tokens.d.ts +81 -0
  281. package/dist/motion/tokens.js +67 -0
  282. package/dist/motion/use-attached-element.d.ts +7 -0
  283. package/dist/motion/use-attached-element.js +22 -0
  284. package/dist/motion/use-morph-width.d.ts +13 -0
  285. package/dist/motion/use-morph-width.js +59 -0
  286. package/dist/next.d.ts +14 -0
  287. package/dist/next.js +79 -0
  288. package/dist/providers/astra-ui-provider.d.ts +27 -0
  289. package/dist/providers/astra-ui-provider.js +100 -0
  290. package/dist/providers/native-provider.d.ts +4 -0
  291. package/dist/providers/native-provider.js +45 -0
  292. package/dist/sonner.d.ts +7 -0
  293. package/dist/sonner.js +8 -0
  294. package/dist/styles.css +2 -0
  295. package/dist/tanstack.d.ts +11 -0
  296. package/dist/tanstack.js +50 -0
  297. package/dist/theme.d.ts +3 -0
  298. package/dist/theme.js +1 -0
  299. package/dist/types/data-table.d.ts +27 -0
  300. package/dist/types/data-table.js +1 -0
  301. package/fonts.css +5 -0
  302. package/package.json +450 -4
  303. package/styles.css +4 -0
  304. package/theme.css +248 -0
@@ -0,0 +1,904 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ /**
4
+ * Arc's Card (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a contained group of related content on
5
+ * Arc's surface, panel radius and spacing, with optional media, an owner byline whose status rolls in word by word, a
6
+ * trailing action and Arc's quick look. A card holding a link or button floats a little on fine-pointer hover and its
7
+ * media drifts in slowly. With `details`, the title becomes the trigger of a dialog that grows out of the card: the
8
+ * surface, photo, title and byline travel on one spring while the details settle in beneath them.
9
+ */
10
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
11
+ import { Dialog as DialogPrimitive } from "radix-ui";
12
+ import { AnimatePresence, LayoutGroup, motion } from "motion/react";
13
+ import { X } from "lucide-react";
14
+ import { CARD_CLOSE_HIDDEN_SCALE, CARD_CLOSE_LABEL, CARD_CLOSE_PRESS_SCALE, CARD_DEFAULT_HEADING_LEVEL, CARD_DETAILS_OFFSET_PX, CARD_GROW_DURATION_S, CARD_RETURN_MS, CARD_SETTLE_DURATION_S, CARD_STATUS_OFFSET_EM, CARD_STATUS_WORD_STAGGER_S } from "../constants/card.js";
15
+ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
16
+ import { cn } from "../lib/utils.js";
17
+ import { ARC_BLUR, ARC_DURATION, ARC_EASE, ARC_SPRING_SMOOTH, ARC_SPRING_SNAPPY } from "../motion/arc-tokens.js";
18
+ import { useAttachedElement } from "../motion/use-attached-element.js";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ /** One critically damped spring carries the surface both ways, so it never overshoots and can reverse mid-flight. */
21
+ const grow = {
22
+ ...ARC_SPRING_SMOOTH,
23
+ visualDuration: CARD_GROW_DURATION_S
24
+ };
25
+ const settle = {
26
+ ...ARC_SPRING_SMOOTH,
27
+ visualDuration: CARD_SETTLE_DURATION_S
28
+ };
29
+ const fade = { duration: ARC_DURATION.instant };
30
+ /** Quick look extras arrive once the surface has mostly grown, so they never ride the stretch. */
31
+ const reveal = {
32
+ delay: ARC_DURATION.instant,
33
+ duration: ARC_DURATION.standard,
34
+ ease: [...ARC_EASE.enter]
35
+ };
36
+ const closeIn = {
37
+ delay: ARC_DURATION.instant,
38
+ duration: ARC_DURATION.fast,
39
+ ease: [...ARC_EASE.enter]
40
+ };
41
+ /** A new status replaces the whole line: the old one lifts away quickly while the new words rise in one after another. */
42
+ const statusLineMotion = {
43
+ enter: {},
44
+ center: {},
45
+ exit: {
46
+ opacity: 0,
47
+ y: `${-CARD_STATUS_OFFSET_EM}em`,
48
+ filter: `blur(${ARC_BLUR.subtle}px)`,
49
+ transition: {
50
+ duration: ARC_DURATION.fast,
51
+ ease: [...ARC_EASE.standard]
52
+ }
53
+ }
54
+ };
55
+ const statusWordMotion = {
56
+ enter: {
57
+ opacity: 0,
58
+ y: `${CARD_STATUS_OFFSET_EM}em`,
59
+ filter: `blur(${ARC_BLUR.soft}px)`
60
+ },
61
+ center: (order) => ({
62
+ opacity: 1,
63
+ y: 0,
64
+ filter: "blur(0px)",
65
+ transition: {
66
+ duration: ARC_DURATION.standard,
67
+ ease: [...ARC_EASE.enter],
68
+ delay: order * CARD_STATUS_WORD_STAGGER_S
69
+ }
70
+ })
71
+ };
72
+ /** The animated heading element of each title level. */
73
+ const MOTION_HEADING = {
74
+ 2: motion.h2,
75
+ 3: motion.h3,
76
+ 4: motion.h4
77
+ };
78
+ /** Splits a status into words and the spaces between them, so each word can rise on its own. */
79
+ const STATUS_WORD_SEPARATOR = /(\s+)/;
80
+ /** Card surface. The outline is a 1px ring in the border token, so Arc's hover shadow (`--shadow-raised`, arriving
81
+ * with the 2px lift and the strong border) stacks on it, and isolation keeps the rounded clip on media while the card
82
+ * lifts (Safari drops it otherwise). */
83
+ const cardClassName = "group/card relative isolate flex min-w-0 flex-col overflow-hidden rounded-(--radius-panel) bg-surface text-sm text-foreground ring-1 ring-border has-[[data-slot=card-trigger]:focus-visible]:ring-border-strong transition-[box-shadow] duration-(--duration-standard) ease-(--ease-standard) motion-safe:transition-[translate,box-shadow] motion-safe:duration-(--duration-spring) motion-safe:ease-(--ease-spring) hover-fine:has-[a,button]:ring-border-strong hover-fine:has-[a,button]:shadow-(--shadow-raised) hover-fine:has-[a,button]:motion-safe:-translate-y-0.5";
84
+ const titleClassName = "m-0 w-fit max-w-full font-sans text-lg leading-[1.3] font-medium tracking-(--tracking-body) text-balance";
85
+ const descriptionClassName = "m-0 mt-(--space-2) max-w-[34ch] text-sm leading-(--leading-body) text-pretty text-text-secondary";
86
+ /**
87
+ * Arc's status line: the full text for assistive technology, and a decorative copy whose words rise in when it changes.
88
+ * @param props - The status text and whether motion is reduced.
89
+ * @returns The polite status region.
90
+ */
91
+ function CardStatus(t0) {
92
+ const $ = _c(12);
93
+ const { text, reduceMotion } = t0;
94
+ let t1;
95
+ if ($[0] !== text) {
96
+ t1 = /* @__PURE__ */ _jsx("span", {
97
+ className: "sr-only",
98
+ children: text
99
+ });
100
+ $[0] = text;
101
+ $[1] = t1;
102
+ } else {
103
+ t1 = $[1];
104
+ }
105
+ const t2 = reduceMotion ? false : "enter";
106
+ const t3 = reduceMotion ? undefined : "exit";
107
+ let t4;
108
+ if ($[2] !== text) {
109
+ t4 = text.split(STATUS_WORD_SEPARATOR).map(_temp);
110
+ $[2] = text;
111
+ $[3] = t4;
112
+ } else {
113
+ t4 = $[3];
114
+ }
115
+ let t5;
116
+ if ($[4] !== t2 || $[5] !== t3 || $[6] !== t4 || $[7] !== text) {
117
+ t5 = /* @__PURE__ */ _jsx("span", {
118
+ "aria-hidden": "true",
119
+ className: "relative block",
120
+ children: /* @__PURE__ */ _jsx(AnimatePresence, {
121
+ mode: "popLayout",
122
+ initial: false,
123
+ children: /* @__PURE__ */ _jsx(motion.span, {
124
+ className: "block overflow-x-clip text-ellipsis",
125
+ variants: statusLineMotion,
126
+ initial: t2,
127
+ animate: "center",
128
+ exit: t3,
129
+ children: t4
130
+ }, text)
131
+ })
132
+ });
133
+ $[4] = t2;
134
+ $[5] = t3;
135
+ $[6] = t4;
136
+ $[7] = text;
137
+ $[8] = t5;
138
+ } else {
139
+ t5 = $[8];
140
+ }
141
+ let t6;
142
+ if ($[9] !== t1 || $[10] !== t5) {
143
+ t6 = /* @__PURE__ */ _jsxs("span", {
144
+ "data-slot": "card-status",
145
+ role: "status",
146
+ className: "relative overflow-x-clip text-text-muted tabular-nums whitespace-nowrap",
147
+ children: [t1, t5]
148
+ });
149
+ $[9] = t1;
150
+ $[10] = t5;
151
+ $[11] = t6;
152
+ } else {
153
+ t6 = $[11];
154
+ }
155
+ return t6;
156
+ }
157
+ function _temp(part, index) {
158
+ return /* @__PURE__ */ _jsx(motion.span, {
159
+ className: "inline-block whitespace-pre",
160
+ custom: index / 2,
161
+ variants: statusWordMotion,
162
+ children: part
163
+ }, index);
164
+ }
165
+ /**
166
+ * Reads a radius back in pixels: Motion only scale-corrects pixel radii, so token radii are converted for the morph.
167
+ * @param node - Element whose document gives the root font size.
168
+ * @param value - Computed radius, in pixels or rem.
169
+ * @returns The radius in pixels, or `undefined` when it is not a length.
170
+ */
171
+ function toPixels(node, value) {
172
+ const amount = parseFloat(value);
173
+ if (!Number.isFinite(amount)) return undefined;
174
+ return value.trim().endsWith("rem") ? amount * parseFloat(getComputedStyle(node.ownerDocument.documentElement).fontSize) : amount;
175
+ }
176
+ /**
177
+ * Tells whether an optional slot was given: `0` and `""` are content, while `undefined`, `null` and `false` leave it out.
178
+ * @param node - Slot content.
179
+ * @returns Whether the slot renders.
180
+ */
181
+ function hasContent(node) {
182
+ return node !== undefined && node !== null && node !== false;
183
+ }
184
+ /**
185
+ * A content card with optional media, byline, action and footer that can grow into a quick look dialog.
186
+ * @param props - Arc's card content and quick look state, the heading level, a footer and native article attributes.
187
+ * @returns The card article, wrapped in its quick look dialog when `details` is set.
188
+ */
189
+ function Card(t0) {
190
+ const $ = _c(131);
191
+ let action;
192
+ let avatar;
193
+ let children;
194
+ let className;
195
+ let description;
196
+ let details;
197
+ let footer;
198
+ let media;
199
+ let meta;
200
+ let onOpenChange;
201
+ let openProp;
202
+ let props;
203
+ let ref;
204
+ let status;
205
+ let style;
206
+ let t1;
207
+ let t2;
208
+ let title;
209
+ if ($[0] !== t0) {
210
+ ({title, description, media, action, avatar, meta, status, details, open: openProp, defaultOpen: t1, onOpenChange, footer, headingLevel: t2, children, className, style, ref, ...props} = t0);
211
+ $[0] = t0;
212
+ $[1] = action;
213
+ $[2] = avatar;
214
+ $[3] = children;
215
+ $[4] = className;
216
+ $[5] = description;
217
+ $[6] = details;
218
+ $[7] = footer;
219
+ $[8] = media;
220
+ $[9] = meta;
221
+ $[10] = onOpenChange;
222
+ $[11] = openProp;
223
+ $[12] = props;
224
+ $[13] = ref;
225
+ $[14] = status;
226
+ $[15] = style;
227
+ $[16] = t1;
228
+ $[17] = t2;
229
+ $[18] = title;
230
+ } else {
231
+ action = $[1];
232
+ avatar = $[2];
233
+ children = $[3];
234
+ className = $[4];
235
+ description = $[5];
236
+ details = $[6];
237
+ footer = $[7];
238
+ media = $[8];
239
+ meta = $[9];
240
+ onOpenChange = $[10];
241
+ openProp = $[11];
242
+ props = $[12];
243
+ ref = $[13];
244
+ status = $[14];
245
+ style = $[15];
246
+ t1 = $[16];
247
+ t2 = $[17];
248
+ title = $[18];
249
+ }
250
+ const defaultOpen = t1 === undefined ? false : t1;
251
+ const headingLevel = t2 === undefined ? CARD_DEFAULT_HEADING_LEVEL : t2;
252
+ const reduceMotion = usePrefersReducedMotion();
253
+ const layoutGroupId = useId();
254
+ const [cardNode, attachCard] = useAttachedElement(ref);
255
+ const descriptionRef = useRef(null);
256
+ const quickLookRef = useRef(null);
257
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
258
+ let t3;
259
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
260
+ t3 = {};
261
+ $[19] = t3;
262
+ } else {
263
+ t3 = $[19];
264
+ }
265
+ const [geometry, setGeometry] = useState(t3);
266
+ const [landing, setLanding] = useState(null);
267
+ let t4;
268
+ if ($[20] !== details || $[21] !== title) {
269
+ t4 = hasContent(details) && hasContent(title);
270
+ $[20] = details;
271
+ $[21] = title;
272
+ $[22] = t4;
273
+ } else {
274
+ t4 = $[22];
275
+ }
276
+ const hasQuickLook = t4;
277
+ const isOpen = hasQuickLook ? openProp ?? uncontrolledOpen : false;
278
+ const shouldMorph = hasQuickLook && !reduceMotion;
279
+ const isReturning = !isOpen && landing !== null;
280
+ let t5;
281
+ if ($[23] !== description) {
282
+ t5 = hasContent(description);
283
+ $[23] = description;
284
+ $[24] = t5;
285
+ } else {
286
+ t5 = $[24];
287
+ }
288
+ const hasDescription = t5;
289
+ const MotionHeading = MOTION_HEADING[headingLevel];
290
+ let t6;
291
+ if ($[25] !== onOpenChange || $[26] !== openProp) {
292
+ t6 = (nextOpen) => {
293
+ if (openProp === undefined) {
294
+ setUncontrolledOpen(nextOpen);
295
+ }
296
+ onOpenChange?.(nextOpen);
297
+ };
298
+ $[25] = onOpenChange;
299
+ $[26] = openProp;
300
+ $[27] = t6;
301
+ } else {
302
+ t6 = $[27];
303
+ }
304
+ const setOpen = t6;
305
+ let t7;
306
+ if ($[28] !== cardNode || $[29] !== shouldMorph) {
307
+ t7 = () => {
308
+ const node = cardNode;
309
+ const text = descriptionRef.current;
310
+ if (!shouldMorph || !node || typeof ResizeObserver === "undefined") {
311
+ return;
312
+ }
313
+ const observer = new ResizeObserver(() => {
314
+ const computed = getComputedStyle(node);
315
+ const cardRadius = toPixels(node, computed.borderTopLeftRadius);
316
+ const panelRadius = toPixels(node, computed.getPropertyValue("--radius-surface"));
317
+ const measure = text?.offsetWidth || undefined;
318
+ setGeometry((current) => current.card !== undefined && current.measure === measure ? current : {
319
+ card: current.card ?? cardRadius,
320
+ panel: current.panel ?? panelRadius,
321
+ measure
322
+ });
323
+ });
324
+ observer.observe(node);
325
+ if (text) {
326
+ observer.observe(text);
327
+ }
328
+ return () => observer.disconnect();
329
+ };
330
+ $[28] = cardNode;
331
+ $[29] = shouldMorph;
332
+ $[30] = t7;
333
+ } else {
334
+ t7 = $[30];
335
+ }
336
+ let t8;
337
+ if ($[31] !== cardNode || $[32] !== hasDescription || $[33] !== shouldMorph) {
338
+ t8 = [
339
+ shouldMorph,
340
+ hasDescription,
341
+ cardNode
342
+ ];
343
+ $[31] = cardNode;
344
+ $[32] = hasDescription;
345
+ $[33] = shouldMorph;
346
+ $[34] = t8;
347
+ } else {
348
+ t8 = $[34];
349
+ }
350
+ useEffect(t7, t8);
351
+ const wasOpen = useRef(isOpen);
352
+ let t10;
353
+ let t9;
354
+ if ($[35] !== cardNode || $[36] !== isOpen || $[37] !== shouldMorph) {
355
+ t9 = () => {
356
+ const hasClosed = wasOpen.current && !isOpen;
357
+ wasOpen.current = isOpen;
358
+ const node_0 = cardNode;
359
+ if (isOpen) {
360
+ setLanding(null);
361
+ } else {
362
+ if (hasClosed && shouldMorph && node_0) {
363
+ const box = node_0.getBoundingClientRect();
364
+ setLanding({
365
+ top: box.top,
366
+ left: box.left,
367
+ width: box.width,
368
+ height: box.height
369
+ });
370
+ }
371
+ }
372
+ };
373
+ t10 = [
374
+ isOpen,
375
+ shouldMorph,
376
+ cardNode
377
+ ];
378
+ $[35] = cardNode;
379
+ $[36] = isOpen;
380
+ $[37] = shouldMorph;
381
+ $[38] = t10;
382
+ $[39] = t9;
383
+ } else {
384
+ t10 = $[38];
385
+ t9 = $[39];
386
+ }
387
+ useLayoutEffect(t9, t10);
388
+ let t11;
389
+ let t12;
390
+ if ($[40] !== isOpen) {
391
+ t11 = () => {
392
+ const panel = quickLookRef.current;
393
+ if (!panel) {
394
+ return;
395
+ }
396
+ panel.toggleAttribute("inert", !isOpen);
397
+ if (isOpen) {
398
+ panel.removeAttribute("aria-hidden");
399
+ } else {
400
+ panel.setAttribute("aria-hidden", "true");
401
+ }
402
+ };
403
+ t12 = [isOpen];
404
+ $[40] = isOpen;
405
+ $[41] = t11;
406
+ $[42] = t12;
407
+ } else {
408
+ t11 = $[41];
409
+ t12 = $[42];
410
+ }
411
+ useLayoutEffect(t11, t12);
412
+ let t13;
413
+ let t14;
414
+ if ($[43] !== isReturning) {
415
+ t13 = () => {
416
+ if (!isReturning) {
417
+ return;
418
+ }
419
+ const timer = window.setTimeout(() => setLanding(null), CARD_RETURN_MS);
420
+ return () => window.clearTimeout(timer);
421
+ };
422
+ t14 = [isReturning];
423
+ $[43] = isReturning;
424
+ $[44] = t13;
425
+ $[45] = t14;
426
+ } else {
427
+ t13 = $[44];
428
+ t14 = $[45];
429
+ }
430
+ useEffect(t13, t14);
431
+ let t15;
432
+ if ($[46] !== isOpen || $[47] !== isReturning || $[48] !== shouldMorph) {
433
+ t15 = (id, side, t16) => {
434
+ const layout = t16 === undefined ? true : t16;
435
+ return shouldMorph ? {
436
+ layoutId: id,
437
+ layout,
438
+ layoutCrossfade: false,
439
+ layoutDependency: side === "card" ? isOpen : isReturning ? "return" : "panel",
440
+ transition: { layout: side === "card" ? settle : grow }
441
+ } : {};
442
+ };
443
+ $[46] = isOpen;
444
+ $[47] = isReturning;
445
+ $[48] = shouldMorph;
446
+ $[49] = t15;
447
+ } else {
448
+ t15 = $[49];
449
+ }
450
+ const shared = t15;
451
+ let t16;
452
+ if ($[50] !== action || $[51] !== avatar || $[52] !== meta || $[53] !== reduceMotion || $[54] !== shared || $[55] !== status) {
453
+ t16 = (side_0) => {
454
+ const bylineAvatar = side_0 === "card" ? avatar : null;
455
+ const bylineAction = side_0 === "card" ? action : null;
456
+ return bylineAvatar || meta || status || bylineAction ? /* @__PURE__ */ _jsxs("div", {
457
+ "data-slot": "card-byline",
458
+ className: "mt-(--space-5) flex items-center justify-between gap-(--space-3)",
459
+ children: [bylineAvatar || meta || status ? /* @__PURE__ */ _jsxs(motion.div, {
460
+ className: "flex min-w-0 flex-auto items-center gap-(--space-3)",
461
+ ...shared("byline", side_0, "position"),
462
+ children: [bylineAvatar ? /* @__PURE__ */ _jsx("span", {
463
+ className: "grid size-(--space-8) flex-none overflow-hidden rounded-(--radius-pill) bg-surface-muted *:size-full *:object-cover",
464
+ children: bylineAvatar
465
+ }) : null, /* @__PURE__ */ _jsxs("span", {
466
+ className: "grid min-w-0 grid-cols-[minmax(0,1fr)] text-xs leading-(--leading-body)",
467
+ children: [meta ? /* @__PURE__ */ _jsx("span", {
468
+ className: "overflow-hidden font-medium text-ellipsis whitespace-nowrap text-foreground",
469
+ children: meta
470
+ }) : null, status ? /* @__PURE__ */ _jsx(CardStatus, {
471
+ text: status,
472
+ reduceMotion
473
+ }) : null]
474
+ })]
475
+ }) : null, bylineAction ? /* @__PURE__ */ _jsx(motion.div, {
476
+ "data-slot": "card-action",
477
+ className: "relative z-1 flex flex-none flex-wrap gap-(--space-3)",
478
+ ...shared("action", side_0, "position"),
479
+ children: bylineAction
480
+ }) : null]
481
+ }) : null;
482
+ };
483
+ $[50] = action;
484
+ $[51] = avatar;
485
+ $[52] = meta;
486
+ $[53] = reduceMotion;
487
+ $[54] = shared;
488
+ $[55] = status;
489
+ $[56] = t16;
490
+ } else {
491
+ t16 = $[56];
492
+ }
493
+ const byline = t16;
494
+ let t17;
495
+ if ($[57] !== footer) {
496
+ t17 = footer ? /* @__PURE__ */ _jsx("div", {
497
+ "data-slot": "card-footer",
498
+ className: "relative z-1 mt-(--space-5) flex items-center justify-between gap-(--space-3)",
499
+ children: footer
500
+ }) : null;
501
+ $[57] = footer;
502
+ $[58] = t17;
503
+ } else {
504
+ t17 = $[58];
505
+ }
506
+ const footerRow = t17;
507
+ const t18 = props;
508
+ let t19;
509
+ if ($[59] !== className) {
510
+ t19 = cn(cardClassName, className);
511
+ $[59] = className;
512
+ $[60] = t19;
513
+ } else {
514
+ t19 = $[60];
515
+ }
516
+ const t20 = geometry.card ?? style?.borderRadius;
517
+ let t21;
518
+ if ($[61] !== style || $[62] !== t20) {
519
+ t21 = {
520
+ ...style,
521
+ borderRadius: t20
522
+ };
523
+ $[61] = style;
524
+ $[62] = t20;
525
+ $[63] = t21;
526
+ } else {
527
+ t21 = $[63];
528
+ }
529
+ let t22;
530
+ if ($[64] !== shared) {
531
+ t22 = shared("card", "card");
532
+ $[64] = shared;
533
+ $[65] = t22;
534
+ } else {
535
+ t22 = $[65];
536
+ }
537
+ let t23;
538
+ if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
539
+ t23 = {
540
+ default: ARC_SPRING_SNAPPY,
541
+ layout: settle
542
+ };
543
+ $[66] = t23;
544
+ } else {
545
+ t23 = $[66];
546
+ }
547
+ let t24;
548
+ if ($[67] !== media || $[68] !== shared) {
549
+ t24 = media ? /* @__PURE__ */ _jsx(motion.div, {
550
+ "data-slot": "card-media",
551
+ className: "relative overflow-hidden bg-surface-muted",
552
+ ...shared("media", "card"),
553
+ children: /* @__PURE__ */ _jsx("div", {
554
+ className: "grid min-h-28 place-items-center transition-transform duration-(--duration-considered) ease-(--ease-standard) motion-reduce:transition-none pointer-fine:group-hover/card:scale-[1.04] pointer-fine:group-hover/card:duration-[calc(var(--duration-considered)*2)] motion-reduce:scale-100! [&>img]:size-full [&>img]:object-cover",
555
+ children: media
556
+ })
557
+ }) : null;
558
+ $[67] = media;
559
+ $[68] = shared;
560
+ $[69] = t24;
561
+ } else {
562
+ t24 = $[69];
563
+ }
564
+ let t25;
565
+ if ($[70] !== MotionHeading || $[71] !== hasQuickLook || $[72] !== shared || $[73] !== title) {
566
+ t25 = title !== undefined && title !== null ? /* @__PURE__ */ _jsx(MotionHeading, {
567
+ "data-slot": "card-title",
568
+ className: titleClassName,
569
+ ...shared("title", "card"),
570
+ children: hasQuickLook ? /* @__PURE__ */ _jsx(DialogPrimitive.Trigger, {
571
+ asChild: true,
572
+ children: /* @__PURE__ */ _jsx("button", {
573
+ type: "button",
574
+ "data-slot": "card-trigger",
575
+ className: "cursor-pointer border-0 bg-transparent p-0 text-left [font:inherit] [letter-spacing:inherit] text-inherit [-webkit-tap-highlight-color:transparent] after:absolute after:inset-0 after:content-[''] focus-visible:outline-none",
576
+ children: title
577
+ })
578
+ }) : title
579
+ }) : null;
580
+ $[70] = MotionHeading;
581
+ $[71] = hasQuickLook;
582
+ $[72] = shared;
583
+ $[73] = title;
584
+ $[74] = t25;
585
+ } else {
586
+ t25 = $[74];
587
+ }
588
+ let t26;
589
+ if ($[75] !== description || $[76] !== hasDescription || $[77] !== shared) {
590
+ t26 = hasDescription ? /* @__PURE__ */ _jsx(motion.p, {
591
+ ref: descriptionRef,
592
+ "data-slot": "card-description",
593
+ className: descriptionClassName,
594
+ ...shared("description", "card", "position"),
595
+ children: description
596
+ }) : null;
597
+ $[75] = description;
598
+ $[76] = hasDescription;
599
+ $[77] = shared;
600
+ $[78] = t26;
601
+ } else {
602
+ t26 = $[78];
603
+ }
604
+ let t27;
605
+ if ($[79] !== children || $[80] !== hasQuickLook) {
606
+ t27 = hasQuickLook && children ? /* @__PURE__ */ _jsx("div", {
607
+ "data-slot": "card-body",
608
+ className: "pointer-events-none relative z-1 [&_:is(a,button,input,select,textarea,label,summary,iframe,video,audio,[tabindex],[contenteditable])]:pointer-events-auto",
609
+ children
610
+ }) : children;
611
+ $[79] = children;
612
+ $[80] = hasQuickLook;
613
+ $[81] = t27;
614
+ } else {
615
+ t27 = $[81];
616
+ }
617
+ let t28;
618
+ if ($[82] !== byline) {
619
+ t28 = byline("card");
620
+ $[82] = byline;
621
+ $[83] = t28;
622
+ } else {
623
+ t28 = $[83];
624
+ }
625
+ let t29;
626
+ if ($[84] !== footerRow || $[85] !== t25 || $[86] !== t26 || $[87] !== t27 || $[88] !== t28) {
627
+ t29 = /* @__PURE__ */ _jsxs("div", {
628
+ "data-slot": "card-content",
629
+ className: "p-(--space-5)",
630
+ children: [
631
+ t25,
632
+ t26,
633
+ t27,
634
+ t28,
635
+ footerRow
636
+ ]
637
+ });
638
+ $[84] = footerRow;
639
+ $[85] = t25;
640
+ $[86] = t26;
641
+ $[87] = t27;
642
+ $[88] = t28;
643
+ $[89] = t29;
644
+ } else {
645
+ t29 = $[89];
646
+ }
647
+ let t30;
648
+ if ($[90] !== attachCard || $[91] !== t18 || $[92] !== t19 || $[93] !== t21 || $[94] !== t22 || $[95] !== t24 || $[96] !== t29) {
649
+ t30 = /* @__PURE__ */ _jsxs(motion.article, {
650
+ ...t18,
651
+ ref: attachCard,
652
+ "data-slot": "card",
653
+ className: t19,
654
+ style: t21,
655
+ ...t22,
656
+ transition: t23,
657
+ children: [t24, t29]
658
+ });
659
+ $[90] = attachCard;
660
+ $[91] = t18;
661
+ $[92] = t19;
662
+ $[93] = t21;
663
+ $[94] = t22;
664
+ $[95] = t24;
665
+ $[96] = t29;
666
+ $[97] = t30;
667
+ } else {
668
+ t30 = $[97];
669
+ }
670
+ const card = t30;
671
+ if (!hasQuickLook) {
672
+ return card;
673
+ }
674
+ const t31 = geometry.measure ? `${geometry.measure}px` : undefined;
675
+ let t32;
676
+ if ($[98] !== isReturning || $[99] !== landing) {
677
+ t32 = landing && isReturning ? {
678
+ "--landing-top": `${landing.top}px`,
679
+ "--landing-left": `${landing.left}px`,
680
+ "--landing-width": `${landing.width}px`,
681
+ "--landing-height": `${landing.height}px`
682
+ } : {};
683
+ $[98] = isReturning;
684
+ $[99] = landing;
685
+ $[100] = t32;
686
+ } else {
687
+ t32 = $[100];
688
+ }
689
+ let t33;
690
+ if ($[101] !== geometry.panel || $[102] !== t31 || $[103] !== t32) {
691
+ t33 = {
692
+ borderRadius: geometry.panel,
693
+ "--card-measure": t31,
694
+ ...t32
695
+ };
696
+ $[101] = geometry.panel;
697
+ $[102] = t31;
698
+ $[103] = t32;
699
+ $[104] = t33;
700
+ } else {
701
+ t33 = $[104];
702
+ }
703
+ const panelStyle = t33;
704
+ let t34;
705
+ if ($[105] !== byline || $[106] !== description || $[107] !== details || $[108] !== geometry.card || $[109] !== geometry.panel || $[110] !== hasDescription || $[111] !== isOpen || $[112] !== isReturning || $[113] !== layoutGroupId || $[114] !== media || $[115] !== panelStyle || $[116] !== reduceMotion || $[117] !== shared || $[118] !== shouldMorph || $[119] !== title) {
706
+ t34 = isOpen || isReturning ? /* @__PURE__ */ _jsxs(DialogPrimitive.Portal, {
707
+ forceMount: true,
708
+ children: [/* @__PURE__ */ _jsx(AnimatePresence, { children: isOpen ? /* @__PURE__ */ _jsx(DialogPrimitive.Overlay, {
709
+ asChild: true,
710
+ forceMount: true,
711
+ children: /* @__PURE__ */ _jsx(motion.div, {
712
+ "data-slot": "card-quick-look-overlay",
713
+ className: "fixed inset-0 z-50 bg-[oklch(10%_0_0/0.46)] supports-backdrop-filter:backdrop-blur-[7px]",
714
+ initial: { opacity: 0 },
715
+ animate: { opacity: 1 },
716
+ exit: {
717
+ opacity: 0,
718
+ transition: reduceMotion ? fade : {
719
+ duration: ARC_DURATION.exit,
720
+ ease: [...ARC_EASE.standard]
721
+ }
722
+ },
723
+ transition: reduceMotion ? fade : {
724
+ duration: ARC_DURATION.standard,
725
+ ease: [...ARC_EASE.enter]
726
+ }
727
+ })
728
+ }, "overlay") : null }), /* @__PURE__ */ _jsx(DialogPrimitive.Content, {
729
+ asChild: true,
730
+ forceMount: true,
731
+ ...hasDescription ? {} : { "aria-describedby": undefined },
732
+ children: /* @__PURE__ */ _jsxs(motion.div, {
733
+ ref: quickLookRef,
734
+ "data-slot": "card-quick-look",
735
+ "data-returning": isReturning || undefined,
736
+ className: "group/quick-look fixed inset-0 z-50 m-auto h-fit max-h-[calc(100dvh-var(--space-8))] w-[min(calc(100vw-var(--space-8)),30rem)] overflow-x-hidden overflow-y-auto overscroll-contain rounded-(--radius-surface) border border-border bg-surface-raised text-sm text-foreground shadow-(--shadow-floating) transition-[background-color,box-shadow] duration-(--duration-standard) ease-(--ease-standard) focus:outline-none data-returning:pointer-events-none data-returning:inset-auto data-returning:top-(--landing-top) data-returning:left-(--landing-left) data-returning:m-0 data-returning:h-(--landing-height) data-returning:max-h-none data-returning:w-(--landing-width) data-returning:overflow-hidden data-returning:bg-surface data-returning:shadow-none",
737
+ "data-framer-portal-id": layoutGroupId,
738
+ layoutScroll: true,
739
+ style: panelStyle,
740
+ ...shouldMorph ? {
741
+ ...shared("card", "panel"),
742
+ initial: false,
743
+ animate: geometry.card !== undefined && geometry.panel !== undefined ? { borderRadius: isReturning ? geometry.card : geometry.panel } : undefined,
744
+ transition: {
745
+ layout: isReturning ? settle : grow,
746
+ borderRadius: isReturning ? settle : grow
747
+ },
748
+ exit: {
749
+ opacity: 0,
750
+ transition: { duration: 0 }
751
+ }
752
+ } : {
753
+ initial: { opacity: 0 },
754
+ animate: { opacity: 1 },
755
+ exit: {
756
+ opacity: 0,
757
+ transition: fade
758
+ },
759
+ transition: fade
760
+ },
761
+ children: [
762
+ media ? /* @__PURE__ */ _jsx(motion.div, {
763
+ className: "relative overflow-hidden bg-surface-muted",
764
+ ...shared("media", "panel"),
765
+ children: /* @__PURE__ */ _jsx("div", {
766
+ className: "grid min-h-28 place-items-center [&>img]:size-full [&>img]:object-cover",
767
+ children: media
768
+ })
769
+ }) : null,
770
+ /* @__PURE__ */ _jsx(motion.span, {
771
+ className: "absolute top-(--space-4) right-(--space-4) z-2 grid",
772
+ initial: reduceMotion ? { opacity: 0 } : {
773
+ opacity: 0,
774
+ scale: CARD_CLOSE_HIDDEN_SCALE
775
+ },
776
+ animate: isReturning ? {
777
+ opacity: 0,
778
+ scale: CARD_CLOSE_HIDDEN_SCALE
779
+ } : {
780
+ opacity: 1,
781
+ scale: 1
782
+ },
783
+ transition: isReturning || reduceMotion ? fade : closeIn,
784
+ children: /* @__PURE__ */ _jsx(DialogPrimitive.Close, {
785
+ asChild: true,
786
+ children: /* @__PURE__ */ _jsx(motion.button, {
787
+ type: "button",
788
+ "data-slot": "card-quick-look-close",
789
+ "aria-label": CARD_CLOSE_LABEL,
790
+ className: "grid size-(--space-8) cursor-pointer place-items-center rounded-(--radius-pill) border border-[color-mix(in_oklab,var(--border)_70%,transparent)] bg-[color-mix(in_oklab,var(--surface-raised)_74%,transparent)] p-0 text-foreground [-webkit-tap-highlight-color:transparent] backdrop-blur-[12px] transition-[background-color] duration-(--duration-fast) ease-(--ease-standard) hover-fine:bg-surface-raised",
791
+ whileTap: reduceMotion ? undefined : { scale: CARD_CLOSE_PRESS_SCALE },
792
+ transition: ARC_SPRING_SNAPPY,
793
+ children: /* @__PURE__ */ _jsx(X, {
794
+ className: "size-4",
795
+ strokeWidth: 1.75,
796
+ "aria-hidden": "true"
797
+ })
798
+ })
799
+ })
800
+ }),
801
+ /* @__PURE__ */ _jsxs("div", {
802
+ className: "p-(--space-6) group-data-returning/quick-look:p-(--space-5)",
803
+ children: [
804
+ /* @__PURE__ */ _jsx(DialogPrimitive.Title, {
805
+ asChild: true,
806
+ children: /* @__PURE__ */ _jsx(motion.h2, {
807
+ className: cn(titleClassName, "text-xl group-data-returning/quick-look:text-lg"),
808
+ ...shared("title", "panel"),
809
+ children: title
810
+ })
811
+ }),
812
+ hasDescription ? /* @__PURE__ */ _jsx(DialogPrimitive.Description, {
813
+ asChild: true,
814
+ children: /* @__PURE__ */ _jsx(motion.p, {
815
+ className: cn(descriptionClassName, "max-w-[var(--card-measure,34ch)]"),
816
+ ...shared("description", "panel", "position"),
817
+ children: description
818
+ })
819
+ }) : null,
820
+ byline("panel"),
821
+ /* @__PURE__ */ _jsx(motion.div, {
822
+ "data-slot": "card-details",
823
+ className: "mt-(--space-6) border-t border-border pt-(--space-5) text-sm leading-(--leading-body) text-text-secondary",
824
+ initial: reduceMotion ? false : {
825
+ opacity: 0,
826
+ y: CARD_DETAILS_OFFSET_PX
827
+ },
828
+ animate: isReturning ? {
829
+ opacity: 0,
830
+ y: 0
831
+ } : {
832
+ opacity: 1,
833
+ y: 0
834
+ },
835
+ exit: {
836
+ opacity: 0,
837
+ transition: fade
838
+ },
839
+ transition: isReturning || reduceMotion ? fade : reveal,
840
+ children: details
841
+ })
842
+ ]
843
+ })
844
+ ]
845
+ })
846
+ })]
847
+ }, "quick-look") : null;
848
+ $[105] = byline;
849
+ $[106] = description;
850
+ $[107] = details;
851
+ $[108] = geometry.card;
852
+ $[109] = geometry.panel;
853
+ $[110] = hasDescription;
854
+ $[111] = isOpen;
855
+ $[112] = isReturning;
856
+ $[113] = layoutGroupId;
857
+ $[114] = media;
858
+ $[115] = panelStyle;
859
+ $[116] = reduceMotion;
860
+ $[117] = shared;
861
+ $[118] = shouldMorph;
862
+ $[119] = title;
863
+ $[120] = t34;
864
+ } else {
865
+ t34 = $[120];
866
+ }
867
+ let t35;
868
+ if ($[121] !== t34) {
869
+ t35 = /* @__PURE__ */ _jsx(AnimatePresence, { children: t34 });
870
+ $[121] = t34;
871
+ $[122] = t35;
872
+ } else {
873
+ t35 = $[122];
874
+ }
875
+ let t36;
876
+ if ($[123] !== card || $[124] !== layoutGroupId || $[125] !== t35) {
877
+ t36 = /* @__PURE__ */ _jsxs(LayoutGroup, {
878
+ id: layoutGroupId,
879
+ children: [card, t35]
880
+ });
881
+ $[123] = card;
882
+ $[124] = layoutGroupId;
883
+ $[125] = t35;
884
+ $[126] = t36;
885
+ } else {
886
+ t36 = $[126];
887
+ }
888
+ let t37;
889
+ if ($[127] !== isOpen || $[128] !== setOpen || $[129] !== t36) {
890
+ t37 = /* @__PURE__ */ _jsx(DialogPrimitive.Root, {
891
+ open: isOpen,
892
+ onOpenChange: setOpen,
893
+ children: t36
894
+ });
895
+ $[127] = isOpen;
896
+ $[128] = setOpen;
897
+ $[129] = t36;
898
+ $[130] = t37;
899
+ } else {
900
+ t37 = $[130];
901
+ }
902
+ return t37;
903
+ }
904
+ export { Card };