@astra-kit/ui 0.0.0-stage → 1.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 +21 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +330 -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 +58 -0
  55. package/dist/components/dropdown-menu.js +135 -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 +17 -0
  177. package/dist/constants/dropdown-menu.js +48 -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,629 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ /**
4
+ * Internal confirmation composition on Arc's Dialog surface (https://uiarc.dev, MIT License, see
5
+ * THIRD_PARTY_NOTICES.md): Radix's alert dialog parts on the same overlay, raised panel, title and description type as
6
+ * the dialog primitive, so both read as one family, with Arc's dialog transition, media slot and Arc `Button`
7
+ * actions. Not exported from the package: the public `Dialog` uses it for its `alert` mode.
8
+ */
9
+ import * as React from "react";
10
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
11
+ import { MotionSlot } from "../../motion/motion-slot.js";
12
+ import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../../motion/presence.js";
13
+ import { cn } from "../../lib/utils.js";
14
+ import { Button } from "../button.js";
15
+ import { DialogSurfaceCloseButton, withDialogSwapText, dialogDescriptionClassName, dialogFooterClassName, dialogOverlayClassName, dialogSurfaceClassName, dialogTitleClassName } from "../dialog-surface.js";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
+ function AlertDialog(t0) {
18
+ const $ = _c(9);
19
+ let props;
20
+ if ($[0] !== t0) {
21
+ ({...props} = t0);
22
+ $[0] = t0;
23
+ $[1] = props;
24
+ } else {
25
+ props = $[1];
26
+ }
27
+ const [motionOpen, setMotionOpen] = useMotionOpenState(props);
28
+ let t1;
29
+ if ($[2] !== motionOpen || $[3] !== props || $[4] !== setMotionOpen) {
30
+ t1 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Root, {
31
+ "data-slot": "alert-dialog",
32
+ ...props,
33
+ open: motionOpen,
34
+ onOpenChange: setMotionOpen
35
+ });
36
+ $[2] = motionOpen;
37
+ $[3] = props;
38
+ $[4] = setMotionOpen;
39
+ $[5] = t1;
40
+ } else {
41
+ t1 = $[5];
42
+ }
43
+ let t2;
44
+ if ($[6] !== motionOpen || $[7] !== t1) {
45
+ t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
46
+ scope: "alert-dialog",
47
+ open: motionOpen,
48
+ children: t1
49
+ });
50
+ $[6] = motionOpen;
51
+ $[7] = t1;
52
+ $[8] = t2;
53
+ } else {
54
+ t2 = $[8];
55
+ }
56
+ return t2;
57
+ }
58
+ function AlertDialogTrigger(t0) {
59
+ const $ = _c(4);
60
+ let props;
61
+ if ($[0] !== t0) {
62
+ ({...props} = t0);
63
+ $[0] = t0;
64
+ $[1] = props;
65
+ } else {
66
+ props = $[1];
67
+ }
68
+ let t1;
69
+ if ($[2] !== props) {
70
+ t1 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Trigger, {
71
+ "data-slot": "alert-dialog-trigger",
72
+ ...props
73
+ });
74
+ $[2] = props;
75
+ $[3] = t1;
76
+ } else {
77
+ t1 = $[3];
78
+ }
79
+ return t1;
80
+ }
81
+ function AlertDialogPortal(t0) {
82
+ const $ = _c(4);
83
+ let props;
84
+ if ($[0] !== t0) {
85
+ ({...props} = t0);
86
+ $[0] = t0;
87
+ $[1] = props;
88
+ } else {
89
+ props = $[1];
90
+ }
91
+ let t1;
92
+ if ($[2] !== props) {
93
+ t1 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Portal, {
94
+ "data-slot": "alert-dialog-portal",
95
+ ...props
96
+ });
97
+ $[2] = props;
98
+ $[3] = t1;
99
+ } else {
100
+ t1 = $[3];
101
+ }
102
+ return t1;
103
+ }
104
+ function AlertDialogOverlay(t0) {
105
+ const $ = _c(8);
106
+ let className;
107
+ let props;
108
+ if ($[0] !== t0) {
109
+ ({className, ...props} = t0);
110
+ $[0] = t0;
111
+ $[1] = className;
112
+ $[2] = props;
113
+ } else {
114
+ className = $[1];
115
+ props = $[2];
116
+ }
117
+ let t1;
118
+ if ($[3] !== className) {
119
+ t1 = cn(dialogOverlayClassName, className);
120
+ $[3] = className;
121
+ $[4] = t1;
122
+ } else {
123
+ t1 = $[4];
124
+ }
125
+ let t2;
126
+ if ($[5] !== props || $[6] !== t1) {
127
+ t2 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Overlay, {
128
+ "data-slot": "alert-dialog-overlay",
129
+ className: t1,
130
+ ...props
131
+ });
132
+ $[5] = props;
133
+ $[6] = t1;
134
+ $[7] = t2;
135
+ } else {
136
+ t2 = $[7];
137
+ }
138
+ return t2;
139
+ }
140
+ /**
141
+ * Renders a compact confirmation while preserving the shared theme and viewport bound.
142
+ * @param props - Primitive properties and optional consumer overrides.
143
+ * @param props.showCloseButton - Whether the confirmation renders a close button, which cancels it. Off by default:
144
+ * a confirmation is answered with its actions.
145
+ * @param props.closeButtonPlacement - `viewport` pins the close button to the viewport corner; `content` (default)
146
+ * keeps it in the panel.
147
+ * @param props.closeLabel - Accessible name of the close button.
148
+ * @param props.closeButtonRef - Ref of the close button, when it is rendered.
149
+ * @returns The styled primitive with its original interaction contract.
150
+ */
151
+ function AlertDialogContent(t0) {
152
+ const $ = _c(28);
153
+ let children;
154
+ let className;
155
+ let closeButtonRef;
156
+ let closeLabel;
157
+ let props;
158
+ let t1;
159
+ let t2;
160
+ let t3;
161
+ if ($[0] !== t0) {
162
+ ({className, size: t1, children, showCloseButton: t2, closeButtonPlacement: t3, closeLabel, closeButtonRef, ...props} = t0);
163
+ $[0] = t0;
164
+ $[1] = children;
165
+ $[2] = className;
166
+ $[3] = closeButtonRef;
167
+ $[4] = closeLabel;
168
+ $[5] = props;
169
+ $[6] = t1;
170
+ $[7] = t2;
171
+ $[8] = t3;
172
+ } else {
173
+ children = $[1];
174
+ className = $[2];
175
+ closeButtonRef = $[3];
176
+ closeLabel = $[4];
177
+ props = $[5];
178
+ t1 = $[6];
179
+ t2 = $[7];
180
+ t3 = $[8];
181
+ }
182
+ const size = t1 === undefined ? "default" : t1;
183
+ const showCloseButton = t2 === undefined ? false : t2;
184
+ const closeButtonPlacement = t3 === undefined ? "content" : t3;
185
+ const t4 = props.forceMount;
186
+ let t5;
187
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
188
+ t5 = /* @__PURE__ */ _jsx(MotionSlot, {
189
+ kind: "overlay",
190
+ children: /* @__PURE__ */ _jsx(AlertDialogOverlay, { forceMount: true })
191
+ });
192
+ $[9] = t5;
193
+ } else {
194
+ t5 = $[9];
195
+ }
196
+ const t6 = showCloseButton ? closeButtonPlacement : undefined;
197
+ const t7 = showCloseButton && closeButtonPlacement === "viewport" ? "inset-0 m-auto h-fit" : "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2";
198
+ let t8;
199
+ if ($[10] !== className || $[11] !== t7) {
200
+ t8 = cn(dialogSurfaceClassName, "group/alert-dialog-content fixed grid max-h-[calc(100svh-2rem)] overflow-y-auto overscroll-contain w-full data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm", t7, className);
201
+ $[10] = className;
202
+ $[11] = t7;
203
+ $[12] = t8;
204
+ } else {
205
+ t8 = $[12];
206
+ }
207
+ let t9;
208
+ if ($[13] !== closeButtonPlacement || $[14] !== closeButtonRef || $[15] !== closeLabel || $[16] !== showCloseButton) {
209
+ t9 = showCloseButton && /* @__PURE__ */ _jsx(DialogSurfaceCloseButton, {
210
+ kind: "alert",
211
+ placement: closeButtonPlacement,
212
+ label: closeLabel,
213
+ buttonRef: closeButtonRef
214
+ });
215
+ $[13] = closeButtonPlacement;
216
+ $[14] = closeButtonRef;
217
+ $[15] = closeLabel;
218
+ $[16] = showCloseButton;
219
+ $[17] = t9;
220
+ } else {
221
+ t9 = $[17];
222
+ }
223
+ let t10;
224
+ if ($[18] !== children || $[19] !== props || $[20] !== size || $[21] !== t6 || $[22] !== t8 || $[23] !== t9) {
225
+ t10 = /* @__PURE__ */ _jsxs(React.Fragment, { children: [t5, /* @__PURE__ */ _jsx(MotionSlot, {
226
+ kind: "dialog",
227
+ children: /* @__PURE__ */ _jsxs(AlertDialogPrimitive.Content, {
228
+ forceMount: true,
229
+ "data-slot": "alert-dialog-content",
230
+ "data-size": size,
231
+ "data-close-button-placement": t6,
232
+ className: t8,
233
+ ...props,
234
+ children: [children, t9]
235
+ })
236
+ })] });
237
+ $[18] = children;
238
+ $[19] = props;
239
+ $[20] = size;
240
+ $[21] = t6;
241
+ $[22] = t8;
242
+ $[23] = t9;
243
+ $[24] = t10;
244
+ } else {
245
+ t10 = $[24];
246
+ }
247
+ let t11;
248
+ if ($[25] !== props.forceMount || $[26] !== t10) {
249
+ t11 = /* @__PURE__ */ _jsx(AlertDialogPortal, {
250
+ forceMount: true,
251
+ children: /* @__PURE__ */ _jsx(MotionPresence, {
252
+ scope: "alert-dialog",
253
+ forceMount: t4,
254
+ children: t10
255
+ })
256
+ });
257
+ $[25] = props.forceMount;
258
+ $[26] = t10;
259
+ $[27] = t11;
260
+ } else {
261
+ t11 = $[27];
262
+ }
263
+ return t11;
264
+ }
265
+ /**
266
+ * Aligns confirmation headings and media with compact spacing.
267
+ * @param props - Primitive properties and optional consumer overrides.
268
+ * @returns The styled primitive with its original interaction contract.
269
+ */
270
+ function AlertDialogHeader(t0) {
271
+ const $ = _c(8);
272
+ let className;
273
+ let props;
274
+ if ($[0] !== t0) {
275
+ ({className, ...props} = t0);
276
+ $[0] = t0;
277
+ $[1] = className;
278
+ $[2] = props;
279
+ } else {
280
+ className = $[1];
281
+ props = $[2];
282
+ }
283
+ let t1;
284
+ if ($[3] !== className) {
285
+ t1 = cn("grid grid-rows-[auto_1fr] place-items-center gap-(--space-2) text-center in-data-[close-button-placement=content]:pr-[calc(var(--space-8)+var(--space-5))] has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className);
286
+ $[3] = className;
287
+ $[4] = t1;
288
+ } else {
289
+ t1 = $[4];
290
+ }
291
+ let t2;
292
+ if ($[5] !== props || $[6] !== t1) {
293
+ t2 = /* @__PURE__ */ _jsx("div", {
294
+ "data-slot": "alert-dialog-header",
295
+ className: t1,
296
+ ...props
297
+ });
298
+ $[5] = props;
299
+ $[6] = t1;
300
+ $[7] = t2;
301
+ } else {
302
+ t2 = $[7];
303
+ }
304
+ return t2;
305
+ }
306
+ /**
307
+ * Separates confirmation actions with an edge-to-edge footer under a hairline, bleeding through the panel padding.
308
+ * @param props - Primitive properties and optional consumer overrides.
309
+ * @returns The styled primitive with its original interaction contract.
310
+ */
311
+ function AlertDialogFooter(t0) {
312
+ const $ = _c(8);
313
+ let className;
314
+ let props;
315
+ if ($[0] !== t0) {
316
+ ({className, ...props} = t0);
317
+ $[0] = t0;
318
+ $[1] = className;
319
+ $[2] = props;
320
+ } else {
321
+ className = $[1];
322
+ props = $[2];
323
+ }
324
+ let t1;
325
+ if ($[3] !== className) {
326
+ t1 = cn(dialogFooterClassName, "group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2", className);
327
+ $[3] = className;
328
+ $[4] = t1;
329
+ } else {
330
+ t1 = $[4];
331
+ }
332
+ let t2;
333
+ if ($[5] !== props || $[6] !== t1) {
334
+ t2 = /* @__PURE__ */ _jsx("div", {
335
+ "data-slot": "alert-dialog-footer",
336
+ className: t1,
337
+ ...props
338
+ });
339
+ $[5] = props;
340
+ $[6] = t1;
341
+ $[7] = t2;
342
+ } else {
343
+ t2 = $[7];
344
+ }
345
+ return t2;
346
+ }
347
+ /**
348
+ * Renders confirmation media at the compact default size.
349
+ * @param props - Primitive properties and optional consumer overrides.
350
+ * @returns The styled primitive with its original interaction contract.
351
+ */
352
+ function AlertDialogMedia(t0) {
353
+ const $ = _c(8);
354
+ let className;
355
+ let props;
356
+ if ($[0] !== t0) {
357
+ ({className, ...props} = t0);
358
+ $[0] = t0;
359
+ $[1] = className;
360
+ $[2] = props;
361
+ } else {
362
+ className = $[1];
363
+ props = $[2];
364
+ }
365
+ let t1;
366
+ if ($[3] !== className) {
367
+ t1 = cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className);
368
+ $[3] = className;
369
+ $[4] = t1;
370
+ } else {
371
+ t1 = $[4];
372
+ }
373
+ let t2;
374
+ if ($[5] !== props || $[6] !== t1) {
375
+ t2 = /* @__PURE__ */ _jsx("div", {
376
+ "data-slot": "alert-dialog-media",
377
+ className: t1,
378
+ ...props
379
+ });
380
+ $[5] = props;
381
+ $[6] = t1;
382
+ $[7] = t2;
383
+ } else {
384
+ t2 = $[7];
385
+ }
386
+ return t2;
387
+ }
388
+ /**
389
+ * Renders the confirmation heading in Arc's title type. Plain text that changes while open swaps with Arc's rise.
390
+ * @param props - Primitive properties and optional consumer overrides.
391
+ * @returns The styled primitive with its original interaction contract.
392
+ */
393
+ function AlertDialogTitle(t0) {
394
+ const $ = _c(13);
395
+ let children;
396
+ let className;
397
+ let props;
398
+ if ($[0] !== t0) {
399
+ ({className, children, ...props} = t0);
400
+ $[0] = t0;
401
+ $[1] = children;
402
+ $[2] = className;
403
+ $[3] = props;
404
+ } else {
405
+ children = $[1];
406
+ className = $[2];
407
+ props = $[3];
408
+ }
409
+ let t1;
410
+ if ($[4] !== className) {
411
+ t1 = cn(dialogTitleClassName, "sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className);
412
+ $[4] = className;
413
+ $[5] = t1;
414
+ } else {
415
+ t1 = $[5];
416
+ }
417
+ let t2;
418
+ if ($[6] !== children || $[7] !== props.asChild) {
419
+ t2 = withDialogSwapText(children, props.asChild);
420
+ $[6] = children;
421
+ $[7] = props.asChild;
422
+ $[8] = t2;
423
+ } else {
424
+ t2 = $[8];
425
+ }
426
+ let t3;
427
+ if ($[9] !== props || $[10] !== t1 || $[11] !== t2) {
428
+ t3 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Title, {
429
+ "data-slot": "alert-dialog-title",
430
+ className: t1,
431
+ ...props,
432
+ children: t2
433
+ });
434
+ $[9] = props;
435
+ $[10] = t1;
436
+ $[11] = t2;
437
+ $[12] = t3;
438
+ } else {
439
+ t3 = $[12];
440
+ }
441
+ return t3;
442
+ }
443
+ /**
444
+ * Renders the confirmation description in Arc's secondary text. Plain text that changes while open swaps with Arc's
445
+ * rise.
446
+ * @param props - Primitive properties and optional consumer overrides.
447
+ * @returns The styled primitive with its original interaction contract.
448
+ */
449
+ function AlertDialogDescription(t0) {
450
+ const $ = _c(13);
451
+ let children;
452
+ let className;
453
+ let props;
454
+ if ($[0] !== t0) {
455
+ ({className, children, ...props} = t0);
456
+ $[0] = t0;
457
+ $[1] = children;
458
+ $[2] = className;
459
+ $[3] = props;
460
+ } else {
461
+ children = $[1];
462
+ className = $[2];
463
+ props = $[3];
464
+ }
465
+ let t1;
466
+ if ($[4] !== className) {
467
+ t1 = cn(dialogDescriptionClassName, "text-balance md:text-pretty", className);
468
+ $[4] = className;
469
+ $[5] = t1;
470
+ } else {
471
+ t1 = $[5];
472
+ }
473
+ let t2;
474
+ if ($[6] !== children || $[7] !== props.asChild) {
475
+ t2 = withDialogSwapText(children, props.asChild);
476
+ $[6] = children;
477
+ $[7] = props.asChild;
478
+ $[8] = t2;
479
+ } else {
480
+ t2 = $[8];
481
+ }
482
+ let t3;
483
+ if ($[9] !== props || $[10] !== t1 || $[11] !== t2) {
484
+ t3 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Description, {
485
+ "data-slot": "alert-dialog-description",
486
+ className: t1,
487
+ ...props,
488
+ children: t2
489
+ });
490
+ $[9] = props;
491
+ $[10] = t1;
492
+ $[11] = t2;
493
+ $[12] = t3;
494
+ } else {
495
+ t3 = $[12];
496
+ }
497
+ return t3;
498
+ }
499
+ /** Confirms the dialog with an Arc `Button`; Radix merges its behavior onto the button through `asChild`. */
500
+ function AlertDialogAction(t0) {
501
+ const $ = _c(16);
502
+ let children;
503
+ let className;
504
+ let props;
505
+ let t1;
506
+ let t2;
507
+ if ($[0] !== t0) {
508
+ ({className, variant: t1, size: t2, children, ...props} = t0);
509
+ $[0] = t0;
510
+ $[1] = children;
511
+ $[2] = className;
512
+ $[3] = props;
513
+ $[4] = t1;
514
+ $[5] = t2;
515
+ } else {
516
+ children = $[1];
517
+ className = $[2];
518
+ props = $[3];
519
+ t1 = $[4];
520
+ t2 = $[5];
521
+ }
522
+ const variant = t1 === undefined ? "primary" : t1;
523
+ const size = t2 === undefined ? "md" : t2;
524
+ let t3;
525
+ if ($[6] !== className) {
526
+ t3 = cn(className);
527
+ $[6] = className;
528
+ $[7] = t3;
529
+ } else {
530
+ t3 = $[7];
531
+ }
532
+ let t4;
533
+ if ($[8] !== children || $[9] !== size || $[10] !== t3 || $[11] !== variant) {
534
+ t4 = /* @__PURE__ */ _jsx(Button, {
535
+ variant,
536
+ size,
537
+ className: t3,
538
+ children
539
+ });
540
+ $[8] = children;
541
+ $[9] = size;
542
+ $[10] = t3;
543
+ $[11] = variant;
544
+ $[12] = t4;
545
+ } else {
546
+ t4 = $[12];
547
+ }
548
+ let t5;
549
+ if ($[13] !== props || $[14] !== t4) {
550
+ t5 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Action, {
551
+ "data-slot": "alert-dialog-action",
552
+ asChild: true,
553
+ ...props,
554
+ children: t4
555
+ });
556
+ $[13] = props;
557
+ $[14] = t4;
558
+ $[15] = t5;
559
+ } else {
560
+ t5 = $[15];
561
+ }
562
+ return t5;
563
+ }
564
+ /** Dismisses the dialog with an Arc secondary `Button` by default. */
565
+ function AlertDialogCancel(t0) {
566
+ const $ = _c(16);
567
+ let children;
568
+ let className;
569
+ let props;
570
+ let t1;
571
+ let t2;
572
+ if ($[0] !== t0) {
573
+ ({className, variant: t1, size: t2, children, ...props} = t0);
574
+ $[0] = t0;
575
+ $[1] = children;
576
+ $[2] = className;
577
+ $[3] = props;
578
+ $[4] = t1;
579
+ $[5] = t2;
580
+ } else {
581
+ children = $[1];
582
+ className = $[2];
583
+ props = $[3];
584
+ t1 = $[4];
585
+ t2 = $[5];
586
+ }
587
+ const variant = t1 === undefined ? "secondary" : t1;
588
+ const size = t2 === undefined ? "md" : t2;
589
+ let t3;
590
+ if ($[6] !== className) {
591
+ t3 = cn(className);
592
+ $[6] = className;
593
+ $[7] = t3;
594
+ } else {
595
+ t3 = $[7];
596
+ }
597
+ let t4;
598
+ if ($[8] !== children || $[9] !== size || $[10] !== t3 || $[11] !== variant) {
599
+ t4 = /* @__PURE__ */ _jsx(Button, {
600
+ variant,
601
+ size,
602
+ className: t3,
603
+ children
604
+ });
605
+ $[8] = children;
606
+ $[9] = size;
607
+ $[10] = t3;
608
+ $[11] = variant;
609
+ $[12] = t4;
610
+ } else {
611
+ t4 = $[12];
612
+ }
613
+ let t5;
614
+ if ($[13] !== props || $[14] !== t4) {
615
+ t5 = /* @__PURE__ */ _jsx(AlertDialogPrimitive.Cancel, {
616
+ "data-slot": "alert-dialog-cancel",
617
+ asChild: true,
618
+ ...props,
619
+ children: t4
620
+ });
621
+ $[13] = props;
622
+ $[14] = t4;
623
+ $[15] = t5;
624
+ } else {
625
+ t5 = $[15];
626
+ }
627
+ return t5;
628
+ }
629
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Internal composition behind Arc's Avatar (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a compact
3
+ * identity marker on Arc's tokens, with a hairline border, a muted fill behind the initials and an optional presence
4
+ * dot that pops in and out. Loading, failure and fallback stay on the Base UI avatar primitive. Not part of the public
5
+ * API: consumers use the closed `Avatar` from `../avatar.js`, while @astra-kit/ui components such as the account menu compose
6
+ * these parts directly.
7
+ */
8
+ import type { ComponentProps } from "react";
9
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
10
+ import type { AvatarSize, AvatarStatus } from "../../constants/avatar.js";
11
+ /** Accepts native image props and nullable image sources from application results. */
12
+ export type AvatarImageProps = Omit<ComponentProps<"img">, "src"> & {
13
+ src?: string | null;
14
+ };
15
+ export type AvatarRootProps = AvatarPrimitive.Root.Props & {
16
+ /** Diameter: 24px (`sm`), 32px (`md`, default), 40px (`lg`) or Arc's 88px profile size (`xl`). */
17
+ size?: AvatarSize;
18
+ /** Shows Arc's presence dot in the bottom corner, or the top corner when an `AvatarBadge` holds the bottom one. */
19
+ status?: AvatarStatus;
20
+ };
21
+ /**
22
+ * The avatar circle with its optional presence dot.
23
+ * @param props - Size, optional presence and the Base UI avatar root props.
24
+ * @returns The avatar root.
25
+ */
26
+ declare function AvatarRoot({ className, size, status, children, ...props }: AvatarRootProps): import("react").JSX.Element;
27
+ /**
28
+ * The photo. Delegates loading, failure and fallback synchronization to the avatar primitive and renders through the
29
+ * provider's `Image` adapter; loaded images develop in place.
30
+ * @param props - Native image props with a nullable source.
31
+ * @returns The image, mounted while it loads so the fallback can stay until it is ready.
32
+ */
33
+ declare function AvatarImage({ alt, className, src, ...props }: AvatarImageProps): import("react").JSX.Element;
34
+ /**
35
+ * Initials or another stand-in, shown until the photo loads or when it fails.
36
+ * @param props - Base UI fallback props.
37
+ * @returns The fallback.
38
+ */
39
+ declare function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): import("react").JSX.Element;
40
+ /**
41
+ * A custom corner badge, drawn with the same ring as Arc's presence dot.
42
+ * @param props - Native span props.
43
+ * @returns The badge.
44
+ */
45
+ declare function AvatarBadge({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
46
+ export { AvatarRoot, AvatarImage, AvatarFallback, AvatarBadge };