@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,111 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { Field, usesFieldCopy, useFieldAria } from "./field.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ /** Same focus language as `Input`: the border answers alone and the box never changes size. */
7
+ const textareaClassName = "flex min-h-[110px] w-full resize-y rounded-(--radius-control) border border-border-strong bg-surface p-(--space-3) font-sans text-base leading-(--leading-body) tracking-(--tracking-body) text-foreground outline-none transition-[color,background-color,border-color] duration-(--duration-fast) ease-(--ease-standard) motion-reduce:transition-none placeholder:text-text-muted hover-fine:not-disabled:not-aria-invalid:border-foreground focus-visible:border-foreground aria-invalid:border-danger disabled:cursor-not-allowed disabled:bg-surface-muted disabled:opacity-60 md:text-sm";
8
+ /**
9
+ * Free-form multi-line text, controlled or uncontrolled like a native textarea.
10
+ * @param textareaProps - Optional field copy plus every native textarea attribute, including `ref`, `rows` and `maxLength`.
11
+ * @returns The labelled field when `label`, `description` or `error` is passed (even as `undefined`), otherwise the
12
+ * bare control.
13
+ */
14
+ function Textarea(textareaProps) {
15
+ const $ = _c(26);
16
+ let className;
17
+ let description;
18
+ let error;
19
+ let id;
20
+ let label;
21
+ let props;
22
+ if ($[0] !== textareaProps) {
23
+ ({className, label, description, error, id, ...props} = textareaProps);
24
+ $[0] = textareaProps;
25
+ $[1] = className;
26
+ $[2] = description;
27
+ $[3] = error;
28
+ $[4] = id;
29
+ $[5] = label;
30
+ $[6] = props;
31
+ } else {
32
+ className = $[1];
33
+ description = $[2];
34
+ error = $[3];
35
+ id = $[4];
36
+ label = $[5];
37
+ props = $[6];
38
+ }
39
+ let t0;
40
+ if ($[7] !== description || $[8] !== error || $[9] !== id || $[10] !== props) {
41
+ t0 = {
42
+ id,
43
+ description,
44
+ error,
45
+ ...props
46
+ };
47
+ $[7] = description;
48
+ $[8] = error;
49
+ $[9] = id;
50
+ $[10] = props;
51
+ $[11] = t0;
52
+ } else {
53
+ t0 = $[11];
54
+ }
55
+ const aria = useFieldAria(t0);
56
+ const isField = usesFieldCopy(textareaProps);
57
+ let t1;
58
+ if ($[12] !== className) {
59
+ t1 = cn(textareaClassName, className);
60
+ $[12] = className;
61
+ $[13] = t1;
62
+ } else {
63
+ t1 = $[13];
64
+ }
65
+ const t2 = isField ? aria.controlId : id;
66
+ const t3 = aria["aria-describedby"];
67
+ const t4 = aria["aria-invalid"];
68
+ let t5;
69
+ if ($[14] !== props || $[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t4) {
70
+ t5 = /* @__PURE__ */ _jsx("textarea", {
71
+ "data-slot": "textarea",
72
+ className: t1,
73
+ ...props,
74
+ id: t2,
75
+ "aria-describedby": t3,
76
+ "aria-invalid": t4
77
+ });
78
+ $[14] = props;
79
+ $[15] = t1;
80
+ $[16] = t2;
81
+ $[17] = t3;
82
+ $[18] = t4;
83
+ $[19] = t5;
84
+ } else {
85
+ t5 = $[19];
86
+ }
87
+ const control = t5;
88
+ if (!isField) {
89
+ return control;
90
+ }
91
+ let t6;
92
+ if ($[20] !== aria || $[21] !== control || $[22] !== description || $[23] !== error || $[24] !== label) {
93
+ t6 = /* @__PURE__ */ _jsx(Field, {
94
+ label,
95
+ description,
96
+ error,
97
+ aria,
98
+ children: control
99
+ });
100
+ $[20] = aria;
101
+ $[21] = control;
102
+ $[22] = description;
103
+ $[23] = error;
104
+ $[24] = label;
105
+ $[25] = t6;
106
+ } else {
107
+ t6 = $[25];
108
+ }
109
+ return t6;
110
+ }
111
+ export { Textarea };
@@ -0,0 +1,7 @@
1
+ import type { ToasterProps } from "sonner";
2
+ /**
3
+ * Renders shared notification styling using the consumer's resolved theme, on top of @astra-kit/ui's `Toaster`, so its
4
+ * toasts stay usable from an open `Dialog` (also in `alert` mode) or `Sheet`.
5
+ */
6
+ declare const ThemedToaster: ({ theme, className, ...props }: ToasterProps) => import("react").JSX.Element;
7
+ export { ThemedToaster };
@@ -0,0 +1,86 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { Toaster } from "./toaster.js";
5
+ import { useTheme } from "next-themes";
6
+ import { CircleCheck, Info, TriangleAlert, OctagonAlert, Loader } from "lucide-react";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ /**
9
+ * Renders shared notification styling using the consumer's resolved theme, on top of @astra-kit/ui's `Toaster`, so its
10
+ * toasts stay usable from an open `Dialog` (also in `alert` mode) or `Sheet`.
11
+ */
12
+ const ThemedToaster = (t0) => {
13
+ const $ = _c(13);
14
+ let className;
15
+ let props;
16
+ let theme;
17
+ if ($[0] !== t0) {
18
+ ({theme, className, ...props} = t0);
19
+ $[0] = t0;
20
+ $[1] = className;
21
+ $[2] = props;
22
+ $[3] = theme;
23
+ } else {
24
+ className = $[1];
25
+ props = $[2];
26
+ theme = $[3];
27
+ }
28
+ const { resolvedTheme } = useTheme();
29
+ const activeTheme = theme ?? (resolvedTheme === "dark" ? "dark" : "light");
30
+ let t1;
31
+ if ($[4] !== className) {
32
+ t1 = cn("toaster group", className);
33
+ $[4] = className;
34
+ $[5] = t1;
35
+ } else {
36
+ t1 = $[5];
37
+ }
38
+ let t2;
39
+ let t3;
40
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t2 = {
42
+ success: /* @__PURE__ */ _jsx(CircleCheck, { className: "size-4" }),
43
+ info: /* @__PURE__ */ _jsx(Info, { className: "size-4" }),
44
+ warning: /* @__PURE__ */ _jsx(TriangleAlert, { className: "size-4" }),
45
+ error: /* @__PURE__ */ _jsx(OctagonAlert, { className: "size-4" }),
46
+ loading: /* @__PURE__ */ _jsx(Loader, { className: "size-4 animate-spin" })
47
+ };
48
+ t3 = {
49
+ "--normal-bg": "var(--popover)",
50
+ "--normal-text": "var(--popover-foreground)",
51
+ "--normal-border": "var(--border)",
52
+ "--border-radius": "var(--radius)"
53
+ };
54
+ $[6] = t2;
55
+ $[7] = t3;
56
+ } else {
57
+ t2 = $[6];
58
+ t3 = $[7];
59
+ }
60
+ let t4;
61
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
62
+ t4 = { classNames: { toast: "cn-toast" } };
63
+ $[8] = t4;
64
+ } else {
65
+ t4 = $[8];
66
+ }
67
+ let t5;
68
+ if ($[9] !== activeTheme || $[10] !== props || $[11] !== t1) {
69
+ t5 = /* @__PURE__ */ _jsx(Toaster, {
70
+ theme: activeTheme,
71
+ className: t1,
72
+ icons: t2,
73
+ style: t3,
74
+ toastOptions: t4,
75
+ ...props
76
+ });
77
+ $[9] = activeTheme;
78
+ $[10] = props;
79
+ $[11] = t1;
80
+ $[12] = t5;
81
+ } else {
82
+ t5 = $[12];
83
+ }
84
+ return t5;
85
+ };
86
+ export { ThemedToaster };
@@ -0,0 +1,12 @@
1
+ import { type ComponentProps } from "react";
2
+ import { Toaster as SonnerToaster } from "sonner";
3
+ /**
4
+ * Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog` (also in `alert` mode) or
5
+ * `Sheet` is open: the toast layer takes pointer input even though the modal disables pointer events on the page,
6
+ * and Sonner's hotkey moves keyboard focus into the toasts past the modal's focus trap (focus returns to the modal
7
+ * when the focused toast goes away). Accepts every Sonner prop, including `ref`, and keeps the consumer's `className`.
8
+ * @param props - Sonner's toaster props.
9
+ * @returns The toast layer.
10
+ */
11
+ declare const Toaster: ({ className, ...props }: ComponentProps<typeof SonnerToaster>) => import("react").JSX.Element;
12
+ export { Toaster };
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { letFocusReachToastLayer } from "../lib/toast-layer.js";
5
+ import { useEffect } from "react";
6
+ import { Toaster as SonnerToaster } from "sonner";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ /**
9
+ * Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog` (also in `alert` mode) or
10
+ * `Sheet` is open: the toast layer takes pointer input even though the modal disables pointer events on the page,
11
+ * and Sonner's hotkey moves keyboard focus into the toasts past the modal's focus trap (focus returns to the modal
12
+ * when the focused toast goes away). Accepts every Sonner prop, including `ref`, and keeps the consumer's `className`.
13
+ * @param props - Sonner's toaster props.
14
+ * @returns The toast layer.
15
+ */
16
+ const Toaster = (t0) => {
17
+ const $ = _c(9);
18
+ let className;
19
+ let props;
20
+ if ($[0] !== t0) {
21
+ ({className, ...props} = t0);
22
+ $[0] = t0;
23
+ $[1] = className;
24
+ $[2] = props;
25
+ } else {
26
+ className = $[1];
27
+ props = $[2];
28
+ }
29
+ let t1;
30
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
31
+ t1 = [];
32
+ $[3] = t1;
33
+ } else {
34
+ t1 = $[3];
35
+ }
36
+ useEffect(_temp, t1);
37
+ let t2;
38
+ if ($[4] !== className) {
39
+ t2 = cn("pointer-events-auto", className);
40
+ $[4] = className;
41
+ $[5] = t2;
42
+ } else {
43
+ t2 = $[5];
44
+ }
45
+ let t3;
46
+ if ($[6] !== props || $[7] !== t2) {
47
+ t3 = /* @__PURE__ */ _jsx(SonnerToaster, {
48
+ className: t2,
49
+ ...props
50
+ });
51
+ $[6] = props;
52
+ $[7] = t2;
53
+ $[8] = t3;
54
+ } else {
55
+ t3 = $[8];
56
+ }
57
+ return t3;
58
+ };
59
+ export { Toaster };
60
+ function _temp() {
61
+ return letFocusReachToastLayer(document);
62
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Arc's Tooltip (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a short dark bubble on Arc's tokens that
3
+ * waits a moment, then rises a few pixels from its trigger. While a tooltip is open, and briefly after it closes, the
4
+ * next one opens at once and only fades, without any app-level provider: the skip window is shared by every tooltip
5
+ * on the page. It follows Arc's closed API, `<Tooltip content="...">` around its trigger, plus placement and open
6
+ * state extensions.
7
+ */
8
+ import type { ReactElement, ReactNode } from "react";
9
+ /** Side of the trigger a tooltip prefers. Arc offers `top` and `bottom`; @astra-kit/ui adds `left` and `right`. */
10
+ export type TooltipSide = "top" | "bottom" | "left" | "right";
11
+ /** Alignment of the bubble against its trigger. */
12
+ export type TooltipAlign = "start" | "center" | "end";
13
+ export type TooltipProps = {
14
+ /** Supplemental text of the bubble. Icon-only triggers still need their own `aria-label`. */
15
+ content: ReactNode;
16
+ /** The trigger. Rendered with `asChild`, so it must accept a ref and be focusable. */
17
+ children: ReactElement;
18
+ /** Preferred side of the trigger. Defaults to `top`. */
19
+ side?: TooltipSide;
20
+ /** Alignment against the trigger. Defaults to `center`. */
21
+ align?: TooltipAlign;
22
+ /** Gap, in px, between the bubble and its trigger. Defaults to 8. */
23
+ sideOffset?: number;
24
+ /** Distance, in px, the bubble keeps from the viewport edges. Defaults to 12. */
25
+ collisionPadding?: number;
26
+ /** Class added to the bubble. */
27
+ contentClassName?: string;
28
+ /** Controlled open state. */
29
+ open?: boolean;
30
+ /** Initial open state when uncontrolled. */
31
+ defaultOpen?: boolean;
32
+ /** Called when the tooltip opens or closes. */
33
+ onOpenChange?: (open: boolean) => void;
34
+ /** Milliseconds of hover or focus before the first tooltip opens. Defaults to Arc's 250. */
35
+ delayDuration?: number;
36
+ };
37
+ /**
38
+ * A short label on hover or focus that opens without delay when moving between tooltips.
39
+ * @param props - The bubble content, the trigger and optional placement and open state.
40
+ * @returns The trigger with its tooltip.
41
+ */
42
+ declare function Tooltip({ content, children, side, align, sideOffset, collisionPadding, contentClassName, open, defaultOpen, onOpenChange, delayDuration, }: TooltipProps): import("react").JSX.Element;
43
+ export { Tooltip };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { Tooltip as TooltipRoot, TooltipContent, TooltipTrigger } from "./primitives/tooltip.js";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ /**
6
+ * A short label on hover or focus that opens without delay when moving between tooltips.
7
+ * @param props - The bubble content, the trigger and optional placement and open state.
8
+ * @returns The trigger with its tooltip.
9
+ */
10
+ function Tooltip(t0) {
11
+ const $ = _c(16);
12
+ const { content, children, side, align, sideOffset, collisionPadding, contentClassName, open, defaultOpen, onOpenChange, delayDuration } = t0;
13
+ let t1;
14
+ if ($[0] !== children) {
15
+ t1 = /* @__PURE__ */ _jsx(TooltipTrigger, {
16
+ asChild: true,
17
+ children
18
+ });
19
+ $[0] = children;
20
+ $[1] = t1;
21
+ } else {
22
+ t1 = $[1];
23
+ }
24
+ let t2;
25
+ if ($[2] !== align || $[3] !== collisionPadding || $[4] !== content || $[5] !== contentClassName || $[6] !== side || $[7] !== sideOffset) {
26
+ t2 = /* @__PURE__ */ _jsx(TooltipContent, {
27
+ side,
28
+ align,
29
+ sideOffset,
30
+ collisionPadding,
31
+ className: contentClassName,
32
+ children: content
33
+ });
34
+ $[2] = align;
35
+ $[3] = collisionPadding;
36
+ $[4] = content;
37
+ $[5] = contentClassName;
38
+ $[6] = side;
39
+ $[7] = sideOffset;
40
+ $[8] = t2;
41
+ } else {
42
+ t2 = $[8];
43
+ }
44
+ let t3;
45
+ if ($[9] !== defaultOpen || $[10] !== delayDuration || $[11] !== onOpenChange || $[12] !== open || $[13] !== t1 || $[14] !== t2) {
46
+ t3 = /* @__PURE__ */ _jsxs(TooltipRoot, {
47
+ open,
48
+ defaultOpen,
49
+ onOpenChange,
50
+ delayDuration,
51
+ children: [t1, t2]
52
+ });
53
+ $[9] = defaultOpen;
54
+ $[10] = delayDuration;
55
+ $[11] = onOpenChange;
56
+ $[12] = open;
57
+ $[13] = t1;
58
+ $[14] = t2;
59
+ $[15] = t3;
60
+ } else {
61
+ t3 = $[15];
62
+ }
63
+ return t3;
64
+ }
65
+ export { Tooltip };
@@ -0,0 +1,34 @@
1
+ import { type DOMMotionComponents, type HTMLMotionProps, type MotionProps } from "motion/react";
2
+ declare const motionElements: {
3
+ readonly article: import("motion/react").ForwardRefComponent<HTMLElement, HTMLMotionProps<"article">>;
4
+ readonly div: import("motion/react").ForwardRefComponent<HTMLDivElement, HTMLMotionProps<"div">>;
5
+ readonly h1: import("motion/react").ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h1">>;
6
+ readonly h2: import("motion/react").ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h2">>;
7
+ readonly h3: import("motion/react").ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h3">>;
8
+ readonly h4: import("motion/react").ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h4">>;
9
+ readonly h5: import("motion/react").ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h5">>;
10
+ readonly h6: import("motion/react").ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h6">>;
11
+ readonly li: import("motion/react").ForwardRefComponent<HTMLLIElement, HTMLMotionProps<"li">>;
12
+ readonly p: import("motion/react").ForwardRefComponent<HTMLParagraphElement, HTMLMotionProps<"p">>;
13
+ readonly section: import("motion/react").ForwardRefComponent<HTMLElement, HTMLMotionProps<"section">>;
14
+ readonly span: import("motion/react").ForwardRefComponent<HTMLSpanElement, HTMLMotionProps<"span">>;
15
+ };
16
+ type MotionElementType = Extract<keyof DOMMotionComponents, keyof typeof motionElements>;
17
+ interface TypingAnimationProps extends Omit<MotionProps, "children"> {
18
+ children?: string;
19
+ words?: string[];
20
+ className?: string;
21
+ duration?: number;
22
+ typeSpeed?: number;
23
+ deleteSpeed?: number;
24
+ delay?: number;
25
+ pauseDelay?: number;
26
+ loop?: boolean;
27
+ as?: MotionElementType;
28
+ startOnView?: boolean;
29
+ showCursor?: boolean;
30
+ blinkCursor?: boolean;
31
+ cursorStyle?: "line" | "block" | "underscore";
32
+ }
33
+ export declare function TypingAnimation({ children, words, className, duration, typeSpeed, deleteSpeed, delay, pauseDelay, loop, as: Component, startOnView, showCursor, blinkCursor, cursorStyle, ...props }: TypingAnimationProps): import("react").JSX.Element;
34
+ export {};