@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,48 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
4
+ import { cn } from "../lib/utils.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ function Separator(t0) {
7
+ const $ = _c(10);
8
+ let className;
9
+ let props;
10
+ let t1;
11
+ if ($[0] !== t0) {
12
+ ({className, orientation: t1, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ $[3] = t1;
17
+ } else {
18
+ className = $[1];
19
+ props = $[2];
20
+ t1 = $[3];
21
+ }
22
+ const orientation = t1 === undefined ? "horizontal" : t1;
23
+ let t2;
24
+ if ($[4] !== className) {
25
+ t2 = cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className);
26
+ $[4] = className;
27
+ $[5] = t2;
28
+ } else {
29
+ t2 = $[5];
30
+ }
31
+ let t3;
32
+ if ($[6] !== orientation || $[7] !== props || $[8] !== t2) {
33
+ t3 = /* @__PURE__ */ _jsx(SeparatorPrimitive, {
34
+ "data-slot": "separator",
35
+ orientation,
36
+ className: t2,
37
+ ...props
38
+ });
39
+ $[6] = orientation;
40
+ $[7] = props;
41
+ $[8] = t2;
42
+ $[9] = t3;
43
+ } else {
44
+ t3 = $[9];
45
+ }
46
+ return t3;
47
+ }
48
+ export { Separator };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { Dialog as SheetPrimitive } from "radix-ui";
3
+ declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
4
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
5
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
6
+ /**
7
+ * Constrains top and bottom panels to the dynamic viewport and scrolls long content.
8
+ * @param props - Primitive properties and optional consumer overrides.
9
+ * @returns The styled primitive with its original interaction contract.
10
+ */
11
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
12
+ side?: "top" | "right" | "bottom" | "left";
13
+ showCloseButton?: boolean;
14
+ }): React.JSX.Element;
15
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
16
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
17
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
18
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
19
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,420 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import * as React from "react";
4
+ import { Dialog as SheetPrimitive } from "radix-ui";
5
+ import { MotionSlot } from "../motion/motion-slot.js";
6
+ import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../motion/presence.js";
7
+ import { cn } from "../lib/utils.js";
8
+ import { keepOpenOnToastInteraction } from "../lib/toast-layer.js";
9
+ import { ControlButton } from "./control-button.js";
10
+ import { XIcon } from "lucide-react";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ function Sheet(t0) {
13
+ const $ = _c(9);
14
+ let props;
15
+ if ($[0] !== t0) {
16
+ ({...props} = t0);
17
+ $[0] = t0;
18
+ $[1] = props;
19
+ } else {
20
+ props = $[1];
21
+ }
22
+ const [motionOpen, setMotionOpen] = useMotionOpenState(props);
23
+ let t1;
24
+ if ($[2] !== motionOpen || $[3] !== props || $[4] !== setMotionOpen) {
25
+ t1 = /* @__PURE__ */ _jsx(SheetPrimitive.Root, {
26
+ "data-slot": "sheet",
27
+ ...props,
28
+ open: motionOpen,
29
+ onOpenChange: setMotionOpen
30
+ });
31
+ $[2] = motionOpen;
32
+ $[3] = props;
33
+ $[4] = setMotionOpen;
34
+ $[5] = t1;
35
+ } else {
36
+ t1 = $[5];
37
+ }
38
+ let t2;
39
+ if ($[6] !== motionOpen || $[7] !== t1) {
40
+ t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
41
+ scope: "sheet",
42
+ open: motionOpen,
43
+ children: t1
44
+ });
45
+ $[6] = motionOpen;
46
+ $[7] = t1;
47
+ $[8] = t2;
48
+ } else {
49
+ t2 = $[8];
50
+ }
51
+ return t2;
52
+ }
53
+ function SheetTrigger(t0) {
54
+ const $ = _c(4);
55
+ let props;
56
+ if ($[0] !== t0) {
57
+ ({...props} = t0);
58
+ $[0] = t0;
59
+ $[1] = props;
60
+ } else {
61
+ props = $[1];
62
+ }
63
+ let t1;
64
+ if ($[2] !== props) {
65
+ t1 = /* @__PURE__ */ _jsx(SheetPrimitive.Trigger, {
66
+ "data-slot": "sheet-trigger",
67
+ ...props
68
+ });
69
+ $[2] = props;
70
+ $[3] = t1;
71
+ } else {
72
+ t1 = $[3];
73
+ }
74
+ return t1;
75
+ }
76
+ function SheetClose(t0) {
77
+ const $ = _c(4);
78
+ let props;
79
+ if ($[0] !== t0) {
80
+ ({...props} = t0);
81
+ $[0] = t0;
82
+ $[1] = props;
83
+ } else {
84
+ props = $[1];
85
+ }
86
+ let t1;
87
+ if ($[2] !== props) {
88
+ t1 = /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
89
+ "data-slot": "sheet-close",
90
+ ...props
91
+ });
92
+ $[2] = props;
93
+ $[3] = t1;
94
+ } else {
95
+ t1 = $[3];
96
+ }
97
+ return t1;
98
+ }
99
+ function SheetPortal(t0) {
100
+ const $ = _c(4);
101
+ let props;
102
+ if ($[0] !== t0) {
103
+ ({...props} = t0);
104
+ $[0] = t0;
105
+ $[1] = props;
106
+ } else {
107
+ props = $[1];
108
+ }
109
+ let t1;
110
+ if ($[2] !== props) {
111
+ t1 = /* @__PURE__ */ _jsx(SheetPrimitive.Portal, {
112
+ "data-slot": "sheet-portal",
113
+ ...props
114
+ });
115
+ $[2] = props;
116
+ $[3] = t1;
117
+ } else {
118
+ t1 = $[3];
119
+ }
120
+ return t1;
121
+ }
122
+ function SheetOverlay(t0) {
123
+ const $ = _c(8);
124
+ let className;
125
+ let props;
126
+ if ($[0] !== t0) {
127
+ ({className, ...props} = t0);
128
+ $[0] = t0;
129
+ $[1] = className;
130
+ $[2] = props;
131
+ } else {
132
+ className = $[1];
133
+ props = $[2];
134
+ }
135
+ let t1;
136
+ if ($[3] !== className) {
137
+ t1 = cn("fixed inset-0 z-50 bg-black/30 supports-backdrop-filter:backdrop-blur-md ", className);
138
+ $[3] = className;
139
+ $[4] = t1;
140
+ } else {
141
+ t1 = $[4];
142
+ }
143
+ let t2;
144
+ if ($[5] !== props || $[6] !== t1) {
145
+ t2 = /* @__PURE__ */ _jsx(SheetPrimitive.Overlay, {
146
+ "data-slot": "sheet-overlay",
147
+ className: t1,
148
+ ...props
149
+ });
150
+ $[5] = props;
151
+ $[6] = t1;
152
+ $[7] = t2;
153
+ } else {
154
+ t2 = $[7];
155
+ }
156
+ return t2;
157
+ }
158
+ /**
159
+ * Constrains top and bottom panels to the dynamic viewport and scrolls long content.
160
+ * @param props - Primitive properties and optional consumer overrides.
161
+ * @returns The styled primitive with its original interaction contract.
162
+ */
163
+ function SheetContent(t0) {
164
+ const $ = _c(23);
165
+ let children;
166
+ let className;
167
+ let props;
168
+ let t1;
169
+ let t2;
170
+ if ($[0] !== t0) {
171
+ ({className, children, side: t1, showCloseButton: t2, ...props} = t0);
172
+ $[0] = t0;
173
+ $[1] = children;
174
+ $[2] = className;
175
+ $[3] = props;
176
+ $[4] = t1;
177
+ $[5] = t2;
178
+ } else {
179
+ children = $[1];
180
+ className = $[2];
181
+ props = $[3];
182
+ t1 = $[4];
183
+ t2 = $[5];
184
+ }
185
+ const side = t1 === undefined ? "right" : t1;
186
+ const showCloseButton = t2 === undefined ? true : t2;
187
+ const t3 = props.forceMount;
188
+ let t4;
189
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
190
+ t4 = /* @__PURE__ */ _jsx(MotionSlot, {
191
+ kind: "overlay",
192
+ children: /* @__PURE__ */ _jsx(SheetOverlay, { forceMount: true })
193
+ });
194
+ $[6] = t4;
195
+ } else {
196
+ t4 = $[6];
197
+ }
198
+ let t5;
199
+ if ($[7] !== className) {
200
+ t5 = cn("fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain data-[side=bottom]:max-h-dvh data-[side=top]:max-h-dvh bg-background bg-clip-padding text-sm shadow-lg data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm ", className);
201
+ $[7] = className;
202
+ $[8] = t5;
203
+ } else {
204
+ t5 = $[8];
205
+ }
206
+ let t6;
207
+ if ($[9] !== props.onInteractOutside) {
208
+ t6 = keepOpenOnToastInteraction(props.onInteractOutside);
209
+ $[9] = props.onInteractOutside;
210
+ $[10] = t6;
211
+ } else {
212
+ t6 = $[10];
213
+ }
214
+ let t7;
215
+ if ($[11] !== showCloseButton) {
216
+ t7 = showCloseButton && /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
217
+ "data-slot": "sheet-close",
218
+ asChild: true,
219
+ children: /* @__PURE__ */ _jsxs(ControlButton, {
220
+ variant: "ghost",
221
+ className: "absolute top-4 right-4",
222
+ size: "icon-sm",
223
+ children: [/* @__PURE__ */ _jsx(XIcon, {}), /* @__PURE__ */ _jsx("span", {
224
+ className: "sr-only",
225
+ children: "Close"
226
+ })]
227
+ })
228
+ });
229
+ $[11] = showCloseButton;
230
+ $[12] = t7;
231
+ } else {
232
+ t7 = $[12];
233
+ }
234
+ let t8;
235
+ if ($[13] !== children || $[14] !== props || $[15] !== side || $[16] !== t5 || $[17] !== t6 || $[18] !== t7) {
236
+ t8 = /* @__PURE__ */ _jsxs(React.Fragment, { children: [t4, /* @__PURE__ */ _jsx(MotionSlot, {
237
+ kind: "sheet",
238
+ children: /* @__PURE__ */ _jsxs(SheetPrimitive.Content, {
239
+ forceMount: true,
240
+ "data-slot": "sheet-content",
241
+ "data-side": side,
242
+ className: t5,
243
+ ...props,
244
+ onInteractOutside: t6,
245
+ children: [children, t7]
246
+ })
247
+ })] });
248
+ $[13] = children;
249
+ $[14] = props;
250
+ $[15] = side;
251
+ $[16] = t5;
252
+ $[17] = t6;
253
+ $[18] = t7;
254
+ $[19] = t8;
255
+ } else {
256
+ t8 = $[19];
257
+ }
258
+ let t9;
259
+ if ($[20] !== props.forceMount || $[21] !== t8) {
260
+ t9 = /* @__PURE__ */ _jsx(SheetPortal, {
261
+ forceMount: true,
262
+ children: /* @__PURE__ */ _jsx(MotionPresence, {
263
+ scope: "sheet",
264
+ forceMount: t3,
265
+ children: t8
266
+ })
267
+ });
268
+ $[20] = props.forceMount;
269
+ $[21] = t8;
270
+ $[22] = t9;
271
+ } else {
272
+ t9 = $[22];
273
+ }
274
+ return t9;
275
+ }
276
+ function SheetHeader(t0) {
277
+ const $ = _c(8);
278
+ let className;
279
+ let props;
280
+ if ($[0] !== t0) {
281
+ ({className, ...props} = t0);
282
+ $[0] = t0;
283
+ $[1] = className;
284
+ $[2] = props;
285
+ } else {
286
+ className = $[1];
287
+ props = $[2];
288
+ }
289
+ let t1;
290
+ if ($[3] !== className) {
291
+ t1 = cn("flex flex-col gap-1.5 p-4", className);
292
+ $[3] = className;
293
+ $[4] = t1;
294
+ } else {
295
+ t1 = $[4];
296
+ }
297
+ let t2;
298
+ if ($[5] !== props || $[6] !== t1) {
299
+ t2 = /* @__PURE__ */ _jsx("div", {
300
+ "data-slot": "sheet-header",
301
+ className: t1,
302
+ ...props
303
+ });
304
+ $[5] = props;
305
+ $[6] = t1;
306
+ $[7] = t2;
307
+ } else {
308
+ t2 = $[7];
309
+ }
310
+ return t2;
311
+ }
312
+ function SheetFooter(t0) {
313
+ const $ = _c(8);
314
+ let className;
315
+ let props;
316
+ if ($[0] !== t0) {
317
+ ({className, ...props} = t0);
318
+ $[0] = t0;
319
+ $[1] = className;
320
+ $[2] = props;
321
+ } else {
322
+ className = $[1];
323
+ props = $[2];
324
+ }
325
+ let t1;
326
+ if ($[3] !== className) {
327
+ t1 = cn("mt-auto flex flex-col gap-2 p-4", className);
328
+ $[3] = className;
329
+ $[4] = t1;
330
+ } else {
331
+ t1 = $[4];
332
+ }
333
+ let t2;
334
+ if ($[5] !== props || $[6] !== t1) {
335
+ t2 = /* @__PURE__ */ _jsx("div", {
336
+ "data-slot": "sheet-footer",
337
+ className: t1,
338
+ ...props
339
+ });
340
+ $[5] = props;
341
+ $[6] = t1;
342
+ $[7] = t2;
343
+ } else {
344
+ t2 = $[7];
345
+ }
346
+ return t2;
347
+ }
348
+ function SheetTitle(t0) {
349
+ const $ = _c(8);
350
+ let className;
351
+ let props;
352
+ if ($[0] !== t0) {
353
+ ({className, ...props} = t0);
354
+ $[0] = t0;
355
+ $[1] = className;
356
+ $[2] = props;
357
+ } else {
358
+ className = $[1];
359
+ props = $[2];
360
+ }
361
+ let t1;
362
+ if ($[3] !== className) {
363
+ t1 = cn("font-heading font-medium text-foreground", className);
364
+ $[3] = className;
365
+ $[4] = t1;
366
+ } else {
367
+ t1 = $[4];
368
+ }
369
+ let t2;
370
+ if ($[5] !== props || $[6] !== t1) {
371
+ t2 = /* @__PURE__ */ _jsx(SheetPrimitive.Title, {
372
+ "data-slot": "sheet-title",
373
+ className: t1,
374
+ ...props
375
+ });
376
+ $[5] = props;
377
+ $[6] = t1;
378
+ $[7] = t2;
379
+ } else {
380
+ t2 = $[7];
381
+ }
382
+ return t2;
383
+ }
384
+ function SheetDescription(t0) {
385
+ const $ = _c(8);
386
+ let className;
387
+ let props;
388
+ if ($[0] !== t0) {
389
+ ({className, ...props} = t0);
390
+ $[0] = t0;
391
+ $[1] = className;
392
+ $[2] = props;
393
+ } else {
394
+ className = $[1];
395
+ props = $[2];
396
+ }
397
+ let t1;
398
+ if ($[3] !== className) {
399
+ t1 = cn("text-sm text-muted-foreground", className);
400
+ $[3] = className;
401
+ $[4] = t1;
402
+ } else {
403
+ t1 = $[4];
404
+ }
405
+ let t2;
406
+ if ($[5] !== props || $[6] !== t1) {
407
+ t2 = /* @__PURE__ */ _jsx(SheetPrimitive.Description, {
408
+ "data-slot": "sheet-description",
409
+ className: t1,
410
+ ...props
411
+ });
412
+ $[5] = props;
413
+ $[6] = t1;
414
+ $[7] = t2;
415
+ } else {
416
+ t2 = $[7];
417
+ }
418
+ return t2;
419
+ }
420
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Internal: panel state shared by the sidebar parts and by components that adapt to the icon rail
3
+ * (such as `AccountMenu`), kept apart so they can read it without importing the sidebar itself.
4
+ */
5
+ import * as React from "react";
6
+ export type SidebarPanelState = {
7
+ /** Whether the desktop sidebar is shrunk to its icon rail; always false in the mobile sheet. */
8
+ collapsed: boolean;
9
+ collapsible: "offcanvas" | "icon" | "none";
10
+ side: "left" | "right";
11
+ };
12
+ export declare const SidebarPanelContext: React.Context<SidebarPanelState | null>;
13
+ /**
14
+ * Reads the panel state when rendered inside a `Sidebar`, and `null` anywhere else.
15
+ * @returns The panel state, or `null` outside a sidebar.
16
+ */
17
+ export declare function useOptionalSidebarPanel(): SidebarPanelState | null;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ /**
3
+ * Internal: panel state shared by the sidebar parts and by components that adapt to the icon rail
4
+ * (such as `AccountMenu`), kept apart so they can read it without importing the sidebar itself.
5
+ */
6
+ import * as React from "react";
7
+ export const SidebarPanelContext = React.createContext(null);
8
+ /**
9
+ * Reads the panel state when rendered inside a `Sidebar`, and `null` anywhere else.
10
+ * @returns The panel state, or `null` outside a sidebar.
11
+ */
12
+ export function useOptionalSidebarPanel() {
13
+ return React.use(SidebarPanelContext);
14
+ }