@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,277 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import * as React from "react";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils.js";
6
+ import { ControlButton } from "./control-button.js";
7
+ import { Input } from "./input.js";
8
+ import { Textarea } from "./textarea.js";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ function InputGroup(t0) {
11
+ const $ = _c(8);
12
+ let className;
13
+ let props;
14
+ if ($[0] !== t0) {
15
+ ({className, ...props} = t0);
16
+ $[0] = t0;
17
+ $[1] = className;
18
+ $[2] = props;
19
+ } else {
20
+ className = $[1];
21
+ props = $[2];
22
+ }
23
+ let t1;
24
+ if ($[3] !== className) {
25
+ t1 = cn("group/input-group relative flex min-h-(--control-height-md) w-full min-w-0 items-center rounded-(--radius-control) border border-border-strong bg-surface transition-[color,background-color,border-color] duration-(--duration-fast) ease-(--ease-standard) outline-none motion-reduce:transition-none in-data-[slot=combobox-content]:focus-within:border-inherit has-disabled:bg-surface-muted has-disabled:opacity-50 hover-fine:not-has-disabled:not-has-[[data-slot][aria-invalid=true]]:border-foreground has-[[data-slot=input-group-control]:focus-visible]:border-foreground has-[[data-slot][aria-invalid=true]]:border-danger has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className);
26
+ $[3] = className;
27
+ $[4] = t1;
28
+ } else {
29
+ t1 = $[4];
30
+ }
31
+ let t2;
32
+ if ($[5] !== props || $[6] !== t1) {
33
+ t2 = /* @__PURE__ */ _jsx("div", {
34
+ "data-slot": "input-group",
35
+ role: "group",
36
+ className: t1,
37
+ ...props
38
+ });
39
+ $[5] = props;
40
+ $[6] = t1;
41
+ $[7] = t2;
42
+ } else {
43
+ t2 = $[7];
44
+ }
45
+ return t2;
46
+ }
47
+ const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
48
+ variants: { align: {
49
+ "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
50
+ "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
51
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
52
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
53
+ } },
54
+ defaultVariants: { align: "inline-start" }
55
+ });
56
+ function InputGroupAddon(t0) {
57
+ const $ = _c(11);
58
+ let className;
59
+ let props;
60
+ let t1;
61
+ if ($[0] !== t0) {
62
+ ({className, align: t1, ...props} = t0);
63
+ $[0] = t0;
64
+ $[1] = className;
65
+ $[2] = props;
66
+ $[3] = t1;
67
+ } else {
68
+ className = $[1];
69
+ props = $[2];
70
+ t1 = $[3];
71
+ }
72
+ const align = t1 === undefined ? "inline-start" : t1;
73
+ let t2;
74
+ if ($[4] !== align || $[5] !== className) {
75
+ t2 = cn(inputGroupAddonVariants({ align }), className);
76
+ $[4] = align;
77
+ $[5] = className;
78
+ $[6] = t2;
79
+ } else {
80
+ t2 = $[6];
81
+ }
82
+ let t3;
83
+ if ($[7] !== align || $[8] !== props || $[9] !== t2) {
84
+ t3 = /* @__PURE__ */ _jsx("div", {
85
+ role: "group",
86
+ "data-slot": "input-group-addon",
87
+ "data-align": align,
88
+ className: t2,
89
+ onClick: _temp,
90
+ ...props
91
+ });
92
+ $[7] = align;
93
+ $[8] = props;
94
+ $[9] = t2;
95
+ $[10] = t3;
96
+ } else {
97
+ t3 = $[10];
98
+ }
99
+ return t3;
100
+ }
101
+ function _temp(event) {
102
+ if (event.target.closest("button")) {
103
+ return;
104
+ }
105
+ event.currentTarget.parentElement?.querySelector("input")?.focus();
106
+ }
107
+ const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
108
+ variants: { size: {
109
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
110
+ sm: "",
111
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
112
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
113
+ } },
114
+ defaultVariants: { size: "xs" }
115
+ });
116
+ function InputGroupButton(t0) {
117
+ const $ = _c(15);
118
+ let className;
119
+ let props;
120
+ let t1;
121
+ let t2;
122
+ let t3;
123
+ if ($[0] !== t0) {
124
+ ({className, type: t1, variant: t2, size: t3, ...props} = t0);
125
+ $[0] = t0;
126
+ $[1] = className;
127
+ $[2] = props;
128
+ $[3] = t1;
129
+ $[4] = t2;
130
+ $[5] = t3;
131
+ } else {
132
+ className = $[1];
133
+ props = $[2];
134
+ t1 = $[3];
135
+ t2 = $[4];
136
+ t3 = $[5];
137
+ }
138
+ const type = t1 === undefined ? "button" : t1;
139
+ const variant = t2 === undefined ? "ghost" : t2;
140
+ const size = t3 === undefined ? "xs" : t3;
141
+ let t4;
142
+ if ($[6] !== className || $[7] !== size) {
143
+ t4 = cn(inputGroupButtonVariants({ size }), className);
144
+ $[6] = className;
145
+ $[7] = size;
146
+ $[8] = t4;
147
+ } else {
148
+ t4 = $[8];
149
+ }
150
+ let t5;
151
+ if ($[9] !== props || $[10] !== size || $[11] !== t4 || $[12] !== type || $[13] !== variant) {
152
+ t5 = /* @__PURE__ */ _jsx(ControlButton, {
153
+ type,
154
+ "data-size": size,
155
+ variant,
156
+ className: t4,
157
+ ...props
158
+ });
159
+ $[9] = props;
160
+ $[10] = size;
161
+ $[11] = t4;
162
+ $[12] = type;
163
+ $[13] = variant;
164
+ $[14] = t5;
165
+ } else {
166
+ t5 = $[14];
167
+ }
168
+ return t5;
169
+ }
170
+ function InputGroupText(t0) {
171
+ const $ = _c(8);
172
+ let className;
173
+ let props;
174
+ if ($[0] !== t0) {
175
+ ({className, ...props} = t0);
176
+ $[0] = t0;
177
+ $[1] = className;
178
+ $[2] = props;
179
+ } else {
180
+ className = $[1];
181
+ props = $[2];
182
+ }
183
+ let t1;
184
+ if ($[3] !== className) {
185
+ t1 = cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className);
186
+ $[3] = className;
187
+ $[4] = t1;
188
+ } else {
189
+ t1 = $[4];
190
+ }
191
+ let t2;
192
+ if ($[5] !== props || $[6] !== t1) {
193
+ t2 = /* @__PURE__ */ _jsx("span", {
194
+ className: t1,
195
+ ...props
196
+ });
197
+ $[5] = props;
198
+ $[6] = t1;
199
+ $[7] = t2;
200
+ } else {
201
+ t2 = $[7];
202
+ }
203
+ return t2;
204
+ }
205
+ function InputGroupInput(t0) {
206
+ const $ = _c(8);
207
+ let className;
208
+ let props;
209
+ if ($[0] !== t0) {
210
+ ({className, ...props} = t0);
211
+ $[0] = t0;
212
+ $[1] = className;
213
+ $[2] = props;
214
+ } else {
215
+ className = $[1];
216
+ props = $[2];
217
+ }
218
+ let t1;
219
+ if ($[3] !== className) {
220
+ t1 = cn("min-h-0 flex-1 self-stretch rounded-none border-0 bg-transparent shadow-none disabled:bg-transparent", className);
221
+ $[3] = className;
222
+ $[4] = t1;
223
+ } else {
224
+ t1 = $[4];
225
+ }
226
+ let t2;
227
+ if ($[5] !== props || $[6] !== t1) {
228
+ t2 = /* @__PURE__ */ _jsx(Input, {
229
+ "data-slot": "input-group-control",
230
+ className: t1,
231
+ ...props
232
+ });
233
+ $[5] = props;
234
+ $[6] = t1;
235
+ $[7] = t2;
236
+ } else {
237
+ t2 = $[7];
238
+ }
239
+ return t2;
240
+ }
241
+ function InputGroupTextarea(t0) {
242
+ const $ = _c(8);
243
+ let className;
244
+ let props;
245
+ if ($[0] !== t0) {
246
+ ({className, ...props} = t0);
247
+ $[0] = t0;
248
+ $[1] = className;
249
+ $[2] = props;
250
+ } else {
251
+ className = $[1];
252
+ props = $[2];
253
+ }
254
+ let t1;
255
+ if ($[3] !== className) {
256
+ t1 = cn("min-h-16 flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none disabled:bg-transparent", className);
257
+ $[3] = className;
258
+ $[4] = t1;
259
+ } else {
260
+ t1 = $[4];
261
+ }
262
+ let t2;
263
+ if ($[5] !== props || $[6] !== t1) {
264
+ t2 = /* @__PURE__ */ _jsx(Textarea, {
265
+ "data-slot": "input-group-control",
266
+ className: t1,
267
+ ...props
268
+ });
269
+ $[5] = props;
270
+ $[6] = t1;
271
+ $[7] = t2;
272
+ } else {
273
+ t2 = $[7];
274
+ }
275
+ return t2;
276
+ }
277
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Arc's Input (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a single-line field on Arc's tokens whose
3
+ * focus answers with the border colour alone. With a `label`, `description` or `error` it renders Arc's labelled field
4
+ * with animated helper and error rows; without them it renders the bare control, for input groups, tables and forms
5
+ * that place their own label.
6
+ */
7
+ import type { ComponentProps } from "react";
8
+ import type { FieldCopyProps } from "./field.js";
9
+ export type InputProps = ComponentProps<"input"> & FieldCopyProps;
10
+ /**
11
+ * A single-line text value, controlled or uncontrolled like a native input.
12
+ * @param inputProps - Optional field copy plus every native input attribute, including `ref`, `name` and `type`.
13
+ * @returns The labelled field when `label`, `description` or `error` is passed (even as `undefined`), otherwise the
14
+ * bare control.
15
+ */
16
+ declare function Input(inputProps: InputProps): import("react").JSX.Element;
17
+ export { Input };
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { Input as InputPrimitive } from "@base-ui/react/input";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Field, usesFieldCopy, useFieldAria } from "./field.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * Arc's control recipe. Text stays at 16px on small screens so iOS does not zoom on focus, hover only answers on
9
+ * hover-capable fine pointers, and the field never changes size on focus or error.
10
+ */
11
+ const inputClassName = "min-h-(--control-height-md) w-full min-w-0 rounded-(--radius-control) border border-border-strong bg-surface px-(--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 file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground 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-50 md:text-sm";
12
+ /**
13
+ * A single-line text value, controlled or uncontrolled like a native input.
14
+ * @param inputProps - Optional field copy plus every native input attribute, including `ref`, `name` and `type`.
15
+ * @returns The labelled field when `label`, `description` or `error` is passed (even as `undefined`), otherwise the
16
+ * bare control.
17
+ */
18
+ function Input(inputProps) {
19
+ const $ = _c(28);
20
+ let className;
21
+ let description;
22
+ let error;
23
+ let id;
24
+ let label;
25
+ let props;
26
+ let type;
27
+ if ($[0] !== inputProps) {
28
+ ({className, type, label, description, error, id, ...props} = inputProps);
29
+ $[0] = inputProps;
30
+ $[1] = className;
31
+ $[2] = description;
32
+ $[3] = error;
33
+ $[4] = id;
34
+ $[5] = label;
35
+ $[6] = props;
36
+ $[7] = type;
37
+ } else {
38
+ className = $[1];
39
+ description = $[2];
40
+ error = $[3];
41
+ id = $[4];
42
+ label = $[5];
43
+ props = $[6];
44
+ type = $[7];
45
+ }
46
+ let t0;
47
+ if ($[8] !== description || $[9] !== error || $[10] !== id || $[11] !== props) {
48
+ t0 = {
49
+ id,
50
+ description,
51
+ error,
52
+ ...props
53
+ };
54
+ $[8] = description;
55
+ $[9] = error;
56
+ $[10] = id;
57
+ $[11] = props;
58
+ $[12] = t0;
59
+ } else {
60
+ t0 = $[12];
61
+ }
62
+ const aria = useFieldAria(t0);
63
+ const isField = usesFieldCopy(inputProps);
64
+ let t1;
65
+ if ($[13] !== className) {
66
+ t1 = cn(inputClassName, className);
67
+ $[13] = className;
68
+ $[14] = t1;
69
+ } else {
70
+ t1 = $[14];
71
+ }
72
+ const t2 = isField ? aria.controlId : id;
73
+ const t3 = aria["aria-describedby"];
74
+ const t4 = aria["aria-invalid"];
75
+ let t5;
76
+ if ($[15] !== props || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== type) {
77
+ t5 = /* @__PURE__ */ _jsx(InputPrimitive, {
78
+ type,
79
+ "data-slot": "input",
80
+ className: t1,
81
+ ...props,
82
+ id: t2,
83
+ "aria-describedby": t3,
84
+ "aria-invalid": t4
85
+ });
86
+ $[15] = props;
87
+ $[16] = t1;
88
+ $[17] = t2;
89
+ $[18] = t3;
90
+ $[19] = t4;
91
+ $[20] = type;
92
+ $[21] = t5;
93
+ } else {
94
+ t5 = $[21];
95
+ }
96
+ const control = t5;
97
+ if (!isField) {
98
+ return control;
99
+ }
100
+ let t6;
101
+ if ($[22] !== aria || $[23] !== control || $[24] !== description || $[25] !== error || $[26] !== label) {
102
+ t6 = /* @__PURE__ */ _jsx(Field, {
103
+ label,
104
+ description,
105
+ error,
106
+ aria,
107
+ children: control
108
+ });
109
+ $[22] = aria;
110
+ $[23] = control;
111
+ $[24] = description;
112
+ $[25] = error;
113
+ $[26] = label;
114
+ $[27] = t6;
115
+ } else {
116
+ t6 = $[27];
117
+ }
118
+ return t6;
119
+ }
120
+ export { Input };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { Label as LabelPrimitive } from "radix-ui";
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
4
+ export { Label };
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import * as React from "react";
4
+ import { Label as LabelPrimitive } from "radix-ui";
5
+ import { cn } from "../lib/utils.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ function Label(t0) {
8
+ const $ = _c(8);
9
+ let className;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({className, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ } else {
17
+ className = $[1];
18
+ props = $[2];
19
+ }
20
+ let t1;
21
+ if ($[3] !== className) {
22
+ t1 = cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className);
23
+ $[3] = className;
24
+ $[4] = t1;
25
+ } else {
26
+ t1 = $[4];
27
+ }
28
+ let t2;
29
+ if ($[5] !== props || $[6] !== t1) {
30
+ t2 = /* @__PURE__ */ _jsx(LabelPrimitive.Root, {
31
+ "data-slot": "label",
32
+ className: t1,
33
+ ...props
34
+ });
35
+ $[5] = props;
36
+ $[6] = t1;
37
+ $[7] = t2;
38
+ } else {
39
+ t2 = $[7];
40
+ }
41
+ return t2;
42
+ }
43
+ export { Label };
@@ -0,0 +1,9 @@
1
+ /** Selects the configured routing adapter while keeping a native anchor fallback. */
2
+ import type { ComponentType } from "react";
3
+ import { type AstraLinkProps } from "../providers/astra-ui-provider.js";
4
+ /** Shares native link props and explicit per-link navigation overrides. */
5
+ export type LinkProps = AstraLinkProps & {
6
+ component?: ComponentType<AstraLinkProps> | "a";
7
+ };
8
+ /** Uses the provider's adapter and excludes framework hints from native DOM attributes. */
9
+ export declare function Link({ component, prefetch, ...props }: LinkProps): import("react").JSX.Element;
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { useAstraUIComponents } from "../providers/astra-ui-provider.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ /** Uses the provider's adapter and excludes framework hints from native DOM attributes. */
6
+ export function Link(t0) {
7
+ const $ = _c(8);
8
+ let component;
9
+ let prefetch;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({component, prefetch, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = component;
15
+ $[2] = prefetch;
16
+ $[3] = props;
17
+ } else {
18
+ component = $[1];
19
+ prefetch = $[2];
20
+ props = $[3];
21
+ }
22
+ const adapters = useAstraUIComponents();
23
+ const Component = component ?? adapters.Link;
24
+ let t1;
25
+ if ($[4] !== Component || $[5] !== prefetch || $[6] !== props) {
26
+ t1 = !Component || Component === "a" ? /* @__PURE__ */ _jsx("a", {
27
+ "data-slot": "link",
28
+ ...props
29
+ }) : /* @__PURE__ */ _jsx(Component, {
30
+ "data-slot": "link",
31
+ ...props,
32
+ prefetch
33
+ });
34
+ $[4] = Component;
35
+ $[5] = prefetch;
36
+ $[6] = props;
37
+ $[7] = t1;
38
+ } else {
39
+ t1 = $[7];
40
+ }
41
+ const link = t1;
42
+ return link;
43
+ }
@@ -0,0 +1,14 @@
1
+ import type { Ref } from "react";
2
+ export type MorphTextProps = {
3
+ text: string;
4
+ reduceMotion: boolean;
5
+ /** Row of glyphs, for a caller that springs its slot to the row's width with `useMorphWidth`. */
6
+ ref?: Ref<HTMLSpanElement>;
7
+ };
8
+ /**
9
+ * Morphs one label into the next: kept letters glide into place and new ones rise in from a soft blur. The row
10
+ * keeps its natural width; callers spring the slot around it.
11
+ * @param props - Label text, whether the user prefers reduced motion and an optional ref to the row.
12
+ * @returns The row of animated letters. Callers hide it from assistive tech and name their control otherwise.
13
+ */
14
+ export declare function MorphText({ text, reduceMotion, ref }: MorphTextProps): import("react").JSX.Element;