@astra-kit/ui 0.0.0-stage → 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +384 -2
  4. package/THIRD_PARTY_NOTICES.md +31 -0
  5. package/assets/fonts/geist-LICENSE.txt +93 -0
  6. package/assets/fonts/geist-latin-variable.woff2 +0 -0
  7. package/assets/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
  8. package/assets/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
  9. package/assets/fonts/ibmplexmono-LICENSE.txt +93 -0
  10. package/assets/fonts/inter-LICENSE.txt +93 -0
  11. package/assets/fonts/inter-latin-variable.woff2 +0 -0
  12. package/dist/adapters/unpic-image.d.ts +3 -0
  13. package/dist/adapters/unpic-image.js +98 -0
  14. package/dist/components/account-menu.d.ts +67 -0
  15. package/dist/components/account-menu.js +440 -0
  16. package/dist/components/action-button.d.ts +25 -0
  17. package/dist/components/action-button.js +264 -0
  18. package/dist/components/alert.d.ts +31 -0
  19. package/dist/components/alert.js +503 -0
  20. package/dist/components/animated-collapse.d.ts +19 -0
  21. package/dist/components/animated-collapse.js +170 -0
  22. package/dist/components/animated-count.d.ts +13 -0
  23. package/dist/components/animated-count.js +105 -0
  24. package/dist/components/animated-list-item.d.ts +25 -0
  25. package/dist/components/animated-list-item.js +134 -0
  26. package/dist/components/animated-theme-toggler.d.ts +12 -0
  27. package/dist/components/animated-theme-toggler.js +200 -0
  28. package/dist/components/avatar.d.ts +65 -0
  29. package/dist/components/avatar.js +463 -0
  30. package/dist/components/badge.d.ts +21 -0
  31. package/dist/components/badge.js +297 -0
  32. package/dist/components/button-interaction.d.ts +23 -0
  33. package/dist/components/button-interaction.js +22 -0
  34. package/dist/components/button-label.d.ts +8 -0
  35. package/dist/components/button-label.js +203 -0
  36. package/dist/components/button.d.ts +23 -0
  37. package/dist/components/button.js +145 -0
  38. package/dist/components/calendar.d.ts +47 -0
  39. package/dist/components/calendar.js +155 -0
  40. package/dist/components/card.d.ts +38 -0
  41. package/dist/components/card.js +904 -0
  42. package/dist/components/carousel.d.ts +71 -0
  43. package/dist/components/carousel.js +585 -0
  44. package/dist/components/checkbox.d.ts +15 -0
  45. package/dist/components/checkbox.js +324 -0
  46. package/dist/components/control-button.d.ts +16 -0
  47. package/dist/components/control-button.js +215 -0
  48. package/dist/components/data-table.d.ts +118 -0
  49. package/dist/components/data-table.js +895 -0
  50. package/dist/components/dialog-surface.d.ts +49 -0
  51. package/dist/components/dialog-surface.js +220 -0
  52. package/dist/components/dialog.d.ts +92 -0
  53. package/dist/components/dialog.js +320 -0
  54. package/dist/components/dropdown-menu.d.ts +57 -0
  55. package/dist/components/dropdown-menu.js +107 -0
  56. package/dist/components/field.d.ts +53 -0
  57. package/dist/components/field.js +710 -0
  58. package/dist/components/file-upload.d.ts +88 -0
  59. package/dist/components/file-upload.js +776 -0
  60. package/dist/components/filter-presets-bar.d.ts +73 -0
  61. package/dist/components/filter-presets-bar.js +510 -0
  62. package/dist/components/filter-query-bar.d.ts +21 -0
  63. package/dist/components/filter-query-bar.js +881 -0
  64. package/dist/components/filter-query-grammar.d.ts +188 -0
  65. package/dist/components/filter-query-grammar.js +875 -0
  66. package/dist/components/form.d.ts +29 -0
  67. package/dist/components/form.js +330 -0
  68. package/dist/components/highlighter.d.ts +15 -0
  69. package/dist/components/highlighter.js +152 -0
  70. package/dist/components/hover-card.d.ts +50 -0
  71. package/dist/components/hover-card.js +80 -0
  72. package/dist/components/input-group.d.ts +16 -0
  73. package/dist/components/input-group.js +277 -0
  74. package/dist/components/input.d.ts +17 -0
  75. package/dist/components/input.js +120 -0
  76. package/dist/components/label.d.ts +4 -0
  77. package/dist/components/label.js +43 -0
  78. package/dist/components/link.d.ts +9 -0
  79. package/dist/components/link.js +43 -0
  80. package/dist/components/morph-text.d.ts +14 -0
  81. package/dist/components/morph-text.js +210 -0
  82. package/dist/components/pagination.d.ts +59 -0
  83. package/dist/components/pagination.js +190 -0
  84. package/dist/components/popover.d.ts +17 -0
  85. package/dist/components/popover.js +40 -0
  86. package/dist/components/presence-swap.d.ts +22 -0
  87. package/dist/components/presence-swap.js +209 -0
  88. package/dist/components/primitives/alert-dialog.d.ts +68 -0
  89. package/dist/components/primitives/alert-dialog.js +629 -0
  90. package/dist/components/primitives/avatar.d.ts +46 -0
  91. package/dist/components/primitives/avatar.js +265 -0
  92. package/dist/components/primitives/calendar.d.ts +37 -0
  93. package/dist/components/primitives/calendar.js +1250 -0
  94. package/dist/components/primitives/carousel.d.ts +106 -0
  95. package/dist/components/primitives/carousel.js +928 -0
  96. package/dist/components/primitives/dialog.d.ts +62 -0
  97. package/dist/components/primitives/dialog.js +490 -0
  98. package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
  99. package/dist/components/primitives/dropdown-menu-items.js +265 -0
  100. package/dist/components/primitives/dropdown-menu.d.ts +64 -0
  101. package/dist/components/primitives/dropdown-menu.js +560 -0
  102. package/dist/components/primitives/hover-card.d.ts +50 -0
  103. package/dist/components/primitives/hover-card.js +507 -0
  104. package/dist/components/primitives/pagination.d.ts +65 -0
  105. package/dist/components/primitives/pagination.js +373 -0
  106. package/dist/components/primitives/popover.d.ts +22 -0
  107. package/dist/components/primitives/popover.js +213 -0
  108. package/dist/components/primitives/select.d.ts +37 -0
  109. package/dist/components/primitives/select.js +428 -0
  110. package/dist/components/primitives/tooltip.d.ts +30 -0
  111. package/dist/components/primitives/tooltip.js +277 -0
  112. package/dist/components/progress-ring.d.ts +20 -0
  113. package/dist/components/progress-ring.js +53 -0
  114. package/dist/components/radio-group.d.ts +34 -0
  115. package/dist/components/radio-group.js +392 -0
  116. package/dist/components/reaction-button.d.ts +30 -0
  117. package/dist/components/reaction-button.js +189 -0
  118. package/dist/components/rich-link-editor.d.ts +25 -0
  119. package/dist/components/rich-link-editor.js +320 -0
  120. package/dist/components/rich-markdown-content.d.ts +10 -0
  121. package/dist/components/rich-markdown-content.js +56 -0
  122. package/dist/components/rich-text-content.d.ts +19 -0
  123. package/dist/components/rich-text-content.js +26 -0
  124. package/dist/components/select.d.ts +55 -0
  125. package/dist/components/select.js +188 -0
  126. package/dist/components/separator.d.ts +3 -0
  127. package/dist/components/separator.js +48 -0
  128. package/dist/components/sheet.d.ts +19 -0
  129. package/dist/components/sheet.js +420 -0
  130. package/dist/components/sidebar-panel-context.d.ts +17 -0
  131. package/dist/components/sidebar-panel-context.js +14 -0
  132. package/dist/components/sidebar.d.ts +195 -0
  133. package/dist/components/sidebar.js +2041 -0
  134. package/dist/components/skeleton.d.ts +23 -0
  135. package/dist/components/skeleton.js +334 -0
  136. package/dist/components/split-button.d.ts +36 -0
  137. package/dist/components/split-button.js +306 -0
  138. package/dist/components/svgs/whatsappIcon.d.ts +3 -0
  139. package/dist/components/svgs/whatsappIcon.js +14 -0
  140. package/dist/components/switch.d.ts +13 -0
  141. package/dist/components/switch.js +444 -0
  142. package/dist/components/table.d.ts +10 -0
  143. package/dist/components/table.js +298 -0
  144. package/dist/components/tabs.d.ts +36 -0
  145. package/dist/components/tabs.js +636 -0
  146. package/dist/components/textarea.d.ts +16 -0
  147. package/dist/components/textarea.js +111 -0
  148. package/dist/components/themed-toaster.d.ts +7 -0
  149. package/dist/components/themed-toaster.js +86 -0
  150. package/dist/components/toaster.d.ts +12 -0
  151. package/dist/components/toaster.js +62 -0
  152. package/dist/components/tooltip.d.ts +43 -0
  153. package/dist/components/tooltip.js +65 -0
  154. package/dist/components/typing-animation.d.ts +34 -0
  155. package/dist/components/typing-animation.js +389 -0
  156. package/dist/constants/action-button.d.ts +20 -0
  157. package/dist/constants/action-button.js +17 -0
  158. package/dist/constants/alert.d.ts +16 -0
  159. package/dist/constants/alert.js +13 -0
  160. package/dist/constants/avatar.d.ts +38 -0
  161. package/dist/constants/avatar.js +32 -0
  162. package/dist/constants/badge.d.ts +6 -0
  163. package/dist/constants/badge.js +6 -0
  164. package/dist/constants/button.d.ts +16 -0
  165. package/dist/constants/button.js +16 -0
  166. package/dist/constants/calendar.d.ts +36 -0
  167. package/dist/constants/calendar.js +34 -0
  168. package/dist/constants/card.d.ts +23 -0
  169. package/dist/constants/card.js +20 -0
  170. package/dist/constants/carousel.d.ts +55 -0
  171. package/dist/constants/carousel.js +74 -0
  172. package/dist/constants/checkbox.d.ts +17 -0
  173. package/dist/constants/checkbox.js +17 -0
  174. package/dist/constants/dialog.d.ts +11 -0
  175. package/dist/constants/dialog.js +10 -0
  176. package/dist/constants/dropdown-menu.d.ts +10 -0
  177. package/dist/constants/dropdown-menu.js +37 -0
  178. package/dist/constants/field.d.ts +24 -0
  179. package/dist/constants/field.js +24 -0
  180. package/dist/constants/hover-card.d.ts +37 -0
  181. package/dist/constants/hover-card.js +85 -0
  182. package/dist/constants/morph-text.d.ts +13 -0
  183. package/dist/constants/morph-text.js +13 -0
  184. package/dist/constants/motion.d.ts +12 -0
  185. package/dist/constants/motion.js +12 -0
  186. package/dist/constants/pagination.d.ts +20 -0
  187. package/dist/constants/pagination.js +20 -0
  188. package/dist/constants/popover.d.ts +7 -0
  189. package/dist/constants/popover.js +33 -0
  190. package/dist/constants/radio-group.d.ts +10 -0
  191. package/dist/constants/radio-group.js +10 -0
  192. package/dist/constants/select.d.ts +7 -0
  193. package/dist/constants/select.js +34 -0
  194. package/dist/constants/sidebar.d.ts +9 -0
  195. package/dist/constants/sidebar.js +17 -0
  196. package/dist/constants/skeleton.d.ts +17 -0
  197. package/dist/constants/skeleton.js +17 -0
  198. package/dist/constants/split-button.d.ts +7 -0
  199. package/dist/constants/split-button.js +5 -0
  200. package/dist/constants/switch.d.ts +33 -0
  201. package/dist/constants/switch.js +41 -0
  202. package/dist/constants/tabs.d.ts +17 -0
  203. package/dist/constants/tabs.js +17 -0
  204. package/dist/constants/toast.d.ts +3 -0
  205. package/dist/constants/toast.js +3 -0
  206. package/dist/constants/tooltip.d.ts +13 -0
  207. package/dist/constants/tooltip.js +52 -0
  208. package/dist/hooks/use-horizontal-swipe.d.ts +23 -0
  209. package/dist/hooks/use-horizontal-swipe.js +80 -0
  210. package/dist/hooks/use-is-hydrated.d.ts +6 -0
  211. package/dist/hooks/use-is-hydrated.js +20 -0
  212. package/dist/hooks/use-mobile.d.ts +1 -0
  213. package/dist/hooks/use-mobile.js +19 -0
  214. package/dist/hooks/use-prefers-reduced-motion.d.ts +2 -0
  215. package/dist/hooks/use-prefers-reduced-motion.js +27 -0
  216. package/dist/hooks/use-rich-link-editor.d.ts +55 -0
  217. package/dist/hooks/use-rich-link-editor.js +515 -0
  218. package/dist/hooks/use-sidebar-persistence.d.ts +6 -0
  219. package/dist/hooks/use-sidebar-persistence.js +52 -0
  220. package/dist/hooks/use-today.d.ts +7 -0
  221. package/dist/hooks/use-today.js +50 -0
  222. package/dist/hooks/use-viewer-time-zone.d.ts +6 -0
  223. package/dist/hooks/use-viewer-time-zone.js +20 -0
  224. package/dist/hooks.d.ts +11 -0
  225. package/dist/hooks.js +11 -0
  226. package/dist/index.d.ts +71 -0
  227. package/dist/index.js +69 -0
  228. package/dist/lib/browser-clipboard.d.ts +13 -0
  229. package/dist/lib/browser-clipboard.js +48 -0
  230. package/dist/lib/column-filter-value.d.ts +12 -0
  231. package/dist/lib/column-filter-value.js +52 -0
  232. package/dist/lib/file-acceptance.d.ts +43 -0
  233. package/dist/lib/file-acceptance.js +107 -0
  234. package/dist/lib/format-file-size.d.ts +16 -0
  235. package/dist/lib/format-file-size.js +34 -0
  236. package/dist/lib/fuzzy-search.d.ts +17 -0
  237. package/dist/lib/fuzzy-search.js +183 -0
  238. package/dist/lib/horizontal-swipe.d.ts +23 -0
  239. package/dist/lib/horizontal-swipe.js +29 -0
  240. package/dist/lib/image-dimensions.d.ts +2 -0
  241. package/dist/lib/image-dimensions.js +7 -0
  242. package/dist/lib/name-initials.d.ts +7 -0
  243. package/dist/lib/name-initials.js +11 -0
  244. package/dist/lib/rich-text/link-markdown-constants.d.ts +147 -0
  245. package/dist/lib/rich-text/link-markdown-constants.js +458 -0
  246. package/dist/lib/rich-text/link-markdown-types.d.ts +53 -0
  247. package/dist/lib/rich-text/link-markdown-types.js +1 -0
  248. package/dist/lib/rich-text/link-markdown.d.ts +193 -0
  249. package/dist/lib/rich-text/link-markdown.js +592 -0
  250. package/dist/lib/rich-text/rich-markdown.d.ts +41 -0
  251. package/dist/lib/rich-text/rich-markdown.js +105 -0
  252. package/dist/lib/rich-text/rich-text-editor-dom.d.ts +26 -0
  253. package/dist/lib/rich-text/rich-text-editor-dom.js +79 -0
  254. package/dist/lib/toast-layer.d.ts +24 -0
  255. package/dist/lib/toast-layer.js +76 -0
  256. package/dist/lib/utils.d.ts +2 -0
  257. package/dist/lib/utils.js +2 -0
  258. package/dist/lib/year-month-filter.d.ts +16 -0
  259. package/dist/lib/year-month-filter.js +46 -0
  260. package/dist/motion/arc-floating-slot.d.ts +40 -0
  261. package/dist/motion/arc-floating-slot.js +177 -0
  262. package/dist/motion/arc-press.d.ts +6 -0
  263. package/dist/motion/arc-press.js +59 -0
  264. package/dist/motion/arc-swap.d.ts +22 -0
  265. package/dist/motion/arc-swap.js +49 -0
  266. package/dist/motion/arc-tokens.d.ts +53 -0
  267. package/dist/motion/arc-tokens.js +73 -0
  268. package/dist/motion/glide-indicator.d.ts +69 -0
  269. package/dist/motion/glide-indicator.js +309 -0
  270. package/dist/motion/glide-slot.d.ts +9 -0
  271. package/dist/motion/glide-slot.js +71 -0
  272. package/dist/motion/motion-slot.d.ts +12 -0
  273. package/dist/motion/motion-slot.js +376 -0
  274. package/dist/motion/overlay-warmth.d.ts +24 -0
  275. package/dist/motion/overlay-warmth.js +70 -0
  276. package/dist/motion/presence.d.ts +40 -0
  277. package/dist/motion/presence.js +101 -0
  278. package/dist/motion/surface-keyframes.d.ts +24 -0
  279. package/dist/motion/surface-keyframes.js +141 -0
  280. package/dist/motion/tokens.d.ts +81 -0
  281. package/dist/motion/tokens.js +67 -0
  282. package/dist/motion/use-attached-element.d.ts +7 -0
  283. package/dist/motion/use-attached-element.js +22 -0
  284. package/dist/motion/use-morph-width.d.ts +13 -0
  285. package/dist/motion/use-morph-width.js +59 -0
  286. package/dist/next.d.ts +14 -0
  287. package/dist/next.js +79 -0
  288. package/dist/providers/astra-ui-provider.d.ts +27 -0
  289. package/dist/providers/astra-ui-provider.js +100 -0
  290. package/dist/providers/native-provider.d.ts +4 -0
  291. package/dist/providers/native-provider.js +45 -0
  292. package/dist/sonner.d.ts +7 -0
  293. package/dist/sonner.js +8 -0
  294. package/dist/styles.css +2 -0
  295. package/dist/tanstack.d.ts +11 -0
  296. package/dist/tanstack.js +50 -0
  297. package/dist/theme.d.ts +3 -0
  298. package/dist/theme.js +1 -0
  299. package/dist/types/data-table.d.ts +27 -0
  300. package/dist/types/data-table.js +1 -0
  301. package/fonts.css +5 -0
  302. package/package.json +450 -4
  303. package/styles.css +4 -0
  304. package/theme.css +248 -0
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Arc's Carousel (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md) as a closed component: one child per
3
+ * slide, a centered slide row that is dragged, flicked or arrowed through, and a control row under it with an optional
4
+ * rotation control, the indicator tab list and the arrows. Embla runs inside and is never exposed; the @astra-kit/ui
5
+ * extensions (`loop`, `duration`, `watchFocus`, `onSettle`, deferred re-initialization, labels and visibility of the
6
+ * controls) cover media viewers that used Embla's API directly.
7
+ */
8
+ import * as React from "react";
9
+ /** Props of {@link Carousel}: Arc's carousel API plus the @astra-kit/ui extensions marked below. */
10
+ type CarouselProps = {
11
+ /** Names the carousel for assistive technology, for example "Fotos del encuentro". */
12
+ label: string;
13
+ /** One child per slide. Give each a stable `key` when the list can change. */
14
+ children: React.ReactNode;
15
+ /** Controlled active slide. Pair with `onIndexChange`. */
16
+ index?: number;
17
+ /** Initial slide when uncontrolled. Defaults to 0. */
18
+ defaultIndex?: number;
19
+ /** Called as soon as the active slide changes, when the scroll toward it starts. */
20
+ onIndexChange?: (index: number) => void;
21
+ /** Width of one slide as a CSS length; `cqw` is a share of the carousel width. Defaults to `min(80cqw, 340px)`. */
22
+ slideSize?: string;
23
+ /** Names each slide and its indicator. Defaults to "Diapositiva 2 de 5". */
24
+ slideLabel?: (index: number, count: number) => string;
25
+ /**
26
+ * Milliseconds per slide. Adds a play control that rotates through the slides; rotation pauses on hover, keyboard
27
+ * focus, drag, offscreen and in hidden tabs; with reduced motion the control stays but is disabled.
28
+ */
29
+ interval?: number;
30
+ /** Starts rotating on mount. Off by default, so motion begins with the viewer. */
31
+ autoplay?: boolean;
32
+ /** Class of the root section. */
33
+ className?: string;
34
+ /** @astra-kit/ui: wraps from the last slide to the first and back. Defaults to `false`. */
35
+ loop?: boolean;
36
+ /** @astra-kit/ui: speed of a scroll between slides, in Embla's units (higher is slower). Defaults to Embla's 25. */
37
+ duration?: number;
38
+ /**
39
+ * @astra-kit/ui: scrolls to a slide when something inside it receives focus. Defaults to `true`; turn it off when a slide
40
+ * holds content that keeps focus, such as an embedded player, so it never pulls the carousel back.
41
+ */
42
+ watchFocus?: boolean;
43
+ /** @astra-kit/ui: called once a scroll has come to rest on a slide, the moment to mount heavy slide content. */
44
+ onSettle?: (index: number) => void;
45
+ /** @astra-kit/ui: accessible name of the previous arrow. Defaults to "Diapositiva anterior". */
46
+ previousLabel?: string;
47
+ /** @astra-kit/ui: accessible name of the next arrow. Defaults to "Diapositiva siguiente". */
48
+ nextLabel?: string;
49
+ /** @astra-kit/ui: shows the previous and next arrows. Defaults to `true`. */
50
+ showControls?: boolean;
51
+ /** @astra-kit/ui: shows the indicator tab list. Defaults to `true`. */
52
+ showIndicators?: boolean;
53
+ /** @astra-kit/ui: class added to every slide panel. */
54
+ slideClassName?: string;
55
+ /**
56
+ * @astra-kit/ui: class of the clipped, focusable viewport around the slide track, for example to give a media viewer a
57
+ * definite height.
58
+ */
59
+ viewportClassName?: string;
60
+ /** @astra-kit/ui: class of the slide track inside the viewport, which lays the slides out in a row. */
61
+ trackClassName?: string;
62
+ };
63
+ /**
64
+ * A centered row of slides browsed by drag, flick, the arrow keys, Home and End, the arrows or the indicator tabs, with
65
+ * optional rotation. Neighbouring slides stay in view as a hint that there is more, and are inert until selected.
66
+ * @param props - Arc's carousel props plus the @astra-kit/ui extensions.
67
+ * @returns The carousel section.
68
+ */
69
+ declare function Carousel({ label, children, index: controlledIndex, defaultIndex, onIndexChange, slideSize, slideLabel, interval, autoplay, className, loop, duration, watchFocus, onSettle, previousLabel, nextLabel, showControls, showIndicators, slideClassName, viewportClassName, trackClassName, }: CarouselProps): React.JSX.Element;
70
+ export { Carousel };
71
+ export type { CarouselProps };
@@ -0,0 +1,585 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ /**
4
+ * Arc's Carousel (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md) as a closed component: one child per
5
+ * slide, a centered slide row that is dragged, flicked or arrowed through, and a control row under it with an optional
6
+ * rotation control, the indicator tab list and the arrows. Embla runs inside and is never exposed; the @astra-kit/ui
7
+ * extensions (`loop`, `duration`, `watchFocus`, `onSettle`, deferred re-initialization, labels and visibility of the
8
+ * controls) cover media viewers that used Embla's API directly.
9
+ */
10
+ import * as React from "react";
11
+ import { AnimatePresence, animate, motion, useMotionValue } from "motion/react";
12
+ import { Pause, Play } from "lucide-react";
13
+ import { CAROUSEL_COPY, CAROUSEL_DEFAULT_SLIDE_SIZE, CAROUSEL_ROTATION_ICON_ENTER_SCALE, CAROUSEL_ROTATION_ICON_SIZE_PX, CAROUSEL_SLIDE_SIZE_PROPERTY } from "../constants/carousel.js";
14
+ import { useIsHydrated } from "../hooks/use-is-hydrated.js";
15
+ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
16
+ import { ARC_BLUR, ARC_DURATION, ARC_EASE, ARC_SPRING_SNAPPY } from "../motion/arc-tokens.js";
17
+ import { cn } from "../lib/utils.js";
18
+ import { ControlButton } from "./control-button.js";
19
+ import { Carousel as CarouselRoot, CarouselContent, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious, defaultCarouselSlideLabel } from "./primitives/carousel.js";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
+ /**
22
+ * Clamps a slide index to the slides that exist.
23
+ * @param index - Requested index.
24
+ * @param count - Number of slides.
25
+ * @returns An index between 0 and the last slide.
26
+ */
27
+ function clampSlideIndex(index, count) {
28
+ return Math.min(Math.max(0, count - 1), Math.max(0, index));
29
+ }
30
+ /** Rotation icon entering from a small, blurred state, as in Arc. */
31
+ const rotationIconHidden = {
32
+ opacity: 0,
33
+ scale: CAROUSEL_ROTATION_ICON_ENTER_SCALE,
34
+ filter: `blur(${ARC_BLUR.subtle}px)`
35
+ };
36
+ const rotationIconRest = {
37
+ opacity: 1,
38
+ scale: 1,
39
+ filter: "blur(0px)"
40
+ };
41
+ const rotationIconEnter = {
42
+ ...ARC_SPRING_SNAPPY,
43
+ opacity: {
44
+ duration: ARC_DURATION.fast,
45
+ ease: [...ARC_EASE.enter]
46
+ },
47
+ filter: {
48
+ duration: ARC_DURATION.fast,
49
+ ease: [...ARC_EASE.enter]
50
+ }
51
+ };
52
+ const rotationIconExit = {
53
+ ...rotationIconHidden,
54
+ transition: {
55
+ duration: ARC_DURATION.fast,
56
+ ease: [...ARC_EASE.standard]
57
+ }
58
+ };
59
+ /**
60
+ * Keeps Embla in step with its slides without ever cutting a scroll short. Embla re-initializes when a slide is added,
61
+ * removed or resized; a re-initialization recreates the engine and aborts a running scroll, so while a scroll or a
62
+ * drag is in progress the request is parked and runs once the carousel comes to rest.
63
+ * @returns Embla's `watchResize` and `watchSlides` callbacks, stable across renders, plus the handle to bind them.
64
+ */
65
+ function useDeferredReInit() {
66
+ const $ = _c(5);
67
+ const apiRef = React.useRef(undefined);
68
+ const isPointerDownRef = React.useRef(false);
69
+ const isPendingRef = React.useRef(false);
70
+ let t0;
71
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
72
+ t0 = () => {
73
+ const api = apiRef.current;
74
+ if (!api || api.slideNodes().length === 0) {
75
+ return false;
76
+ }
77
+ return isPointerDownRef.current || !api.internalEngine().scrollBody.settled();
78
+ };
79
+ $[0] = t0;
80
+ } else {
81
+ t0 = $[0];
82
+ }
83
+ const isBusy = t0;
84
+ let t1;
85
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
86
+ t1 = () => {
87
+ if (!isBusy()) {
88
+ return true;
89
+ }
90
+ isPendingRef.current = true;
91
+ return false;
92
+ };
93
+ $[1] = t1;
94
+ } else {
95
+ t1 = $[1];
96
+ }
97
+ const deferWhileBusy = t1;
98
+ let t2;
99
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
100
+ t2 = () => {
101
+ const api_0 = apiRef.current;
102
+ if (!api_0 || !isPendingRef.current || isBusy()) {
103
+ return;
104
+ }
105
+ isPendingRef.current = false;
106
+ api_0.reInit();
107
+ };
108
+ $[2] = t2;
109
+ } else {
110
+ t2 = $[2];
111
+ }
112
+ const flush = t2;
113
+ let t3;
114
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
115
+ t3 = (api_1) => {
116
+ apiRef.current = api_1;
117
+ if (!api_1) {
118
+ return;
119
+ }
120
+ const handlePointerDown = () => {
121
+ isPointerDownRef.current = true;
122
+ };
123
+ const handlePointerUp = () => {
124
+ isPointerDownRef.current = false;
125
+ flush();
126
+ };
127
+ const handleSettle = () => queueMicrotask(flush);
128
+ api_1.on("pointerDown", handlePointerDown);
129
+ api_1.on("pointerUp", handlePointerUp);
130
+ api_1.on("settle", handleSettle);
131
+ return () => {
132
+ api_1.off("pointerDown", handlePointerDown);
133
+ api_1.off("pointerUp", handlePointerUp);
134
+ api_1.off("settle", handleSettle);
135
+ isPointerDownRef.current = false;
136
+ isPendingRef.current = false;
137
+ };
138
+ };
139
+ $[3] = t3;
140
+ } else {
141
+ t3 = $[3];
142
+ }
143
+ const bind = t3;
144
+ let t4;
145
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
146
+ t4 = {
147
+ watch: deferWhileBusy,
148
+ bind
149
+ };
150
+ $[4] = t4;
151
+ } else {
152
+ t4 = $[4];
153
+ }
154
+ return t4;
155
+ }
156
+ /**
157
+ * A centered row of slides browsed by drag, flick, the arrow keys, Home and End, the arrows or the indicator tabs, with
158
+ * optional rotation. Neighbouring slides stay in view as a hint that there is more, and are inert until selected.
159
+ * @param props - Arc's carousel props plus the @astra-kit/ui extensions.
160
+ * @returns The carousel section.
161
+ */
162
+ function Carousel({ label, children, index: controlledIndex, defaultIndex = 0, onIndexChange, slideSize = CAROUSEL_DEFAULT_SLIDE_SIZE, slideLabel = defaultCarouselSlideLabel, interval, autoplay = false, className, loop = false, duration, watchFocus = true, onSettle, previousLabel = CAROUSEL_COPY.previous, nextLabel = CAROUSEL_COPY.next, showControls = true, showIndicators = true, slideClassName, viewportClassName, trackClassName }) {
163
+ const slides = React.Children.toArray(children);
164
+ const count = slides.length;
165
+ const baseId = React.useId();
166
+ const getSlideId = React.useCallback((slideIndex) => `${baseId}-slide-${slideIndex}`, [baseId]);
167
+ const reduceMotion = usePrefersReducedMotion();
168
+ const isHydrated = useIsHydrated();
169
+ const [startIndex] = React.useState(() => clampSlideIndex(controlledIndex ?? defaultIndex, count));
170
+ const [selectedIndex, setSelectedIndex] = React.useState(startIndex);
171
+ const [api, setApi] = React.useState();
172
+ const [announcement, setAnnouncement] = React.useState("");
173
+ const [engineSlideCount, setEngineSlideCount] = React.useState(0);
174
+ const { watch, bind } = useDeferredReInit();
175
+ const callbacksRef = React.useRef({
176
+ onIndexChange,
177
+ onSettle,
178
+ slideLabel
179
+ });
180
+ React.useLayoutEffect(() => {
181
+ callbacksRef.current = {
182
+ onIndexChange,
183
+ onSettle,
184
+ slideLabel
185
+ };
186
+ });
187
+ const reportedIndexRef = React.useRef(startIndex);
188
+ const settledIndexRef = React.useRef(startIndex);
189
+ const isRotatingRef = React.useRef(false);
190
+ const pendingDefaultIndexRef = React.useRef(controlledIndex === undefined && defaultIndex > startIndex ? defaultIndex : undefined);
191
+ const options = {
192
+ align: "center",
193
+ containScroll: false,
194
+ loop,
195
+ watchFocus,
196
+ watchResize: watch,
197
+ watchSlides: watch,
198
+ ...duration === undefined ? {} : { duration }
199
+ };
200
+ React.useEffect(() => bind(api), [api, bind]);
201
+ React.useLayoutEffect(() => {
202
+ if (!api) return;
203
+ api.scrollTo(reportedIndexRef.current, true);
204
+ }, [api]);
205
+ React.useEffect(() => {
206
+ if (!api) return;
207
+ const handleSettle = () => {
208
+ const settledIndex = api.selectedScrollSnap();
209
+ if (settledIndex === settledIndexRef.current) return;
210
+ settledIndexRef.current = settledIndex;
211
+ callbacksRef.current.onSettle?.(settledIndex);
212
+ };
213
+ const handleSelect = () => {
214
+ const nextIndex = api.selectedScrollSnap();
215
+ setSelectedIndex(nextIndex);
216
+ if (nextIndex !== reportedIndexRef.current) {
217
+ pendingDefaultIndexRef.current = undefined;
218
+ reportedIndexRef.current = nextIndex;
219
+ const { onIndexChange: reportIndex, slideLabel: nameSlide } = callbacksRef.current;
220
+ reportIndex?.(nextIndex);
221
+ if (!isRotatingRef.current) setAnnouncement(nameSlide(nextIndex, api.slideNodes().length));
222
+ }
223
+ isRotatingRef.current = false;
224
+ if (api.internalEngine().scrollBody.settled() && !api.internalEngine().dragHandler.pointerDown()) handleSettle();
225
+ };
226
+ const handleReInit = () => {
227
+ setEngineSlideCount(api.slideNodes().length);
228
+ handleSelect();
229
+ handleSettle();
230
+ };
231
+ api.on("select", handleSelect);
232
+ api.on("settle", handleSettle);
233
+ api.on("reInit", handleReInit);
234
+ return () => {
235
+ api.off("select", handleSelect);
236
+ api.off("settle", handleSettle);
237
+ api.off("reInit", handleReInit);
238
+ };
239
+ }, [api]);
240
+ React.useEffect(() => {
241
+ if (!api || controlledIndex === undefined) return;
242
+ const nextIndex = clampSlideIndex(controlledIndex, api.slideNodes().length);
243
+ if (nextIndex === api.selectedScrollSnap()) return;
244
+ reportedIndexRef.current = nextIndex;
245
+ api.scrollTo(nextIndex, reduceMotion);
246
+ }, [
247
+ api,
248
+ controlledIndex,
249
+ engineSlideCount,
250
+ reduceMotion,
251
+ selectedIndex
252
+ ]);
253
+ React.useEffect(() => {
254
+ const pendingIndex = pendingDefaultIndexRef.current;
255
+ if (!api || pendingIndex === undefined || api.slideNodes().length <= pendingIndex) return;
256
+ pendingDefaultIndexRef.current = undefined;
257
+ reportedIndexRef.current = pendingIndex;
258
+ settledIndexRef.current = pendingIndex;
259
+ api.scrollTo(pendingIndex, true);
260
+ }, [api, engineSlideCount]);
261
+ const rotation = useRotation({
262
+ api,
263
+ count,
264
+ interval,
265
+ autoplay,
266
+ reduceMotion,
267
+ isHydrated,
268
+ selectedIndex,
269
+ loop,
270
+ isRotatingRef
271
+ });
272
+ const visibleIndex = clampSlideIndex(selectedIndex, count);
273
+ const hasControlRow = count > 1 && (showControls || showIndicators || rotation.hasControl);
274
+ const hasIndicators = count > 1 && showIndicators;
275
+ const rootStyle = { [CAROUSEL_SLIDE_SIZE_PROPERTY]: slideSize };
276
+ return /* @__PURE__ */ _jsxs(CarouselRoot, {
277
+ opts: options,
278
+ setApi,
279
+ "aria-label": label,
280
+ className: cn("@container/carousel grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-4", className),
281
+ style: rootStyle,
282
+ onPointerEnter: (event) => {
283
+ if (event.pointerType === "mouse") rotation.setIsHovered(true);
284
+ },
285
+ onPointerLeave: () => rotation.setIsHovered(false),
286
+ onFocus: (event) => rotation.handleFocus(event.target),
287
+ onBlur: (event) => {
288
+ if (!event.currentTarget.contains(event.relatedTarget)) rotation.handleFocus(null);
289
+ },
290
+ ref: rotation.rootRef,
291
+ children: [
292
+ /* @__PURE__ */ _jsx(CarouselContent, {
293
+ viewportClassName,
294
+ className: cn("select-none [&_img]:[-webkit-user-drag:none]", trackClassName),
295
+ children: slides.map((slide, slideIndex) => /* @__PURE__ */ _jsx(CarouselItem, {
296
+ id: getSlideId(slideIndex),
297
+ role: hasIndicators ? "tabpanel" : "group",
298
+ "aria-label": slideLabel(slideIndex, count),
299
+ inert: slideIndex !== visibleIndex || undefined,
300
+ className: cn("basis-(--carousel-slide)", slideClassName),
301
+ children: slide
302
+ }, React.isValidElement(slide) && slide.key != null ? slide.key : slideIndex))
303
+ }),
304
+ hasControlRow ? /* @__PURE__ */ _jsxs("div", {
305
+ "data-slot": "carousel-controls",
306
+ className: "flex min-w-0 items-center gap-2 px-[calc((100cqw_-_var(--carousel-slide))/2)] @max-[340px]/carousel:gap-1 @max-[340px]/carousel:px-[max(0px,calc((100cqw_-_var(--carousel-slide))/2_-_var(--spacing)*2))]",
307
+ children: [
308
+ rotation.hasControl ? /* @__PURE__ */ _jsx(ControlButton, {
309
+ ref: rotation.playRef,
310
+ "data-slot": "carousel-rotation",
311
+ variant: "outline",
312
+ size: "icon",
313
+ className: "size-(--control-height-sm) rounded-full border-border bg-surface text-foreground hover-fine:bg-surface-muted",
314
+ "aria-label": rotation.isPlaying ? CAROUSEL_COPY.pauseRotation : CAROUSEL_COPY.startRotation,
315
+ disabled: !rotation.canRotate,
316
+ onClick: rotation.toggle,
317
+ children: /* @__PURE__ */ _jsx("span", {
318
+ className: "grid size-4 place-items-center",
319
+ children: /* @__PURE__ */ _jsx(AnimatePresence, {
320
+ initial: false,
321
+ children: /* @__PURE__ */ _jsx(motion.span, {
322
+ className: "col-start-1 row-start-1 grid place-items-center",
323
+ initial: reduceMotion ? { opacity: 0 } : rotationIconHidden,
324
+ animate: rotationIconRest,
325
+ exit: reduceMotion ? {
326
+ opacity: 0,
327
+ transition: { duration: 0 }
328
+ } : rotationIconExit,
329
+ transition: reduceMotion ? { duration: 0 } : rotationIconEnter,
330
+ children: rotation.isPlaying ? /* @__PURE__ */ _jsx(Pause, {
331
+ size: CAROUSEL_ROTATION_ICON_SIZE_PX,
332
+ strokeWidth: 1.75,
333
+ fill: "currentColor",
334
+ "aria-hidden": "true"
335
+ }) : /* @__PURE__ */ _jsx(Play, {
336
+ size: CAROUSEL_ROTATION_ICON_SIZE_PX,
337
+ strokeWidth: 1.75,
338
+ fill: "currentColor",
339
+ "aria-hidden": "true"
340
+ })
341
+ }, rotation.isPlaying ? "pause" : "play")
342
+ })
343
+ })
344
+ }) : null,
345
+ showIndicators ? /* @__PURE__ */ _jsx(CarouselIndicators, {
346
+ slideLabel,
347
+ getSlideId,
348
+ drain: rotation.drain,
349
+ initialCount: count,
350
+ initialIndex: startIndex
351
+ }) : null,
352
+ showControls ? /* @__PURE__ */ _jsxs("div", {
353
+ className: "ms-auto flex flex-none gap-2 @max-[340px]/carousel:gap-1",
354
+ children: [/* @__PURE__ */ _jsx(CarouselPrevious, { "aria-label": previousLabel }), /* @__PURE__ */ _jsx(CarouselNext, { "aria-label": nextLabel })]
355
+ }) : null
356
+ ]
357
+ }) : null,
358
+ /* @__PURE__ */ _jsx("span", {
359
+ className: "sr-only",
360
+ "aria-live": "polite",
361
+ "aria-atomic": "true",
362
+ children: announcement
363
+ })
364
+ ]
365
+ });
366
+ }
367
+ /**
368
+ * Arc's slide rotation: each slide stays for `interval` while its pill drains, then the carousel moves on, wrapping to
369
+ * the first slide at the end. Rotation pauses on hover, keyboard focus, drag, offscreen and in hidden tabs; pausing it
370
+ * with the control refills the pill. Reduced motion, once hydrated, makes rotation unavailable and disables the control,
371
+ * which stays in place so the control row keeps its layout after hydration.
372
+ * @param settings - Carousel state the rotation reads.
373
+ * @returns Rotation state and the handlers the carousel binds.
374
+ */
375
+ function useRotation(t0) {
376
+ const $ = _c(37);
377
+ const { api, count, interval, autoplay, reduceMotion, isHydrated, selectedIndex, loop, isRotatingRef } = t0;
378
+ const [isPlaying, setIsPlaying] = React.useState(autoplay);
379
+ const [isHovered, setIsHovered] = React.useState(false);
380
+ const [isFocusPaused, setIsFocusPaused] = React.useState(false);
381
+ const [isDragging, setIsDragging] = React.useState(false);
382
+ const [isInView, setIsInView] = React.useState(true);
383
+ const [isPageVisible, setIsPageVisible] = React.useState(true);
384
+ const drain = useMotionValue(0);
385
+ const rootRef = React.useRef(null);
386
+ const playRef = React.useRef(null);
387
+ const hasControl = Boolean(interval) && count > 1;
388
+ const canRotate = hasControl && !(isHydrated && reduceMotion);
389
+ const isRunning = canRotate && isPlaying && !isHovered && !isFocusPaused && !isDragging && isInView && isPageVisible;
390
+ let t1;
391
+ let t2;
392
+ if ($[0] !== api) {
393
+ t1 = () => {
394
+ if (!api) {
395
+ return;
396
+ }
397
+ const handlePointerDown = () => setIsDragging(true);
398
+ const handlePointerUp = () => setIsDragging(false);
399
+ api.on("pointerDown", handlePointerDown);
400
+ api.on("pointerUp", handlePointerUp);
401
+ return () => {
402
+ api.off("pointerDown", handlePointerDown);
403
+ api.off("pointerUp", handlePointerUp);
404
+ };
405
+ };
406
+ t2 = [api];
407
+ $[0] = api;
408
+ $[1] = t1;
409
+ $[2] = t2;
410
+ } else {
411
+ t1 = $[1];
412
+ t2 = $[2];
413
+ }
414
+ React.useEffect(t1, t2);
415
+ let t3;
416
+ if ($[3] !== drain) {
417
+ t3 = () => {
418
+ drain.jump(0);
419
+ };
420
+ $[3] = drain;
421
+ $[4] = t3;
422
+ } else {
423
+ t3 = $[4];
424
+ }
425
+ let t4;
426
+ if ($[5] !== drain || $[6] !== selectedIndex) {
427
+ t4 = [drain, selectedIndex];
428
+ $[5] = drain;
429
+ $[6] = selectedIndex;
430
+ $[7] = t4;
431
+ } else {
432
+ t4 = $[7];
433
+ }
434
+ React.useEffect(t3, t4);
435
+ let t5;
436
+ if ($[8] !== api || $[9] !== drain || $[10] !== interval || $[11] !== isRotatingRef || $[12] !== isRunning || $[13] !== loop) {
437
+ t5 = () => {
438
+ if (!isRunning || !interval || !api) {
439
+ return;
440
+ }
441
+ const controls = animate(drain, 1, {
442
+ duration: (1 - drain.get()) * interval / 1e3,
443
+ ease: "linear",
444
+ onComplete: () => {
445
+ isRotatingRef.current = true;
446
+ if (loop || api.canScrollNext()) {
447
+ api.scrollNext();
448
+ } else {
449
+ api.scrollTo(0);
450
+ }
451
+ }
452
+ });
453
+ return () => controls.stop();
454
+ };
455
+ $[8] = api;
456
+ $[9] = drain;
457
+ $[10] = interval;
458
+ $[11] = isRotatingRef;
459
+ $[12] = isRunning;
460
+ $[13] = loop;
461
+ $[14] = t5;
462
+ } else {
463
+ t5 = $[14];
464
+ }
465
+ let t6;
466
+ if ($[15] !== api || $[16] !== drain || $[17] !== interval || $[18] !== isRotatingRef || $[19] !== isRunning || $[20] !== loop || $[21] !== selectedIndex) {
467
+ t6 = [
468
+ api,
469
+ drain,
470
+ interval,
471
+ isRotatingRef,
472
+ isRunning,
473
+ loop,
474
+ selectedIndex
475
+ ];
476
+ $[15] = api;
477
+ $[16] = drain;
478
+ $[17] = interval;
479
+ $[18] = isRotatingRef;
480
+ $[19] = isRunning;
481
+ $[20] = loop;
482
+ $[21] = selectedIndex;
483
+ $[22] = t6;
484
+ } else {
485
+ t6 = $[22];
486
+ }
487
+ React.useEffect(t5, t6);
488
+ let t7;
489
+ let t8;
490
+ if ($[23] !== interval) {
491
+ t7 = () => {
492
+ const root = rootRef.current;
493
+ if (!interval || !root) {
494
+ return;
495
+ }
496
+ const observer = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver((t9) => {
497
+ const [entry] = t9;
498
+ if (entry) {
499
+ setIsInView(entry.isIntersecting);
500
+ }
501
+ });
502
+ observer?.observe(root);
503
+ const handleVisibilityChange = () => setIsPageVisible(document.visibilityState !== "hidden");
504
+ handleVisibilityChange();
505
+ document.addEventListener("visibilitychange", handleVisibilityChange);
506
+ return () => {
507
+ observer?.disconnect();
508
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
509
+ };
510
+ };
511
+ t8 = [interval];
512
+ $[23] = interval;
513
+ $[24] = t7;
514
+ $[25] = t8;
515
+ } else {
516
+ t7 = $[24];
517
+ t8 = $[25];
518
+ }
519
+ React.useEffect(t7, t8);
520
+ let t9;
521
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
522
+ t9 = (target) => {
523
+ if (!(target instanceof Element) || target === playRef.current) {
524
+ setIsFocusPaused(false);
525
+ return;
526
+ }
527
+ setIsFocusPaused(target.matches(":focus-visible"));
528
+ };
529
+ $[26] = t9;
530
+ } else {
531
+ t9 = $[26];
532
+ }
533
+ const handleFocus = t9;
534
+ let t10;
535
+ if ($[27] !== drain || $[28] !== isPlaying || $[29] !== reduceMotion) {
536
+ t10 = () => {
537
+ if (!isPlaying) {
538
+ setIsPlaying(true);
539
+ return;
540
+ }
541
+ setIsPlaying(false);
542
+ if (reduceMotion) {
543
+ drain.jump(0);
544
+ } else {
545
+ animate(drain, 0, {
546
+ duration: ARC_DURATION.standard,
547
+ ease: [...ARC_EASE.standard]
548
+ });
549
+ }
550
+ };
551
+ $[27] = drain;
552
+ $[28] = isPlaying;
553
+ $[29] = reduceMotion;
554
+ $[30] = t10;
555
+ } else {
556
+ t10 = $[30];
557
+ }
558
+ const toggle = t10;
559
+ const t11 = canRotate && isPlaying;
560
+ const t12 = canRotate ? drain : undefined;
561
+ let t13;
562
+ if ($[31] !== canRotate || $[32] !== hasControl || $[33] !== t11 || $[34] !== t12 || $[35] !== toggle) {
563
+ t13 = {
564
+ hasControl,
565
+ canRotate,
566
+ isPlaying: t11,
567
+ drain: t12,
568
+ rootRef,
569
+ playRef,
570
+ setIsHovered,
571
+ handleFocus,
572
+ toggle
573
+ };
574
+ $[31] = canRotate;
575
+ $[32] = hasControl;
576
+ $[33] = t11;
577
+ $[34] = t12;
578
+ $[35] = toggle;
579
+ $[36] = t13;
580
+ } else {
581
+ t13 = $[36];
582
+ }
583
+ return t13;
584
+ }
585
+ export { Carousel };
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps } from "react";
2
+ import { Checkbox as CheckboxPrimitive } from "radix-ui";
3
+ export type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root> & {
4
+ /** Visible label beside the box, tied to it with `htmlFor`. */
5
+ label?: string;
6
+ /** Helper copy under the label, linked through `aria-describedby`. */
7
+ description?: string;
8
+ };
9
+ /**
10
+ * A choice that can be on, off or indeterminate, controlled or uncontrolled like Radix's checkbox.
11
+ * @param checkboxProps - Every Radix checkbox prop, including `ref`, plus optional Arc `label` and `description`.
12
+ * @returns The labelled field when `label` or `description` is passed, otherwise the bare control.
13
+ */
14
+ declare function Checkbox({ className, label, description, id, checked, defaultChecked, onCheckedChange, "aria-describedby": ariaDescribedBy, ...props }: CheckboxProps): import("react").JSX.Element;
15
+ export { Checkbox };