@exsto/ds 0.0.1-rc.13 → 0.0.1-rc.15

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 (184) hide show
  1. package/dist/date-picker.js +1 -344
  2. package/dist/index.js +75 -4513
  3. package/dist/rich-text-editor.js +3 -904
  4. package/dist/source-hash.txt +1 -1
  5. package/dist/styles.css +9 -8
  6. package/dist/ui/src/components/edyn/animated-number/animated-number.js +108 -0
  7. package/dist/ui/src/components/edyn/animated-number/animated-number.js.map +1 -0
  8. package/dist/ui/src/components/edyn/audio-player/audio-player.js +86 -0
  9. package/dist/ui/src/components/edyn/audio-player/audio-player.js.map +1 -0
  10. package/dist/ui/src/components/edyn/date-picker/date-picker.js +250 -0
  11. package/dist/ui/src/components/edyn/date-picker/date-picker.js.map +1 -0
  12. package/dist/ui/src/components/edyn/date-picker/date-text.js +105 -0
  13. package/dist/ui/src/components/edyn/date-picker/date-text.js.map +1 -0
  14. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.js +59 -0
  15. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.js.map +1 -0
  16. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.js +86 -0
  17. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.js.map +1 -0
  18. package/dist/ui/src/components/edyn/multi-select/multi-select.js +332 -0
  19. package/dist/ui/src/components/edyn/multi-select/multi-select.js.map +1 -0
  20. package/dist/ui/src/components/edyn/progress-line/progress-line.js +100 -0
  21. package/dist/ui/src/components/edyn/progress-line/progress-line.js.map +1 -0
  22. package/dist/ui/src/components/edyn/rich-text-content/allow-list.js +37 -0
  23. package/dist/ui/src/components/edyn/rich-text-content/allow-list.js.map +1 -0
  24. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.js +124 -0
  25. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.js.map +1 -0
  26. package/dist/ui/src/components/edyn/rich-text-editor/extensions.js +124 -0
  27. package/dist/ui/src/components/edyn/rich-text-editor/extensions.js.map +1 -0
  28. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.js +232 -0
  29. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.js.map +1 -0
  30. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.js +244 -0
  31. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.js.map +1 -0
  32. package/dist/ui/src/components/edyn/rich-text-editor/serialize.js +55 -0
  33. package/dist/ui/src/components/edyn/rich-text-editor/serialize.js.map +1 -0
  34. package/dist/ui/src/components/edyn/rich-text-editor/sync.js +34 -0
  35. package/dist/ui/src/components/edyn/rich-text-editor/sync.js.map +1 -0
  36. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.js +235 -0
  37. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.js.map +1 -0
  38. package/dist/ui/src/components/edyn/rich-text-editor/types.js +26 -0
  39. package/dist/ui/src/components/edyn/rich-text-editor/types.js.map +1 -0
  40. package/dist/ui/src/components/edyn/video-player/video-player.js +132 -0
  41. package/dist/ui/src/components/edyn/video-player/video-player.js.map +1 -0
  42. package/dist/ui/src/components/ui/accordion/accordion.js +83 -0
  43. package/dist/ui/src/components/ui/accordion/accordion.js.map +1 -0
  44. package/dist/ui/src/components/ui/alert/alert.js +47 -0
  45. package/dist/ui/src/components/ui/alert/alert.js.map +1 -0
  46. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.js +95 -0
  47. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.js.map +1 -0
  48. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.js +15 -0
  49. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.js.map +1 -0
  50. package/dist/ui/src/components/ui/attachment/attachment.js +105 -0
  51. package/dist/ui/src/components/ui/attachment/attachment.js.map +1 -0
  52. package/dist/ui/src/components/ui/avatar/avatar.js +51 -0
  53. package/dist/ui/src/components/ui/avatar/avatar.js.map +1 -0
  54. package/dist/ui/src/components/ui/badge/badge.js +47 -0
  55. package/dist/ui/src/components/ui/badge/badge.js.map +1 -0
  56. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.js +73 -0
  57. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.js.map +1 -0
  58. package/dist/ui/src/components/ui/bubble/bubble.js +74 -0
  59. package/dist/ui/src/components/ui/bubble/bubble.js.map +1 -0
  60. package/dist/{chunks/input-syWxjY2U.js → ui/src/components/ui/button/button.js} +3 -82
  61. package/dist/ui/src/components/ui/button/button.js.map +1 -0
  62. package/dist/ui/src/components/ui/button-group/button-group.js +37 -0
  63. package/dist/ui/src/components/ui/button-group/button-group.js.map +1 -0
  64. package/dist/{chunks/date-range-picker-CWVcHgy2.js → ui/src/components/ui/calendar/calendar.js} +6 -100
  65. package/dist/ui/src/components/ui/calendar/calendar.js.map +1 -0
  66. package/dist/ui/src/components/ui/card/card.js +57 -0
  67. package/dist/ui/src/components/ui/card/card.js.map +1 -0
  68. package/dist/ui/src/components/ui/carousel/carousel.js +136 -0
  69. package/dist/ui/src/components/ui/carousel/carousel.js.map +1 -0
  70. package/dist/ui/src/components/ui/chart/chart.js +168 -0
  71. package/dist/ui/src/components/ui/chart/chart.js.map +1 -0
  72. package/dist/ui/src/components/ui/checkbox/checkbox.js +21 -0
  73. package/dist/ui/src/components/ui/checkbox/checkbox.js.map +1 -0
  74. package/dist/ui/src/components/ui/collapsible/collapsible.js +26 -0
  75. package/dist/ui/src/components/ui/collapsible/collapsible.js.map +1 -0
  76. package/dist/ui/src/components/ui/combobox/combobox.js +85 -0
  77. package/dist/ui/src/components/ui/combobox/combobox.js.map +1 -0
  78. package/dist/ui/src/components/ui/command/command.js +118 -0
  79. package/dist/ui/src/components/ui/command/command.js.map +1 -0
  80. package/dist/ui/src/components/ui/context-menu/context-menu.js +134 -0
  81. package/dist/ui/src/components/ui/context-menu/context-menu.js.map +1 -0
  82. package/dist/ui/src/components/ui/dialog/dialog.js +92 -0
  83. package/dist/ui/src/components/ui/dialog/dialog.js.map +1 -0
  84. package/dist/ui/src/components/ui/direction/direction.js +2 -0
  85. package/dist/ui/src/components/ui/drawer/drawer.js +86 -0
  86. package/dist/ui/src/components/ui/drawer/drawer.js.map +1 -0
  87. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.js +160 -0
  88. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.js.map +1 -0
  89. package/dist/ui/src/components/ui/empty/empty.js +61 -0
  90. package/dist/ui/src/components/ui/empty/empty.js.map +1 -0
  91. package/dist/ui/src/components/ui/field/field.js +36 -0
  92. package/dist/ui/src/components/ui/field/field.js.map +1 -0
  93. package/dist/ui/src/components/ui/hover-card/hover-card.js +38 -0
  94. package/dist/ui/src/components/ui/hover-card/hover-card.js.map +1 -0
  95. package/dist/ui/src/components/ui/indicator/indicator.js +79 -0
  96. package/dist/ui/src/components/ui/indicator/indicator.js.map +1 -0
  97. package/dist/ui/src/components/ui/input/input.js +16 -0
  98. package/dist/ui/src/components/ui/input/input.js.map +1 -0
  99. package/dist/ui/src/components/ui/input-group/input-group.js +77 -0
  100. package/dist/ui/src/components/ui/input-group/input-group.js.map +1 -0
  101. package/dist/ui/src/components/ui/input-otp/input-otp.js +48 -0
  102. package/dist/ui/src/components/ui/input-otp/input-otp.js.map +1 -0
  103. package/dist/ui/src/components/ui/item/item.js +122 -0
  104. package/dist/ui/src/components/ui/item/item.js.map +1 -0
  105. package/dist/ui/src/components/ui/kbd/kbd.js +21 -0
  106. package/dist/ui/src/components/ui/kbd/kbd.js.map +1 -0
  107. package/dist/ui/src/components/ui/label/label.js +14 -0
  108. package/dist/ui/src/components/ui/label/label.js.map +1 -0
  109. package/dist/ui/src/components/ui/marker/marker.js +44 -0
  110. package/dist/ui/src/components/ui/marker/marker.js.map +1 -0
  111. package/dist/ui/src/components/ui/menubar/menubar.js +137 -0
  112. package/dist/ui/src/components/ui/menubar/menubar.js.map +1 -0
  113. package/dist/ui/src/components/ui/message/message.js +50 -0
  114. package/dist/ui/src/components/ui/message/message.js.map +1 -0
  115. package/dist/ui/src/components/ui/message-scroller/message-scroller.js +61 -0
  116. package/dist/ui/src/components/ui/message-scroller/message-scroller.js.map +1 -0
  117. package/dist/ui/src/components/ui/native-select/native-select.js +39 -0
  118. package/dist/ui/src/components/ui/native-select/native-select.js.map +1 -0
  119. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.js +84 -0
  120. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.js.map +1 -0
  121. package/dist/ui/src/components/ui/pagination/pagination.js +104 -0
  122. package/dist/ui/src/components/ui/pagination/pagination.js.map +1 -0
  123. package/dist/ui/src/components/ui/popover/popover.js +56 -0
  124. package/dist/ui/src/components/ui/popover/popover.js.map +1 -0
  125. package/dist/ui/src/components/ui/progress/progress.js +70 -0
  126. package/dist/ui/src/components/ui/progress/progress.js.map +1 -0
  127. package/dist/ui/src/components/ui/questionnaire/questionnaire.js +171 -0
  128. package/dist/ui/src/components/ui/questionnaire/questionnaire.js.map +1 -0
  129. package/dist/ui/src/components/ui/radio-group/radio-group.js +29 -0
  130. package/dist/ui/src/components/ui/radio-group/radio-group.js.map +1 -0
  131. package/dist/ui/src/components/ui/resizable/resizable.js +29 -0
  132. package/dist/ui/src/components/ui/resizable/resizable.js.map +1 -0
  133. package/dist/ui/src/components/ui/scroll-area/scroll-area.js +119 -0
  134. package/dist/ui/src/components/ui/scroll-area/scroll-area.js.map +1 -0
  135. package/dist/ui/src/components/ui/select/select.js +99 -0
  136. package/dist/ui/src/components/ui/select/select.js.map +1 -0
  137. package/dist/ui/src/components/ui/separator/separator.js +30 -0
  138. package/dist/ui/src/components/ui/separator/separator.js.map +1 -0
  139. package/dist/ui/src/components/ui/sheet/sheet.js +89 -0
  140. package/dist/ui/src/components/ui/sheet/sheet.js.map +1 -0
  141. package/dist/ui/src/components/ui/sidebar/sidebar.js +383 -0
  142. package/dist/ui/src/components/ui/sidebar/sidebar.js.map +1 -0
  143. package/dist/ui/src/components/ui/skeleton/skeleton.js +14 -0
  144. package/dist/ui/src/components/ui/skeleton/skeleton.js.map +1 -0
  145. package/dist/ui/src/components/ui/slider/slider.js +49 -0
  146. package/dist/ui/src/components/ui/slider/slider.js.map +1 -0
  147. package/dist/ui/src/components/ui/spinner/spinner.js +28 -0
  148. package/dist/ui/src/components/ui/spinner/spinner.js.map +1 -0
  149. package/dist/ui/src/components/ui/switch/switch.js +20 -0
  150. package/dist/ui/src/components/ui/switch/switch.js.map +1 -0
  151. package/dist/ui/src/components/ui/table/table.js +68 -0
  152. package/dist/ui/src/components/ui/table/table.js.map +1 -0
  153. package/dist/ui/src/components/ui/tabs/tabs.js +50 -0
  154. package/dist/ui/src/components/ui/tabs/tabs.js.map +1 -0
  155. package/dist/ui/src/components/ui/textarea/textarea.js +14 -0
  156. package/dist/ui/src/components/ui/textarea/textarea.js.map +1 -0
  157. package/dist/ui/src/components/ui/toast/toast.js +124 -0
  158. package/dist/ui/src/components/ui/toast/toast.js.map +1 -0
  159. package/dist/ui/src/components/ui/toggle/toggle.js +37 -0
  160. package/dist/ui/src/components/ui/toggle/toggle.js.map +1 -0
  161. package/dist/ui/src/components/ui/toggle-group/toggle-group.js +56 -0
  162. package/dist/ui/src/components/ui/toggle-group/toggle-group.js.map +1 -0
  163. package/dist/ui/src/components/ui/tooltip/tooltip.js +42 -0
  164. package/dist/ui/src/components/ui/tooltip/tooltip.js.map +1 -0
  165. package/dist/ui/src/hooks/use-media-player.js +140 -0
  166. package/dist/ui/src/hooks/use-media-player.js.map +1 -0
  167. package/dist/ui/src/hooks/use-merged-refs.js +18 -0
  168. package/dist/ui/src/hooks/use-merged-refs.js.map +1 -0
  169. package/dist/ui/src/hooks/use-mobile.js +20 -0
  170. package/dist/ui/src/hooks/use-mobile.js.map +1 -0
  171. package/dist/ui/src/lib/first-weekday.js +34 -0
  172. package/dist/ui/src/lib/first-weekday.js.map +1 -0
  173. package/dist/ui/src/lib/popup-list.js +26 -0
  174. package/dist/ui/src/lib/popup-list.js.map +1 -0
  175. package/dist/ui/src/lib/utils.js +21 -0
  176. package/dist/ui/src/lib/utils.js.map +1 -0
  177. package/package.json +1 -1
  178. package/dist/chunks/date-range-picker-CWVcHgy2.js.map +0 -1
  179. package/dist/chunks/input-syWxjY2U.js.map +0 -1
  180. package/dist/chunks/toggle-Bxg8P-61.js +0 -490
  181. package/dist/chunks/toggle-Bxg8P-61.js.map +0 -1
  182. package/dist/date-picker.js.map +0 -1
  183. package/dist/index.js.map +0 -1
  184. package/dist/rich-text-editor.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4514 +1,76 @@
1
- import { a as PopoverHeader, c as Button, d as cssLength, i as PopoverDescription, l as buttonVariants, n as Popover, o as PopoverTitle, r as PopoverContent, s as PopoverTrigger, t as Input, u as cn } from "./chunks/input-syWxjY2U.js";
2
- import { a as useIsMobile, n as dateToDay, o as Calendar, r as dayToDate, s as CalendarDayButton, t as DateRangePicker } from "./chunks/date-range-picker-CWVcHgy2.js";
3
- import { A as ScrollBar, C as RICH_TEXT_ELEMENTS, D as POPUP_LIST_WIDTH_CLASS, E as POPUP_ITEM_INDICATOR_CLASS, O as popupItemClass, S as RICH_TEXT_ATTRIBUTES, T as isAllowedRichTextHref, _ as DropdownMenuTrigger, a as DropdownMenuContent, b as RichTextContent, c as DropdownMenuLabel, d as DropdownMenuRadioItem, f as DropdownMenuSeparator, g as DropdownMenuSubTrigger, h as DropdownMenuSubContent, i as DropdownMenuCheckboxItem, j as useMergedRefs, k as ScrollArea, l as DropdownMenuPortal, m as DropdownMenuSub, n as toggleVariants, o as DropdownMenuGroup, p as DropdownMenuShortcut, r as DropdownMenu, s as DropdownMenuItem, t as Toggle, u as DropdownMenuRadioGroup, v as RICH_TEXT_BODY_CLASS, w as RICH_TEXT_LINK_PROTOCOLS, x as richTextToNodes, y as RICH_TEXT_MENTION_CLASS } from "./chunks/toggle-Bxg8P-61.js";
4
- import * as React from "react";
5
- import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
- import { cva } from "class-variance-authority";
8
- import { Slider as Slider$1 } from "@base-ui/react/slider";
9
- import { IconAlertOctagon, IconAlertTriangle, IconArrowDown, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconCircleCheck, IconDots, IconInfoCircle, IconLayoutSidebar, IconLoader, IconMaximize, IconMinus, IconPlayerPauseFilled, IconPlayerPlayFilled, IconSearch, IconSelector, IconVolume, IconVolumeOff, IconX } from "@tabler/icons-react";
10
- import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
11
- import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
12
- import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
13
- import { useVirtualizer } from "@tanstack/react-virtual";
14
- import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
15
- import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
16
- import { mergeProps } from "@base-ui/react/merge-props";
17
- import { useRender } from "@base-ui/react/use-render";
18
- import useEmblaCarousel from "embla-carousel-react";
19
- import * as RechartsPrimitive from "recharts";
20
- import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
21
- import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
22
- import { Command as Command$1 } from "cmdk";
23
- import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
24
- import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
25
- import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
26
- import { Menu } from "@base-ui/react/menu";
27
- import { Field as Field$1 } from "@base-ui/react/field";
28
- import { PreviewCard } from "@base-ui/react/preview-card";
29
- import { OTPInput, OTPInputContext } from "input-otp";
30
- import { Separator as Separator$1 } from "@base-ui/react/separator";
31
- import { Menubar as Menubar$1 } from "@base-ui/react/menubar";
32
- import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
33
- import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
34
- import { Progress as Progress$1 } from "@base-ui/react/progress";
35
- import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
36
- import { Radio } from "@base-ui/react/radio";
37
- import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
38
- import * as ResizablePrimitive from "react-resizable-panels";
39
- import { Select as Select$1 } from "@base-ui/react/select";
40
- import { Switch as Switch$1 } from "@base-ui/react/switch";
41
- import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
42
- import { Toast as Toast$1 } from "@base-ui/react/toast";
43
- import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
44
- import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
45
- //#region ../ui/src/components/edyn/animated-number/animated-number.tsx
46
- var DURATION = 800;
47
- var easeInOutCubic = (t) => t < .5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2;
48
- var reducedMotion$1 = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
49
- var NUMBER = new Intl.NumberFormat("en-GB");
50
- /** Thousands separated, rounded to a whole number: the default way a count reads. */
51
- var formatCount = (value) => NUMBER.format(Math.round(value) || 0);
52
- var useSeen = (element) => {
53
- const [seen, setSeen] = useState(() => typeof IntersectionObserver === "undefined");
54
- useEffect(() => {
55
- const target = element.current;
56
- if (seen || target === null) return;
57
- const observer = new IntersectionObserver((entries) => {
58
- if (entries.some((entry) => entry.isIntersecting)) {
59
- setSeen(true);
60
- observer.disconnect();
61
- }
62
- });
63
- observer.observe(target);
64
- return () => observer.disconnect();
65
- }, [element, seen]);
66
- return seen;
67
- };
68
- /**
69
- * The values to show for `targets` this frame, all on one clock and one curve, so a
70
- * count and its bar move together. They start from 0 and move once `element` has
71
- * been on screen.
72
- */
73
- var useAnimatedValues = (targets, element) => {
74
- const seen = useSeen(element);
75
- const [shown, setShown] = useState(() => targets.map(() => 0));
76
- const refCurrent = useRef(shown);
77
- const key = targets.join(",");
78
- useEffect(() => {
79
- if (!seen) return;
80
- const goal = key.split(",").map(Number);
81
- const from = goal.map((_, index) => refCurrent.current[index] ?? 0);
82
- if (from.every((value, index) => value === goal[index])) return;
83
- if (reducedMotion$1()) {
84
- refCurrent.current = goal;
85
- setShown(goal);
86
- return;
87
- }
88
- const start = performance.now();
89
- let frame = 0;
90
- const tick = (now) => {
91
- const progress = Math.min(1, (now - start) / DURATION);
92
- const eased = easeInOutCubic(progress);
93
- const next = progress === 1 ? goal : goal.map((value, index) => (from[index] ?? 0) + (value - (from[index] ?? 0)) * eased);
94
- refCurrent.current = next;
95
- setShown(next);
96
- if (progress < 1) frame = requestAnimationFrame(tick);
97
- };
98
- frame = requestAnimationFrame(tick);
99
- return () => cancelAnimationFrame(frame);
100
- }, [key, seen]);
101
- return shown;
102
- };
103
- /**
104
- * A number that moves to its new value. Its width holds the widest of where it starts
105
- * and where it lands, in tabular figures, so nothing beside it moves while the digits
106
- * change. Assistive technology reads only the final value.
107
- */
108
- var AnimatedNumber = ({ value, format = formatCount, className, ...props }) => {
109
- const refElement = useRef(null);
110
- const [shown = 0] = useAnimatedValues([value], refElement);
111
- return /* @__PURE__ */ jsx(NumberText, {
112
- element: refElement,
113
- shown,
114
- value,
115
- format,
116
- className,
117
- ...props
118
- });
119
- };
120
- /** The text of a moving number: what it shows now, held at its widest, with the final value for assistive technology. */
121
- var NumberText = ({ element, shown, value, format = formatCount, className, ...props }) => {
122
- const now = format(shown);
123
- const final = format(value);
124
- const widest = now.length > final.length ? now : final;
125
- return /* @__PURE__ */ jsxs("span", {
126
- "data-slot": "animated-number",
127
- ...props,
128
- ref: element,
129
- className,
130
- children: [/* @__PURE__ */ jsxs("span", {
131
- "aria-hidden": "true",
132
- className: "inline-grid tabular-nums",
133
- children: [/* @__PURE__ */ jsx("span", {
134
- "data-ghost": widest,
135
- className: "invisible col-start-1 row-start-1 ghost-text"
136
- }), /* @__PURE__ */ jsx("span", {
137
- "data-slot": "animated-number-value",
138
- className: "col-start-1 row-start-1",
139
- children: now
140
- })]
141
- }), /* @__PURE__ */ jsx("span", {
142
- className: "sr-only",
143
- children: final
144
- })]
145
- });
146
- };
147
- //#endregion
148
- //#region ../ui/src/components/ui/slider/slider.tsx
149
- var Slider = ({ className, value, defaultValue, min, max, step, disabled, onValueChange, onValueCommitted, name, minStepsBetweenValues, "aria-label": ariaLabel, ...props }) => {
150
- const thumbValues = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [value ?? defaultValue ?? min ?? 0];
151
- const thumbs = Array.from({ length: thumbValues.length }, (_, index) => ({
152
- id: `thumb-${index}`,
153
- index
154
- }));
155
- return /* @__PURE__ */ jsx(Slider$1.Root, {
156
- "data-slot": "slider",
157
- className: cn("relative flex w-full touch-none items-center", className),
158
- value,
159
- defaultValue,
160
- min,
161
- max,
162
- step,
163
- disabled,
164
- onValueChange,
165
- onValueCommitted,
166
- name,
167
- minStepsBetweenValues,
168
- thumbAlignment: "edge",
169
- "aria-label": ariaLabel,
170
- ...props,
171
- children: /* @__PURE__ */ jsxs(Slider$1.Control, {
172
- "data-slot": "slider-control",
173
- className: "relative flex w-full cursor-pointer touch-none items-center py-3 data-disabled:cursor-not-allowed data-disabled:opacity-50",
174
- children: [/* @__PURE__ */ jsx(Slider$1.Track, {
175
- "data-slot": "slider-track",
176
- className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted",
177
- children: /* @__PURE__ */ jsx(Slider$1.Indicator, {
178
- "data-slot": "slider-indicator",
179
- className: "absolute h-full bg-primary"
180
- })
181
- }), thumbs.map((thumb) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
182
- index: thumb.index,
183
- getAriaLabel: ariaLabel ? () => thumbValues.length > 1 ? `${ariaLabel} ${thumb.index + 1}` : ariaLabel : void 0,
184
- "data-slot": "slider-thumb",
185
- className: "relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow-sm outline-none transition-colors after:absolute after:-inset-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50"
186
- }, thumb.id))]
187
- })
188
- });
189
- };
190
- //#endregion
191
- //#region ../ui/src/hooks/use-media-player.ts
192
- /** `0:00` for anything that is not a finite, non-negative number, so a loading or errored source still renders. */
193
- var formatMediaTime = (seconds) => {
194
- if (!Number.isFinite(seconds) || seconds < 0) return "0:00";
195
- const whole = Math.floor(seconds);
196
- const hours = Math.floor(whole / 3600);
197
- const minutes = Math.floor(whole % 3600 / 60);
198
- const rest = whole % 60;
199
- const padded = `${String(rest).padStart(2, "0")}`;
200
- if (hours > 0) return `${hours}:${String(minutes).padStart(2, "0")}:${padded}`;
201
- return `${minutes}:${padded}`;
202
- };
203
- /**
204
- * Shared playback engine for the Audio and Video players. Both wrap the same
205
- * HTMLMediaElement API, so the state machine lives here once and each component
206
- * owns only its own layout and controls.
207
- */
208
- var useMediaPlayer = (options = {}) => {
209
- const { onPlay, onPause, onEnded, onTimeUpdate } = options;
210
- const refMedia = React.useRef(null);
211
- const [state, setState] = React.useState({
212
- playing: false,
213
- currentTime: 0,
214
- duration: 0,
215
- volume: 1,
216
- muted: false
217
- });
218
- React.useEffect(() => {
219
- const media = refMedia.current;
220
- if (!media) return;
221
- const syncMeta = () => {
222
- setState((previous) => ({
223
- ...previous,
224
- duration: Number.isFinite(media.duration) ? media.duration : 0,
225
- volume: media.volume,
226
- muted: media.muted
227
- }));
228
- };
229
- const handlePlay = () => {
230
- setState((previous) => ({
231
- ...previous,
232
- playing: true
233
- }));
234
- onPlay?.();
235
- };
236
- const handlePause = () => {
237
- setState((previous) => ({
238
- ...previous,
239
- playing: false
240
- }));
241
- onPause?.();
242
- };
243
- const handleEnded = () => {
244
- setState((previous) => ({
245
- ...previous,
246
- playing: false
247
- }));
248
- onEnded?.();
249
- };
250
- const handleTimeUpdate = () => {
251
- setState((previous) => ({
252
- ...previous,
253
- currentTime: media.currentTime
254
- }));
255
- onTimeUpdate?.(media.currentTime, Number.isFinite(media.duration) ? media.duration : 0);
256
- };
257
- const handleVolumeChange = () => {
258
- setState((previous) => ({
259
- ...previous,
260
- volume: media.volume,
261
- muted: media.muted
262
- }));
263
- };
264
- syncMeta();
265
- media.addEventListener("loadedmetadata", syncMeta);
266
- media.addEventListener("durationchange", syncMeta);
267
- media.addEventListener("play", handlePlay);
268
- media.addEventListener("pause", handlePause);
269
- media.addEventListener("ended", handleEnded);
270
- media.addEventListener("timeupdate", handleTimeUpdate);
271
- media.addEventListener("volumechange", handleVolumeChange);
272
- return () => {
273
- media.removeEventListener("loadedmetadata", syncMeta);
274
- media.removeEventListener("durationchange", syncMeta);
275
- media.removeEventListener("play", handlePlay);
276
- media.removeEventListener("pause", handlePause);
277
- media.removeEventListener("ended", handleEnded);
278
- media.removeEventListener("timeupdate", handleTimeUpdate);
279
- media.removeEventListener("volumechange", handleVolumeChange);
280
- };
281
- }, [
282
- onPlay,
283
- onPause,
284
- onEnded,
285
- onTimeUpdate
286
- ]);
287
- const toggle = React.useCallback(() => {
288
- const media = refMedia.current;
289
- if (!media) return;
290
- if (media.paused) {
291
- media.play().catch(() => void 0);
292
- return;
293
- }
294
- media.pause();
295
- }, []);
296
- const seek = React.useCallback((seconds) => {
297
- const media = refMedia.current;
298
- if (!media || !Number.isFinite(seconds)) return;
299
- media.currentTime = seconds;
300
- setState((previous) => ({
301
- ...previous,
302
- currentTime: seconds
303
- }));
304
- }, []);
305
- const changeVolume = React.useCallback((volume) => {
306
- const media = refMedia.current;
307
- if (!media || !Number.isFinite(volume)) return;
308
- const next = Math.min(1, Math.max(0, volume));
309
- media.volume = next;
310
- media.muted = next === 0;
311
- }, []);
312
- const toggleMute = React.useCallback(() => {
313
- const media = refMedia.current;
314
- if (!media) return;
315
- media.muted = !media.muted;
316
- }, []);
317
- return {
318
- ...state,
319
- refMedia,
320
- toggle,
321
- seek,
322
- changeVolume,
323
- toggleMute
324
- };
325
- };
326
- //#endregion
327
- //#region ../ui/src/components/edyn/audio-player/audio-player.tsx
328
- /**
329
- * Compact inline media control for audio content: play/pause, elapsed and total
330
- * time, a seekable timeline, and volume. Four elements in one rounded row, per
331
- * the design-system anatomy.
332
- */
333
- var AudioPlayer = ({ src, muted = false, loop = false, disabled = false, width, className, "aria-label": ariaLabel = "Audio player", style, onPlay, onPause, onEnded, onTimeUpdate, ...props }) => {
334
- const { refMedia, playing, currentTime, duration, muted: isMuted, toggle, seek, toggleMute } = useMediaPlayer({
335
- onPlay,
336
- onPause,
337
- onEnded,
338
- onTimeUpdate
339
- });
340
- const PlaybackIcon = playing ? IconPlayerPauseFilled : IconPlayerPlayFilled;
341
- const VolumeIcon = isMuted ? IconVolumeOff : IconVolume;
342
- return /* @__PURE__ */ jsxs("div", {
343
- "data-slot": "audio-player",
344
- "data-playing": playing || void 0,
345
- role: "group",
346
- ...props,
347
- "aria-label": ariaLabel,
348
- style: {
349
- width: cssLength(width),
350
- ...style
351
- },
352
- className: cn("flex h-12 w-full items-center gap-2 rounded-lg bg-muted px-3 py-1.5", className),
353
- children: [
354
- /* @__PURE__ */ jsx(Button, {
355
- type: "button",
356
- variant: "ghost",
357
- size: "icon",
358
- disabled,
359
- "aria-label": playing ? "Pause" : "Play",
360
- onClick: toggle,
361
- children: /* @__PURE__ */ jsx(PlaybackIcon, {})
362
- }),
363
- /* @__PURE__ */ jsxs("span", {
364
- "data-slot": "audio-player-time",
365
- className: "shrink-0 text-xs tabular-nums text-foreground/70",
366
- children: [
367
- formatMediaTime(currentTime),
368
- " / ",
369
- formatMediaTime(duration)
370
- ]
371
- }),
372
- /* @__PURE__ */ jsx(Slider, {
373
- className: "flex-1 [&_[data-slot=slider-control]]:py-1.5 [&_[data-slot=slider-thumb]]:size-3 [&_[data-slot=slider-track]]:h-1 [&_[data-slot=slider-track]]:bg-foreground/15",
374
- value: Math.min(currentTime, duration || 0),
375
- min: 0,
376
- max: duration || 0,
377
- step: 1,
378
- disabled: disabled || duration === 0,
379
- "aria-label": "Seek",
380
- onValueChange: (next) => {
381
- seek(next);
382
- }
383
- }),
384
- /* @__PURE__ */ jsx(Button, {
385
- type: "button",
386
- variant: "ghost",
387
- size: "icon",
388
- disabled,
389
- "aria-label": isMuted ? "Unmute" : "Mute",
390
- onClick: toggleMute,
391
- children: /* @__PURE__ */ jsx(VolumeIcon, {})
392
- }),
393
- /* @__PURE__ */ jsx("audio", {
394
- ref: refMedia,
395
- src,
396
- muted,
397
- loop,
398
- preload: "metadata"
399
- })
400
- ]
401
- });
402
- };
403
- //#endregion
404
- //#region ../ui/src/components/ui/avatar/avatar.tsx
405
- var Avatar = ({ className, size = "default", ...props }) => {
406
- return /* @__PURE__ */ jsx(Avatar$1.Root, {
407
- "data-slot": "avatar",
408
- "data-size": size,
409
- className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", className),
410
- ...props
411
- });
412
- };
413
- var AvatarImage = ({ className, ...props }) => {
414
- return /* @__PURE__ */ jsx(Avatar$1.Image, {
415
- "data-slot": "avatar-image",
416
- className: cn("aspect-square size-full rounded-full object-cover", className),
417
- ...props
418
- });
419
- };
420
- var AvatarFallback = ({ className, ...props }) => {
421
- return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
422
- "data-slot": "avatar-fallback",
423
- className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-foreground/70 group-data-[size=sm]/avatar:text-xs", className),
424
- ...props
425
- });
426
- };
427
- var AvatarBadge = ({ className, ...props }) => {
428
- return /* @__PURE__ */ jsx("span", {
429
- "data-slot": "avatar-badge",
430
- className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
431
- ...props
432
- });
433
- };
434
- var AvatarGroup = ({ className, ...props }) => {
435
- return /* @__PURE__ */ jsx("div", {
436
- "data-slot": "avatar-group",
437
- className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
438
- ...props
439
- });
440
- };
441
- var AvatarGroupCount = ({ className, ...props }) => {
442
- return /* @__PURE__ */ jsx("div", {
443
- "data-slot": "avatar-group-count",
444
- className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-foreground/70 ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
445
- ...props
446
- });
447
- };
448
- //#endregion
449
- //#region ../ui/src/components/edyn/initials-avatar/initials-avatar.tsx
450
- /** How many colour pairs the theme defines (--avatar-1-bg, --avatar-1-fg ... in @edyn/theme tokens.css). */
451
- var AVATAR_TONES = 12;
452
- /**
453
- * The palette entry the text gets, from 1: the same text always gets the same one.
454
- * FNV-1a, because a plain multiply-and-add hash puts two letters on a few entries
455
- * only (it reduces to 7 x first + second, modulo 12).
456
- */
457
- var avatarTone = (text) => {
458
- let hash = 2166136261;
459
- for (const character of text) {
460
- hash ^= character.codePointAt(0) ?? 0;
461
- hash = Math.imul(hash, 16777619);
462
- }
463
- hash ^= hash >>> 16;
464
- hash = Math.imul(hash, 2246822507);
465
- hash ^= hash >>> 13;
466
- hash = Math.imul(hash, 3266489909);
467
- hash ^= hash >>> 16;
468
- return (hash >>> 0) % 12 + 1;
469
- };
470
- /** Up to two initials, upper-cased: the first letter of the first two words. */
471
- var initialsOf = (name) => name.split(/\s+/).filter((part) => part !== "").slice(0, 2).map((part) => Array.from(part)[0]?.toUpperCase() ?? "").join("");
472
- /**
473
- * The circle and its letters together, so the initials always fit. The font size
474
- * is inline rather than a class on purpose: 9px and 15px are not on Tailwind's
475
- * type scale, a custom `text-*` token would be read by tailwind-merge as a colour
476
- * and could drop the wrong class, and an inline size cannot be fought by the
477
- * fallback's own `text-sm`.
478
- */
479
- var SIZES = {
480
- xs: {
481
- box: "size-5",
482
- fontSize: 9
483
- },
484
- sm: {
485
- box: "size-6",
486
- fontSize: 10
487
- },
488
- md: {
489
- box: "size-8",
490
- fontSize: 12
491
- },
492
- lg: {
493
- box: "size-10",
494
- fontSize: 15
495
- }
496
- };
497
- /** A person's photo, or their initials on a circle in the palette colour they pick; both themes switch by themselves. */
498
- var InitialsAvatar = ({ name, photoUrl, size = "md", className, autoColor = true, label, "aria-label": ariaLabel, ...props }) => {
499
- const initials = initialsOf(name);
500
- const tone = avatarTone(initials);
501
- const { box, fontSize } = SIZES[size];
502
- const style = autoColor ? {
503
- fontSize,
504
- backgroundColor: `var(--avatar-${tone}-bg)`,
505
- color: `var(--avatar-${tone}-fg)`
506
- } : { fontSize };
507
- const accessibleName = label ?? ariaLabel;
508
- const a11y = accessibleName === void 0 ? { "aria-hidden": true } : {
509
- role: "img",
510
- "aria-label": accessibleName
511
- };
512
- return /* @__PURE__ */ jsxs(Avatar, {
513
- "data-slot": "initials-avatar",
514
- ...props,
515
- "data-tone": autoColor ? tone : void 0,
516
- className: cn(box, className),
517
- ...a11y,
518
- children: [photoUrl != null && /* @__PURE__ */ jsx(AvatarImage, {
519
- src: photoUrl,
520
- alt: ""
521
- }), /* @__PURE__ */ jsx(AvatarFallback, {
522
- style,
523
- className: "leading-none font-semibold tracking-tight",
524
- children: initials
525
- })]
526
- });
527
- };
528
- //#endregion
529
- //#region ../ui/src/components/ui/tooltip/tooltip.tsx
530
- var TooltipProvider = ({ delay = 0, ...props }) => {
531
- return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
532
- "data-slot": "tooltip-provider",
533
- delay,
534
- ...props
535
- });
536
- };
537
- var Tooltip = ({ ...props }) => {
538
- return /* @__PURE__ */ jsx(Tooltip$1.Root, {
539
- "data-slot": "tooltip",
540
- ...props
541
- });
542
- };
543
- var TooltipTrigger = ({ ...props }) => {
544
- return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
545
- "data-slot": "tooltip-trigger",
546
- ...props
547
- });
548
- };
549
- var TooltipContent = ({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) => {
550
- return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
551
- align,
552
- alignOffset,
553
- side,
554
- sideOffset,
555
- className: "isolate z-50",
556
- children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
557
- "data-slot": "tooltip-content",
558
- className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
559
- ...props,
560
- children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
561
- })
562
- }) });
563
- };
564
- //#endregion
565
- //#region ../ui/src/components/edyn/multi-select/multi-select.tsx
566
- var DEFAULT_MULTI_SELECT_LABELS = {
567
- noMatches: "No matches.",
568
- loading: "Loading…",
569
- error: "Could not load the options.",
570
- retry: "Try again",
571
- loadMore: "Load more",
572
- loadingMore: "Loading…",
573
- clear: "Clear",
574
- selectedCount: (count) => `${count} selected`
575
- };
576
- /** Above this many options a list draws only the rows on screen. */
577
- var VIRTUALIZE_FROM = 100;
578
- var ITEM_HEIGHT = 32;
579
- /**
580
- * The options behind the chosen values, in the order they were chosen. A value with no
581
- * known option is kept and shown as itself rather than dropped: a selection must never
582
- * change just because a list did.
583
- */
584
- var resolveChosen = (value, options, selectedOptions = []) => {
585
- const known = /* @__PURE__ */ new Map();
586
- for (const option of [...selectedOptions, ...options]) known.set(option.value, option);
587
- return value.map((entry) => known.get(entry) ?? {
588
- value: entry,
589
- label: entry
590
- });
591
- };
592
- /** What the trigger says: the placeholder, the one picked, or a count. */
593
- var summarize = (chosen, placeholder, labels, summary = "selection") => {
594
- if (chosen.length === 0) return placeholder;
595
- if (summary === "label") return labels.selectedCount(chosen.length);
596
- return chosen.length === 1 ? chosen[0]?.label ?? "" : labels.selectedCount(chosen.length);
597
- };
598
- /** Every chosen name, for a tooltip on a trigger whose text is cut. With `label` the names are not shown, so it is the text itself. */
599
- var fullSelection = (chosen, placeholder, labels, summary = "selection") => summary === "selection" && chosen.length > 0 ? chosen.map((option) => option.label).join(", ") : summarize(chosen, placeholder, labels, summary);
600
- var POPUP = "flex max-h-(--available-height) w-(--anchor-width) min-w-64 max-w-[max(24rem,var(--anchor-width))] origin-(--transform-origin) flex-col overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md outline-none duration-100 motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95";
601
- var TRIGGER = "flex h-8 w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-transparent px-2.5 text-sm text-foreground transition-colors outline-none focus-visible:border-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive data-popup-open:border-ring dark:bg-input/30";
602
- var Option = ({ option, index, style, measure, highlighted }) => {
603
- const [cut, setCut] = useState(false);
604
- const measureLabel = useCallback((element) => {
605
- if (!element) return;
606
- const measureCut = () => setCut(element.scrollWidth > element.clientWidth);
607
- measureCut();
608
- if (typeof ResizeObserver === "undefined") return;
609
- const observer = new ResizeObserver(measureCut);
610
- observer.observe(element);
611
- return () => observer.disconnect();
612
- }, []);
613
- return /* @__PURE__ */ jsxs(Combobox$1.Item, {
614
- value: option,
615
- index,
616
- ref: measure,
617
- "data-index": index,
618
- style,
619
- "data-slot": "multi-select-item",
620
- className: cn(popupItemClass("base-ui"), "group"),
621
- children: [
622
- /* @__PURE__ */ jsx("span", {
623
- "data-slot": "multi-select-item-indicator",
624
- "aria-hidden": "true",
625
- className: "flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground transition-colors group-data-[selected]:border-primary group-data-[selected]:bg-primary",
626
- children: /* @__PURE__ */ jsx(IconCheck, {
627
- className: "size-3 opacity-0 group-data-[selected]:opacity-100",
628
- stroke: 3
629
- })
630
- }),
631
- option.leading,
632
- /* @__PURE__ */ jsxs(Tooltip, {
633
- open: highlighted && cut,
634
- children: [/* @__PURE__ */ jsx(TooltipTrigger, {
635
- "data-slot": "multi-select-item-label",
636
- "data-overflowing": cut ? "" : void 0,
637
- render: /* @__PURE__ */ jsx("span", {
638
- ref: measureLabel,
639
- className: "min-w-0 flex-1 truncate"
640
- }),
641
- children: option.label
642
- }, option.label), /* @__PURE__ */ jsx(TooltipContent, {
643
- side: "right",
644
- children: option.label
645
- })]
646
- }),
647
- option.count !== void 0 && /* @__PURE__ */ jsx("span", {
648
- className: "text-xs text-muted-foreground tabular-nums",
649
- children: option.count
650
- })
651
- ]
652
- });
653
- };
654
- var Options = ({ scroller, scrollTo, busy, highlightedValue }) => {
655
- const items = Combobox$1.useFilteredItems();
656
- const virtual = items.length > 100;
657
- const [mounted, setMounted] = useState(false);
658
- useEffect(() => setMounted(true), []);
659
- const virtualizer = useVirtualizer({
660
- count: items.length,
661
- getScrollElement: () => scroller.current,
662
- estimateSize: () => ITEM_HEIGHT,
663
- overscan: 12,
664
- enabled: virtual && mounted
665
- });
666
- useEffect(() => {
667
- scrollTo.current = virtual ? (index) => virtualizer.scrollToIndex(index, { align: "auto" }) : () => void 0;
668
- }, [
669
- scrollTo,
670
- virtual,
671
- virtualizer
672
- ]);
673
- if (!virtual) return /* @__PURE__ */ jsx(Combobox$1.List, {
674
- "aria-busy": busy || void 0,
675
- className: "p-1 outline-none",
676
- children: items.map((option, index) => /* @__PURE__ */ jsx(Option, {
677
- option,
678
- index,
679
- highlighted: highlightedValue === option.value
680
- }, option.value))
681
- });
682
- return /* @__PURE__ */ jsx(Combobox$1.List, {
683
- "data-virtualized": "",
684
- "aria-busy": busy || void 0,
685
- className: "relative m-1 outline-none",
686
- style: { height: virtualizer.getTotalSize() },
687
- children: virtualizer.getVirtualItems().map((row) => {
688
- const option = items[row.index];
689
- return option === void 0 ? null : /* @__PURE__ */ jsx(Option, {
690
- option,
691
- index: row.index,
692
- highlighted: highlightedValue === option.value,
693
- measure: virtualizer.measureElement,
694
- style: {
695
- position: "absolute",
696
- top: 0,
697
- left: 0,
698
- right: 0,
699
- transform: `translateY(${row.start}px)`
700
- }
701
- }, option.value);
702
- })
703
- });
704
- };
705
- /**
706
- * A choice of several from a list: a trigger shaped like a Select that says what is picked
707
- * (the placeholder, the one picked, or a count), and a popup with a search field and checkbox
708
- * options, with the shared popup list style, the ScrollArea's bar and fades, and virtualization
709
- * past VIRTUALIZE_FROM options. Nothing chosen means no filter.
710
- *
711
- * For a short fixed list pass `options` and nothing else: the component filters them as the
712
- * user types. For a list that grows, pass `onSearchChange` and it becomes a window onto a
713
- * server: the caller fetches the options for the typed text, and says when they are loading,
714
- * failed, or have another page.
715
- */
716
- var MultiSelect = ({ placeholder, searchPlaceholder, options, value, onValueChange, id, disabled = false, className, onSearchChange, searchDelay = 250, selectedOptions, loading = false, error = false, onRetry, hasMore = false, onLoadMore, loadingMore = false, labels: labelOverrides, summary = "selection", ...rest }) => {
717
- const labels = useMemo(() => ({
718
- ...DEFAULT_MULTI_SELECT_LABELS,
719
- ...labelOverrides
720
- }), [labelOverrides]);
721
- const isAsync = onSearchChange !== void 0;
722
- const chosen = useMemo(() => resolveChosen(value, options, selectedOptions), [
723
- value,
724
- options,
725
- selectedOptions
726
- ]);
727
- const items = useMemo(() => {
728
- const offered = new Set(options.map((option) => option.value));
729
- return [...chosen.filter((option) => !offered.has(option.value)), ...options];
730
- }, [chosen, options]);
731
- const refScroller = useRef(null);
732
- const refScrollTo = useRef(() => void 0);
733
- const refTimer = useRef(void 0);
734
- const refTriggerText = useRef(null);
735
- const refSearch = useRef(null);
736
- const [popupOpen, setPopupOpen] = useState(false);
737
- const [highlightedValue, setHighlightedValue] = useState(null);
738
- const refReported = useRef(void 0);
739
- const refOpen = useRef(false);
740
- const errorMessage = typeof error === "string" ? error : labels.error;
741
- const failed = error !== false;
742
- useEffect(() => () => window.clearTimeout(refTimer.current), []);
743
- const closeFromTrigger = (event) => {
744
- if (event.key !== "Escape" || !popupOpen || refSearch.current === null) return;
745
- event.stopPropagation();
746
- event.preventDefault();
747
- refSearch.current.dispatchEvent(new KeyboardEvent("keydown", {
748
- key: "Escape",
749
- bubbles: true,
750
- cancelable: true
751
- }));
752
- };
753
- return /* @__PURE__ */ jsxs(Combobox$1.Root, {
754
- multiple: true,
755
- disabled,
756
- items,
757
- filter: isAsync ? null : void 0,
758
- value: chosen,
759
- onValueChange: (next) => onValueChange(next.map((option) => option.value)),
760
- onInputValueChange: (text) => {
761
- if (onSearchChange === void 0 || !refOpen.current) return;
762
- window.clearTimeout(refTimer.current);
763
- if (text === refReported.current) return;
764
- refTimer.current = window.setTimeout(() => {
765
- refReported.current = text;
766
- onSearchChange(text);
767
- }, searchDelay);
768
- },
769
- onOpenChange: (open) => {
770
- window.clearTimeout(refTimer.current);
771
- setPopupOpen(open);
772
- if (!open) setHighlightedValue(null);
773
- refOpen.current = open;
774
- refReported.current = open ? "" : void 0;
775
- if (open && onSearchChange !== void 0) onSearchChange("");
776
- },
777
- itemToStringLabel: (option) => option.label,
778
- isItemEqualToValue: (a, b) => a.value === b.value,
779
- virtualized: items.length > 100,
780
- onItemHighlighted: (item, details) => {
781
- setHighlightedValue(item?.value ?? null);
782
- if (details.reason === "keyboard" && details.index >= 0) refScrollTo.current(details.index);
783
- },
784
- children: [/* @__PURE__ */ jsxs(Tooltip, {
785
- disabled: popupOpen,
786
- onOpenChange: (open, details) => {
787
- const element = refTriggerText.current;
788
- if (open && !(element && element.scrollWidth > element.clientWidth)) details.cancel();
789
- },
790
- children: [/* @__PURE__ */ jsxs(TooltipTrigger, {
791
- "data-slot": "multi-select-trigger",
792
- render: /* @__PURE__ */ jsx(Combobox$1.Trigger, {
793
- ...rest,
794
- id,
795
- "data-set": chosen.length > 0 ? "" : void 0,
796
- onKeyDown: closeFromTrigger,
797
- className: cn(TRIGGER, className)
798
- }),
799
- children: [/* @__PURE__ */ jsx("span", {
800
- ref: refTriggerText,
801
- className: cn("min-w-0 flex-1 truncate text-left", chosen.length === 0 && "text-muted-foreground"),
802
- children: summarize(chosen, placeholder, labels, summary)
803
- }), /* @__PURE__ */ jsx(IconChevronDown, {
804
- "aria-hidden": "true",
805
- className: "size-4 shrink-0 text-muted-foreground"
806
- })]
807
- }), /* @__PURE__ */ jsx(TooltipContent, { children: fullSelection(chosen, placeholder, labels, summary) })]
808
- }), /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
809
- sideOffset: 4,
810
- align: "start",
811
- className: "z-50",
812
- children: /* @__PURE__ */ jsxs(Combobox$1.Popup, {
813
- "data-slot": "multi-select-content",
814
- className: POPUP,
815
- children: [
816
- /* @__PURE__ */ jsxs("div", {
817
- className: "flex shrink-0 items-center gap-2 border-b border-border px-3",
818
- children: [/* @__PURE__ */ jsx(IconSearch, {
819
- "aria-hidden": "true",
820
- className: "size-4 shrink-0 text-muted-foreground"
821
- }), /* @__PURE__ */ jsx(Combobox$1.Input, {
822
- ref: refSearch,
823
- placeholder: searchPlaceholder,
824
- "aria-label": searchPlaceholder.replace(/…$/, ""),
825
- className: "h-10 w-full min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground"
826
- })]
827
- }),
828
- /* @__PURE__ */ jsx(Combobox$1.Status, {
829
- "data-slot": "multi-select-status",
830
- className: "px-3 py-2 text-sm text-muted-foreground empty:p-0",
831
- children: failed ? /* @__PURE__ */ jsxs("span", {
832
- className: "flex items-center justify-between gap-2 text-destructive",
833
- children: [errorMessage, onRetry !== void 0 && /* @__PURE__ */ jsx("button", {
834
- type: "button",
835
- onClick: onRetry,
836
- className: "rounded-md px-2 py-1 font-medium text-foreground hover:bg-foreground/6",
837
- children: labels.retry
838
- })]
839
- }) : loading ? labels.loading : null
840
- }),
841
- /* @__PURE__ */ jsx(Combobox$1.Empty, {
842
- className: "px-3 py-6 text-center text-sm text-muted-foreground empty:p-0",
843
- children: loading || failed ? null : labels.noMatches
844
- }),
845
- /* @__PURE__ */ jsx(ScrollArea, {
846
- type: "always",
847
- fade: true,
848
- viewportRef: refScroller,
849
- className: "max-h-72 min-h-0",
850
- children: /* @__PURE__ */ jsx(Options, {
851
- scroller: refScroller,
852
- scrollTo: refScrollTo,
853
- busy: loading,
854
- highlightedValue
855
- })
856
- }),
857
- hasMore && onLoadMore !== void 0 && /* @__PURE__ */ jsx("div", {
858
- className: "shrink-0 border-t border-border p-1",
859
- children: /* @__PURE__ */ jsx("button", {
860
- type: "button",
861
- disabled: loadingMore,
862
- onClick: onLoadMore,
863
- className: "h-8 w-full rounded-md px-2 text-sm font-medium text-foreground hover:bg-foreground/6 disabled:pointer-events-none disabled:opacity-50",
864
- children: loadingMore ? labels.loadingMore : labels.loadMore
865
- })
866
- }),
867
- chosen.length > 0 && /* @__PURE__ */ jsxs("div", {
868
- className: "flex shrink-0 items-center justify-between gap-2 border-t border-border py-1 pr-1 pl-3 text-xs text-muted-foreground",
869
- children: [/* @__PURE__ */ jsx("span", {
870
- className: "tabular-nums",
871
- children: labels.selectedCount(chosen.length)
872
- }), /* @__PURE__ */ jsx("button", {
873
- type: "button",
874
- onClick: () => onValueChange([]),
875
- className: "rounded-md px-2 py-1 font-medium text-foreground hover:bg-foreground/6",
876
- children: labels.clear
877
- })]
878
- })
879
- ]
880
- })
881
- }) })]
882
- });
883
- };
884
- //#endregion
885
- //#region ../ui/src/components/edyn/progress-line/progress-line.tsx
886
- /** Work quicker than this shows no line at all. */
887
- var START_DELAY = 150;
888
- var FINISH = 150;
889
- var FADE = 200;
890
- /** How far an ordinary run eases towards the end without reaching it. */
891
- var RUN_TARGET = .85;
892
- /**
893
- * The line's colour: an app sets --progress-line (on :root, or on any element above the
894
- * line) to match its accent. The fallback is read where the line is, so it follows the
895
- * theme, which a default declared once on :root would not.
896
- */
897
- var PROGRESS_LINE_COLOR = "var(--progress-line, var(--primary))";
898
- var reducedMotion = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
899
- var scaleOf = (line) => {
900
- const transform = line === null ? "none" : getComputedStyle(line).transform;
901
- return transform === "none" ? 0 : new DOMMatrixReadOnly(transform).a;
902
- };
903
- /**
904
- * A thin line in the accent (--progress-line, by default --primary) that runs along the top of what is loading (a table's rows
905
- * under its header, a page under the top bar). It waits a moment before it shows, so
906
- * quick work never flashes it; it eases towards the end without reaching it while the
907
- * work runs; when the work is done it runs to the end and only then fades. More work
908
- * before it has gone carries on from where it is. With reduced motion it is a
909
- * full-width line that fades.
910
- */
911
- var ProgressLine = ({ active, label = "Loading", className, style, ...props }) => {
912
- const [phase, setPhase] = useState("idle");
913
- const [target, setTarget] = useState(RUN_TARGET);
914
- const refPhase = useRef("idle");
915
- const refLine = useRef(null);
916
- useEffect(() => {
917
- let timer;
918
- const go = (next) => {
919
- refPhase.current = next;
920
- setPhase(next);
921
- };
922
- const later = (milliseconds, run) => {
923
- timer = window.setTimeout(run, milliseconds);
924
- };
925
- const fade = () => {
926
- go("fading");
927
- later(FADE, () => go("idle"));
928
- };
929
- const phaseNow = refPhase.current;
930
- if (active) {
931
- if (phaseNow === "idle" || phaseNow === "waiting") {
932
- go("waiting");
933
- later(START_DELAY, () => {
934
- setTarget(RUN_TARGET);
935
- go("running");
936
- });
937
- } else if (phaseNow === "finishing" || phaseNow === "fading") {
938
- const reached = scaleOf(refLine.current);
939
- setTarget(reached > .8 ? Math.min(.97, reached + .04) : RUN_TARGET);
940
- go("running");
941
- }
942
- } else if (phaseNow === "waiting") go("idle");
943
- else if (phaseNow === "running" || phaseNow === "finishing") {
944
- if (reducedMotion()) fade();
945
- else {
946
- go("finishing");
947
- later(FINISH, fade);
948
- }
949
- } else if (phaseNow === "fading") later(FADE, () => go("idle"));
950
- return () => window.clearTimeout(timer);
951
- }, [active]);
952
- const reduced = phase !== "idle" && reducedMotion();
953
- const scale = phase === "idle" || phase === "waiting" ? 0 : phase === "running" && !reduced ? target : 1;
954
- const transition = phase === "running" && !reduced ? "transform 8s cubic-bezier(0.1, 0.7, 0.15, 1), opacity 120ms ease-out" : phase === "finishing" ? `transform ${FINISH}ms ease-out` : phase === "fading" ? `opacity ${FADE}ms ease-out` : "none";
955
- const shown = phase === "running" || phase === "finishing" || phase === "fading";
956
- return /* @__PURE__ */ jsx("div", {
957
- "data-slot": "progress-line",
958
- role: "progressbar",
959
- "aria-label": label,
960
- ...props,
961
- "aria-hidden": shown && phase !== "fading" ? void 0 : true,
962
- "data-phase": phase,
963
- className: cn("pointer-events-none h-0.5 overflow-hidden", className),
964
- style,
965
- children: /* @__PURE__ */ jsx("div", {
966
- ref: refLine,
967
- "data-slot": "progress-line-bar",
968
- className: "h-full origin-left",
969
- style: {
970
- backgroundColor: PROGRESS_LINE_COLOR,
971
- transform: `scaleX(${scale})`,
972
- opacity: phase === "fading" || !shown ? 0 : 1,
973
- transition
974
- }
975
- })
976
- });
977
- };
978
- //#endregion
979
- //#region ../ui/src/components/edyn/video-player/video-player.tsx
980
- /**
981
- * Media surface with an overlaid control bar: title and description, elapsed and
982
- * total time, a seekable scrubber, play/pause, volume, and fullscreen.
983
- *
984
- * The root carries the `dark` class so its tokens resolve to the dark palette in
985
- * both themes. Video is dark, so the letterbox and controls must stay dark and
986
- * light-on-dark; this re-scopes existing tokens rather than hardcoding a colour.
987
- */
988
- var VideoPlayer = ({ src, poster, title, description, muted = false, loop = false, disabled = false, width, height, ratio = "auto", className, "aria-label": ariaLabel = "Video player", style, onPlay, onPause, onEnded, onTimeUpdate, ...props }) => {
989
- const { refMedia, playing, currentTime, duration, muted: isMuted, toggle, seek, toggleMute } = useMediaPlayer({
990
- onPlay,
991
- onPause,
992
- onEnded,
993
- onTimeUpdate
994
- });
995
- const refContainer = React.useRef(null);
996
- const PlaybackIcon = playing ? IconPlayerPauseFilled : IconPlayerPlayFilled;
997
- const VolumeIcon = isMuted ? IconVolumeOff : IconVolume;
998
- const isSizedBox = height != null || ratio !== "auto";
999
- const requestFullscreen = () => {
1000
- const container = refContainer.current;
1001
- if (!container) return;
1002
- if (document.fullscreenElement) {
1003
- document.exitFullscreen().catch(() => void 0);
1004
- return;
1005
- }
1006
- container.requestFullscreen?.().catch(() => void 0);
1007
- };
1008
- return /* @__PURE__ */ jsxs("div", {
1009
- ref: refContainer,
1010
- "data-slot": "video-player",
1011
- ...props,
1012
- "data-playing": playing || void 0,
1013
- style: {
1014
- width: cssLength(width),
1015
- height: cssLength(height),
1016
- aspectRatio: height == null && ratio !== "auto" ? ratio : void 0,
1017
- ...style
1018
- },
1019
- className: cn("dark relative isolate w-full overflow-hidden rounded-lg bg-background", className),
1020
- children: [/* @__PURE__ */ jsx("video", {
1021
- ref: refMedia,
1022
- src,
1023
- poster,
1024
- muted,
1025
- loop,
1026
- playsInline: true,
1027
- preload: "metadata",
1028
- "aria-label": ariaLabel,
1029
- className: cn("w-full bg-background", isSizedBox ? "h-full object-contain" : "h-auto")
1030
- }), /* @__PURE__ */ jsxs("div", {
1031
- className: "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-0.5 bg-gradient-to-t from-background via-background/75 to-transparent px-3 pt-12 pb-2 text-foreground",
1032
- children: [
1033
- /* @__PURE__ */ jsxs("div", {
1034
- className: "pointer-events-auto flex items-end justify-between gap-4",
1035
- children: [/* @__PURE__ */ jsxs("div", {
1036
- className: "min-w-0",
1037
- children: [title ? /* @__PURE__ */ jsx("p", {
1038
- className: "truncate text-sm font-medium text-foreground",
1039
- children: title
1040
- }) : null, description ? /* @__PURE__ */ jsx("p", {
1041
- className: "truncate text-xs text-foreground/70",
1042
- children: description
1043
- }) : null]
1044
- }), /* @__PURE__ */ jsxs("span", {
1045
- className: "shrink-0 text-xs tabular-nums text-foreground/70",
1046
- children: [
1047
- formatMediaTime(currentTime),
1048
- " / ",
1049
- formatMediaTime(duration)
1050
- ]
1051
- })]
1052
- }),
1053
- /* @__PURE__ */ jsx(Slider, {
1054
- className: "pointer-events-auto [&_[data-slot=slider-control]]:py-1.5 [&_[data-slot=slider-thumb]]:size-3 [&_[data-slot=slider-track]]:h-1",
1055
- value: Math.min(currentTime, duration || 0),
1056
- min: 0,
1057
- max: duration || 0,
1058
- step: 1,
1059
- disabled: disabled || duration === 0,
1060
- "aria-label": "Seek",
1061
- onValueChange: (next) => {
1062
- seek(next);
1063
- }
1064
- }),
1065
- /* @__PURE__ */ jsxs("div", {
1066
- className: "pointer-events-auto flex items-center justify-between",
1067
- children: [/* @__PURE__ */ jsxs("div", {
1068
- className: "flex items-center gap-1",
1069
- children: [/* @__PURE__ */ jsx(Button, {
1070
- type: "button",
1071
- variant: "ghost",
1072
- size: "icon",
1073
- disabled,
1074
- "aria-label": playing ? "Pause" : "Play",
1075
- onClick: toggle,
1076
- children: /* @__PURE__ */ jsx(PlaybackIcon, {})
1077
- }), /* @__PURE__ */ jsx(Button, {
1078
- type: "button",
1079
- variant: "ghost",
1080
- size: "icon",
1081
- disabled,
1082
- "aria-label": isMuted ? "Unmute" : "Mute",
1083
- onClick: toggleMute,
1084
- children: /* @__PURE__ */ jsx(VolumeIcon, {})
1085
- })]
1086
- }), /* @__PURE__ */ jsx(Button, {
1087
- type: "button",
1088
- variant: "ghost",
1089
- size: "icon",
1090
- disabled,
1091
- "aria-label": "Fullscreen",
1092
- onClick: requestFullscreen,
1093
- children: /* @__PURE__ */ jsx(IconMaximize, {})
1094
- })]
1095
- })
1096
- ]
1097
- })]
1098
- });
1099
- };
1100
- //#endregion
1101
- //#region ../ui/src/components/ui/accordion/accordion.tsx
1102
- var Accordion = ({ value, defaultValue, onValueChange, multiple = false, className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Root, {
1103
- "data-slot": "accordion",
1104
- ...props,
1105
- value,
1106
- defaultValue,
1107
- onValueChange: (next) => {
1108
- onValueChange?.(next);
1109
- },
1110
- multiple,
1111
- className: cn("w-full", className),
1112
- children
1113
- });
1114
- var AccordionItem = ({ value, disabled, className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Item, {
1115
- "data-slot": "accordion-item",
1116
- ...props,
1117
- value,
1118
- disabled,
1119
- className: cn("border-b border-border", className),
1120
- children
1121
- });
1122
- var focusSiblingTrigger = (event) => {
1123
- if (![
1124
- "ArrowDown",
1125
- "ArrowUp",
1126
- "Home",
1127
- "End"
1128
- ].includes(event.key)) return;
1129
- const root = event.currentTarget.closest("[data-slot=\"accordion\"]");
1130
- const triggers = Array.from(root?.querySelectorAll("[data-slot=\"accordion-trigger\"]:not(:disabled)") ?? []);
1131
- const currentIndex = triggers.indexOf(event.currentTarget);
1132
- if (currentIndex < 0 || triggers.length === 0) return;
1133
- event.preventDefault();
1134
- let nextIndex = currentIndex;
1135
- if (event.key === "Home") nextIndex = 0;
1136
- else if (event.key === "End") nextIndex = triggers.length - 1;
1137
- else if (event.key === "ArrowDown") nextIndex = (currentIndex + 1) % triggers.length;
1138
- else if (event.key === "ArrowUp") nextIndex = (currentIndex - 1 + triggers.length) % triggers.length;
1139
- triggers[nextIndex]?.focus();
1140
- };
1141
- var AccordionTrigger = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Header, {
1142
- "data-slot": "accordion-header",
1143
- className: "flex",
1144
- children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
1145
- "data-slot": "accordion-trigger",
1146
- ...props,
1147
- onKeyDown: focusSiblingTrigger,
1148
- className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline", className),
1149
- children: [children, /* @__PURE__ */ jsx("svg", {
1150
- xmlns: "http://www.w3.org/2000/svg",
1151
- width: "24",
1152
- height: "24",
1153
- viewBox: "0 0 24 24",
1154
- fill: "none",
1155
- stroke: "currentColor",
1156
- strokeWidth: "2",
1157
- strokeLinecap: "round",
1158
- strokeLinejoin: "round",
1159
- className: "size-4 shrink-0 text-muted-foreground",
1160
- "data-expand-chevron": "flip",
1161
- "aria-hidden": "true",
1162
- children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
1163
- })]
1164
- })
1165
- });
1166
- var AccordionContent = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Panel, {
1167
- keepMounted: true,
1168
- "data-slot": "accordion-content",
1169
- ...props,
1170
- "data-focus": "inset",
1171
- className: cn("text-sm", className),
1172
- children: /* @__PURE__ */ jsx("div", {
1173
- className: "pb-4 pt-0",
1174
- children
1175
- })
1176
- });
1177
- //#endregion
1178
- //#region ../ui/src/components/ui/alert/alert.tsx
1179
- var alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
1180
- variants: { variant: {
1181
- default: "bg-card text-card-foreground",
1182
- destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive *:[svg]:text-current",
1183
- success: "bg-card text-success *:data-[slot=alert-description]:text-success *:[svg]:text-current",
1184
- warning: "bg-card text-warning *:data-[slot=alert-description]:text-warning *:[svg]:text-current",
1185
- info: "bg-card text-info *:data-[slot=alert-description]:text-info *:[svg]:text-current"
1186
- } },
1187
- defaultVariants: { variant: "default" }
1188
- });
1189
- var Alert = ({ className, variant, ...props }) => {
1190
- return /* @__PURE__ */ jsx("div", {
1191
- "data-slot": "alert",
1192
- role: "alert",
1193
- className: cn(alertVariants({ variant }), className),
1194
- ...props
1195
- });
1196
- };
1197
- var AlertTitle = ({ className, ...props }) => {
1198
- return /* @__PURE__ */ jsx("div", {
1199
- "data-slot": "alert-title",
1200
- className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
1201
- ...props
1202
- });
1203
- };
1204
- var AlertDescription = ({ className, ...props }) => {
1205
- return /* @__PURE__ */ jsx("div", {
1206
- "data-slot": "alert-description",
1207
- className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
1208
- ...props
1209
- });
1210
- };
1211
- var AlertAction = ({ className, ...props }) => {
1212
- return /* @__PURE__ */ jsx("div", {
1213
- "data-slot": "alert-action",
1214
- className: cn("absolute top-2.5 right-2", className),
1215
- ...props
1216
- });
1217
- };
1218
- //#endregion
1219
- //#region ../ui/src/components/ui/alert-dialog/alert-dialog.tsx
1220
- var AlertDialog = ({ ...props }) => {
1221
- return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
1222
- "data-slot": "alert-dialog",
1223
- ...props
1224
- });
1225
- };
1226
- var AlertDialogTrigger = ({ ...props }) => {
1227
- return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
1228
- "data-slot": "alert-dialog-trigger",
1229
- ...props
1230
- });
1231
- };
1232
- var AlertDialogPortal = ({ ...props }) => {
1233
- return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
1234
- "data-slot": "alert-dialog-portal",
1235
- ...props
1236
- });
1237
- };
1238
- var AlertDialogOverlay = ({ className, ...props }) => {
1239
- return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
1240
- "data-slot": "alert-dialog-overlay",
1241
- className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
1242
- ...props
1243
- });
1244
- };
1245
- var AlertDialogContent = ({ className, size = "default", ...props }) => {
1246
- return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
1247
- "data-slot": "alert-dialog-content",
1248
- "data-size": size,
1249
- className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 motion-reduce:animate-none outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
1250
- ...props
1251
- })] });
1252
- };
1253
- var AlertDialogHeader = ({ className, ...props }) => {
1254
- return /* @__PURE__ */ jsx("div", {
1255
- "data-slot": "alert-dialog-header",
1256
- className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
1257
- ...props
1258
- });
1259
- };
1260
- var AlertDialogFooter = ({ className, ...props }) => {
1261
- return /* @__PURE__ */ jsx("div", {
1262
- "data-slot": "alert-dialog-footer",
1263
- className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
1264
- ...props
1265
- });
1266
- };
1267
- var AlertDialogMedia = ({ className, ...props }) => {
1268
- return /* @__PURE__ */ jsx("div", {
1269
- "data-slot": "alert-dialog-media",
1270
- className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
1271
- ...props
1272
- });
1273
- };
1274
- var AlertDialogTitle = ({ className, ...props }) => {
1275
- return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
1276
- "data-slot": "alert-dialog-title",
1277
- className: cn("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
1278
- ...props
1279
- });
1280
- };
1281
- var AlertDialogDescription = ({ className, ...props }) => {
1282
- return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
1283
- "data-slot": "alert-dialog-description",
1284
- className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
1285
- ...props
1286
- });
1287
- };
1288
- var AlertDialogAction = ({ className, ...props }) => {
1289
- return /* @__PURE__ */ jsx(Button, {
1290
- "data-slot": "alert-dialog-action",
1291
- className: cn(className),
1292
- ...props
1293
- });
1294
- };
1295
- var AlertDialogCancel = ({ className, variant = "outline", size = "default", ...props }) => {
1296
- return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
1297
- "data-slot": "alert-dialog-cancel",
1298
- className: cn(className),
1299
- render: /* @__PURE__ */ jsx(Button, {
1300
- variant,
1301
- size
1302
- }),
1303
- ...props
1304
- });
1305
- };
1306
- //#endregion
1307
- //#region ../ui/src/components/ui/aspect-ratio/aspect-ratio.tsx
1308
- var AspectRatio = ({ ratio, className, ...props }) => {
1309
- return /* @__PURE__ */ jsx("div", {
1310
- "data-slot": "aspect-ratio",
1311
- style: { "--ratio": ratio },
1312
- className: cn("relative aspect-(--ratio)", className),
1313
- ...props
1314
- });
1315
- };
1316
- //#endregion
1317
- //#region ../ui/src/components/ui/attachment/attachment.tsx
1318
- var attachmentVariants = cva("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", { variants: {
1319
- size: {
1320
- default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
1321
- sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
1322
- xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
1323
- },
1324
- orientation: {
1325
- horizontal: "min-w-40 items-center",
1326
- vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
1327
- }
1328
- } });
1329
- var Attachment = ({ className, state = "done", size = "default", orientation = "horizontal", ...props }) => {
1330
- return /* @__PURE__ */ jsx("div", {
1331
- "data-slot": "attachment",
1332
- "data-state": state,
1333
- "data-size": size,
1334
- "data-orientation": orientation,
1335
- className: cn(attachmentVariants({
1336
- size,
1337
- orientation
1338
- }), className),
1339
- ...props
1340
- });
1341
- };
1342
- var attachmentMediaVariants = cva("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
1343
- variants: { variant: {
1344
- icon: "",
1345
- image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
1346
- } },
1347
- defaultVariants: { variant: "icon" }
1348
- });
1349
- var AttachmentMedia = ({ className, variant = "icon", ...props }) => {
1350
- return /* @__PURE__ */ jsx("div", {
1351
- "data-slot": "attachment-media",
1352
- "data-variant": variant,
1353
- className: cn(attachmentMediaVariants({ variant }), className),
1354
- ...props
1355
- });
1356
- };
1357
- var AttachmentContent = ({ className, ...props }) => {
1358
- return /* @__PURE__ */ jsx("div", {
1359
- "data-slot": "attachment-content",
1360
- className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
1361
- ...props
1362
- });
1363
- };
1364
- var AttachmentTitle = ({ className, ...props }) => {
1365
- return /* @__PURE__ */ jsx("span", {
1366
- "data-slot": "attachment-title",
1367
- className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
1368
- ...props
1369
- });
1370
- };
1371
- var AttachmentDescription = ({ className, ...props }) => {
1372
- return /* @__PURE__ */ jsx("span", {
1373
- "data-slot": "attachment-description",
1374
- className: cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive", "max-w-full", className),
1375
- ...props
1376
- });
1377
- };
1378
- var AttachmentActions = ({ className, ...props }) => {
1379
- return /* @__PURE__ */ jsx("div", {
1380
- "data-slot": "attachment-actions",
1381
- className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
1382
- ...props
1383
- });
1384
- };
1385
- var AttachmentAction = ({ className, variant, size = "icon-xs", ...props }) => {
1386
- return /* @__PURE__ */ jsx(Button, {
1387
- "data-slot": "attachment-action",
1388
- variant: variant ?? "ghost",
1389
- size,
1390
- className: cn(className),
1391
- ...props
1392
- });
1393
- };
1394
- var AttachmentTrigger = ({ className, render, type, ...props }) => {
1395
- return useRender({
1396
- defaultTagName: "button",
1397
- props: mergeProps({
1398
- type: render ? type : type ?? "button",
1399
- className: cn("absolute inset-0 z-10 outline-none", className)
1400
- }, props),
1401
- render,
1402
- state: { slot: "attachment-trigger" }
1403
- });
1404
- };
1405
- var AttachmentGroup = ({ className, ...props }) => {
1406
- return /* @__PURE__ */ jsx("div", {
1407
- "data-slot": "attachment-group",
1408
- className: cn("flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", className),
1409
- ...props
1410
- });
1411
- };
1412
- //#endregion
1413
- //#region ../ui/src/components/ui/badge/badge.tsx
1414
- var badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden border border-transparent text-xs font-medium whitespace-nowrap transition-all motion-reduce:transition-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
1415
- variants: {
1416
- variant: {
1417
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
1418
- secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
1419
- destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
1420
- success: "bg-success-ring/40 text-success focus-visible:ring-success/20 [a]:hover:bg-success-ring/60 dark:bg-success-ring/30",
1421
- warning: "bg-warning-ring/40 text-warning focus-visible:ring-warning/20 [a]:hover:bg-warning-ring/60 dark:bg-warning-ring/30",
1422
- info: "bg-info-ring/40 text-info focus-visible:ring-info/20 [a]:hover:bg-info-ring/60 dark:bg-info-ring/30",
1423
- outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
1424
- ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
1425
- link: "text-primary underline-offset-4 hover:underline"
1426
- },
1427
- size: {
1428
- default: "h-5 rounded-4xl px-2 py-0.5",
1429
- lg: "h-7 rounded-md px-2 py-1"
1430
- }
1431
- },
1432
- defaultVariants: {
1433
- variant: "default",
1434
- size: "default"
1435
- }
1436
- });
1437
- var Badge = ({ className, variant = "default", size = "default", render, ...props }) => {
1438
- return useRender({
1439
- defaultTagName: "span",
1440
- props: mergeProps({ className: cn(badgeVariants({
1441
- variant,
1442
- size
1443
- }), className) }, props),
1444
- render,
1445
- state: {
1446
- slot: "badge",
1447
- variant,
1448
- size
1449
- }
1450
- });
1451
- };
1452
- //#endregion
1453
- //#region ../ui/src/components/ui/breadcrumb/breadcrumb.tsx
1454
- var Breadcrumb = ({ className, ...props }) => {
1455
- return /* @__PURE__ */ jsx("nav", {
1456
- "aria-label": "breadcrumb",
1457
- "data-slot": "breadcrumb",
1458
- className: cn(className),
1459
- ...props
1460
- });
1461
- };
1462
- var BreadcrumbList = ({ className, ...props }) => {
1463
- return /* @__PURE__ */ jsx("ol", {
1464
- "data-slot": "breadcrumb-list",
1465
- className: cn("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", className),
1466
- ...props
1467
- });
1468
- };
1469
- var BreadcrumbItem = ({ className, ...props }) => {
1470
- return /* @__PURE__ */ jsx("li", {
1471
- "data-slot": "breadcrumb-item",
1472
- className: cn("inline-flex items-center gap-1", className),
1473
- ...props
1474
- });
1475
- };
1476
- var BreadcrumbLink = ({ className, render, ...props }) => {
1477
- return useRender({
1478
- defaultTagName: "a",
1479
- props: mergeProps({ className: cn("transition-colors hover:text-foreground", className) }, props),
1480
- render,
1481
- state: { slot: "breadcrumb-link" }
1482
- });
1483
- };
1484
- var BreadcrumbPage = ({ className, ...props }) => {
1485
- return /* @__PURE__ */ jsx("span", {
1486
- "data-slot": "breadcrumb-page",
1487
- role: "link",
1488
- "aria-disabled": "true",
1489
- "aria-current": "page",
1490
- className: cn("font-normal text-foreground", className),
1491
- ...props
1492
- });
1493
- };
1494
- var BreadcrumbSeparator = ({ children, className, ...props }) => {
1495
- return /* @__PURE__ */ jsx("li", {
1496
- "data-slot": "breadcrumb-separator",
1497
- role: "presentation",
1498
- "aria-hidden": "true",
1499
- className: cn("[&>svg]:size-3.5", className),
1500
- ...props,
1501
- children: children ?? /* @__PURE__ */ jsx(IconChevronRight, {})
1502
- });
1503
- };
1504
- var BreadcrumbEllipsis = ({ className, ...props }) => {
1505
- return /* @__PURE__ */ jsxs("span", {
1506
- "data-slot": "breadcrumb-ellipsis",
1507
- role: "presentation",
1508
- "aria-hidden": "true",
1509
- className: cn("flex size-5 items-center justify-center [&>svg]:size-4", className),
1510
- ...props,
1511
- children: [/* @__PURE__ */ jsx(IconDots, {}), /* @__PURE__ */ jsx("span", {
1512
- className: "sr-only",
1513
- children: "More"
1514
- })]
1515
- });
1516
- };
1517
- //#endregion
1518
- //#region ../ui/src/components/ui/bubble/bubble.tsx
1519
- var BubbleGroup = ({ className, ...props }) => {
1520
- return /* @__PURE__ */ jsx("div", {
1521
- "data-slot": "bubble-group",
1522
- className: cn("flex min-w-0 flex-col gap-2", className),
1523
- ...props
1524
- });
1525
- };
1526
- var bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
1527
- variants: { variant: {
1528
- default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
1529
- secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
1530
- muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
1531
- tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
1532
- outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
1533
- ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
1534
- destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
1535
- } },
1536
- defaultVariants: { variant: "default" }
1537
- });
1538
- var Bubble = ({ variant = "default", align = "start", className, ...props }) => {
1539
- return /* @__PURE__ */ jsx("div", {
1540
- "data-slot": "bubble",
1541
- "data-variant": variant,
1542
- "data-align": align,
1543
- className: cn(bubbleVariants({ variant }), className),
1544
- ...props
1545
- });
1546
- };
1547
- var BubbleContent = ({ className, render, ...props }) => {
1548
- return useRender({
1549
- defaultTagName: "div",
1550
- props: mergeProps({ className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className) }, props),
1551
- render,
1552
- state: { slot: "bubble-content" }
1553
- });
1554
- };
1555
- var bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
1556
- variants: {
1557
- side: {
1558
- top: "top-0 -translate-y-3/4",
1559
- bottom: "bottom-0 translate-y-3/4"
1560
- },
1561
- align: {
1562
- start: "left-3",
1563
- end: "right-3"
1564
- }
1565
- },
1566
- defaultVariants: {
1567
- side: "bottom",
1568
- align: "end"
1569
- }
1570
- });
1571
- var BubbleReactions = ({ side = "bottom", align = "end", className, ...props }) => {
1572
- return /* @__PURE__ */ jsx("div", {
1573
- "data-slot": "bubble-reactions",
1574
- "data-align": align,
1575
- "data-side": side,
1576
- className: cn(bubbleReactionsVariants({
1577
- side,
1578
- align
1579
- }), className),
1580
- ...props
1581
- });
1582
- };
1583
- //#endregion
1584
- //#region ../ui/src/components/ui/button-group/button-group.tsx
1585
- var ButtonGroupContext = React.createContext("horizontal");
1586
- var ButtonGroup = ({ className, orientation = "horizontal", ...props }) => {
1587
- return /* @__PURE__ */ jsx(ButtonGroupContext.Provider, {
1588
- value: orientation,
1589
- children: /* @__PURE__ */ jsx("div", {
1590
- "data-slot": "button-group",
1591
- "data-orientation": orientation,
1592
- className: cn("inline-flex items-center", "[&>*:not(:first-child):not(:last-child)]:rounded-none", "data-[orientation=horizontal]:[&>*:first-child]:rounded-r-none", "data-[orientation=horizontal]:[&>*:last-child]:rounded-l-none", "data-[orientation=horizontal]:[&>*:not(:first-child)]:-ml-px", "data-[orientation=vertical]:flex-col", "data-[orientation=vertical]:[&>*:first-child]:rounded-b-none", "data-[orientation=vertical]:[&>*:last-child]:rounded-t-none", "data-[orientation=vertical]:[&>*:not(:first-child)]:-mt-px", "[&>*]:relative [&>*]:z-0 [&>*:focus-visible]:z-10 [&>*:hover]:z-10", className),
1593
- ...props
1594
- })
1595
- });
1596
- };
1597
- var ButtonGroupSeparator = ({ className, ...props }) => {
1598
- const orientation = React.useContext(ButtonGroupContext);
1599
- return /* @__PURE__ */ jsx("span", {
1600
- "data-slot": "button-group-separator",
1601
- role: "separator",
1602
- "aria-orientation": orientation === "horizontal" ? "vertical" : "horizontal",
1603
- className: cn("inline-flex shrink-0 self-stretch bg-border", "in-data-[orientation=horizontal]:w-px", "in-data-[orientation=vertical]:h-px in-data-[orientation=vertical]:self-auto in-data-[orientation=vertical]:w-full", className),
1604
- ...props
1605
- });
1606
- };
1607
- var ButtonGroupText = ({ className, ...props }) => {
1608
- return /* @__PURE__ */ jsx("span", {
1609
- "data-slot": "button-group-text",
1610
- className: cn("inline-flex shrink-0 items-center justify-center rounded-none border border-border bg-muted px-2.5 text-sm text-muted-foreground select-none", className),
1611
- ...props
1612
- });
1613
- };
1614
- //#endregion
1615
- //#region ../ui/src/components/ui/card/card.tsx
1616
- var Card = ({ className, size = "default", ...props }) => {
1617
- return /* @__PURE__ */ jsx("div", {
1618
- "data-slot": "card",
1619
- "data-size": size,
1620
- className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
1621
- ...props
1622
- });
1623
- };
1624
- var CardHeader = ({ className, ...props }) => {
1625
- return /* @__PURE__ */ jsx("div", {
1626
- "data-slot": "card-header",
1627
- className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
1628
- ...props
1629
- });
1630
- };
1631
- var CardTitle = ({ className, ...props }) => {
1632
- return /* @__PURE__ */ jsx("div", {
1633
- "data-slot": "card-title",
1634
- className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
1635
- ...props
1636
- });
1637
- };
1638
- var CardDescription = ({ className, ...props }) => {
1639
- return /* @__PURE__ */ jsx("div", {
1640
- "data-slot": "card-description",
1641
- className: cn("text-sm text-muted-foreground", className),
1642
- ...props
1643
- });
1644
- };
1645
- var CardAction = ({ className, ...props }) => {
1646
- return /* @__PURE__ */ jsx("div", {
1647
- "data-slot": "card-action",
1648
- className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
1649
- ...props
1650
- });
1651
- };
1652
- var CardContent = ({ className, ...props }) => {
1653
- return /* @__PURE__ */ jsx("div", {
1654
- "data-slot": "card-content",
1655
- className: cn("px-4 group-data-[size=sm]/card:px-3", className),
1656
- ...props
1657
- });
1658
- };
1659
- var CardFooter = ({ className, ...props }) => {
1660
- return /* @__PURE__ */ jsx("div", {
1661
- "data-slot": "card-footer",
1662
- className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", className),
1663
- ...props
1664
- });
1665
- };
1666
- //#endregion
1667
- //#region ../ui/src/components/ui/carousel/carousel.tsx
1668
- var CarouselContext = React.createContext(null);
1669
- var useCarousel = () => {
1670
- const context = React.useContext(CarouselContext);
1671
- if (!context) throw new Error("useCarousel must be used within a <Carousel />");
1672
- return context;
1673
- };
1674
- var Carousel = ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) => {
1675
- const [carouselRef, api] = useEmblaCarousel({
1676
- ...opts,
1677
- axis: orientation === "horizontal" ? "x" : "y"
1678
- }, plugins);
1679
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
1680
- const [canScrollNext, setCanScrollNext] = React.useState(false);
1681
- const onSelect = React.useCallback((api) => {
1682
- if (!api) return;
1683
- setCanScrollPrev(api.canScrollPrev());
1684
- setCanScrollNext(api.canScrollNext());
1685
- }, []);
1686
- const scrollPrev = React.useCallback(() => {
1687
- api?.scrollPrev();
1688
- }, [api]);
1689
- const scrollNext = React.useCallback(() => {
1690
- api?.scrollNext();
1691
- }, [api]);
1692
- const handleKeyDown = React.useCallback((event) => {
1693
- if (event.key === "ArrowLeft") {
1694
- event.preventDefault();
1695
- scrollPrev();
1696
- } else if (event.key === "ArrowRight") {
1697
- event.preventDefault();
1698
- scrollNext();
1699
- }
1700
- }, [scrollPrev, scrollNext]);
1701
- React.useEffect(() => {
1702
- if (!api || !setApi) return;
1703
- setApi(api);
1704
- }, [api, setApi]);
1705
- React.useEffect(() => {
1706
- if (!api) return;
1707
- onSelect(api);
1708
- api.on("reInit", onSelect);
1709
- api.on("select", onSelect);
1710
- return () => {
1711
- api.off("reInit", onSelect);
1712
- api.off("select", onSelect);
1713
- };
1714
- }, [api, onSelect]);
1715
- return /* @__PURE__ */ jsx(CarouselContext.Provider, {
1716
- value: {
1717
- carouselRef,
1718
- api,
1719
- opts,
1720
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
1721
- scrollPrev,
1722
- scrollNext,
1723
- canScrollPrev,
1724
- canScrollNext
1725
- },
1726
- children: /* @__PURE__ */ jsx("div", {
1727
- onKeyDownCapture: handleKeyDown,
1728
- className: cn("relative", className),
1729
- role: "region",
1730
- "aria-roledescription": "carousel",
1731
- "data-slot": "carousel",
1732
- ...props,
1733
- children
1734
- })
1735
- });
1736
- };
1737
- var CarouselContent = ({ className, ...props }) => {
1738
- const { carouselRef, orientation } = useCarousel();
1739
- return /* @__PURE__ */ jsx("div", {
1740
- ref: carouselRef,
1741
- className: "overflow-hidden",
1742
- "data-slot": "carousel-content",
1743
- "data-focus": "inset",
1744
- children: /* @__PURE__ */ jsx("div", {
1745
- className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
1746
- ...props
1747
- })
1748
- });
1749
- };
1750
- var CarouselItem = ({ className, ...props }) => {
1751
- const { orientation } = useCarousel();
1752
- return /* @__PURE__ */ jsx("div", {
1753
- role: "group",
1754
- "aria-roledescription": "slide",
1755
- "data-slot": "carousel-item",
1756
- className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
1757
- ...props
1758
- });
1759
- };
1760
- var CarouselPrevious = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
1761
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
1762
- return /* @__PURE__ */ jsxs(Button, {
1763
- "data-slot": "carousel-previous",
1764
- variant,
1765
- size,
1766
- className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -left-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
1767
- disabled: !canScrollPrev,
1768
- onClick: scrollPrev,
1769
- ...props,
1770
- children: [/* @__PURE__ */ jsx(IconChevronLeft, {}), /* @__PURE__ */ jsx("span", {
1771
- className: "sr-only",
1772
- children: "Previous slide"
1773
- })]
1774
- });
1775
- };
1776
- var CarouselNext = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
1777
- const { orientation, scrollNext, canScrollNext } = useCarousel();
1778
- return /* @__PURE__ */ jsxs(Button, {
1779
- "data-slot": "carousel-next",
1780
- variant,
1781
- size,
1782
- className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -right-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
1783
- disabled: !canScrollNext,
1784
- onClick: scrollNext,
1785
- ...props,
1786
- children: [/* @__PURE__ */ jsx(IconChevronRight, {}), /* @__PURE__ */ jsx("span", {
1787
- className: "sr-only",
1788
- children: "Next slide"
1789
- })]
1790
- });
1791
- };
1792
- //#endregion
1793
- //#region ../ui/src/components/ui/chart/chart.tsx
1794
- var THEMES = {
1795
- light: "",
1796
- dark: ".dark"
1797
- };
1798
- var INITIAL_DIMENSION = {
1799
- width: 320,
1800
- height: 200
1801
- };
1802
- var ChartContext = React.createContext(null);
1803
- var useChart = () => {
1804
- const context = React.useContext(ChartContext);
1805
- if (!context) throw new Error("useChart must be used within a <ChartContainer />");
1806
- return context;
1807
- };
1808
- var ChartContainer = ({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) => {
1809
- const uniqueId = React.useId();
1810
- const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
1811
- const refContainer = React.useRef(null);
1812
- const [hasSize, setHasSize] = React.useState(false);
1813
- React.useLayoutEffect(() => {
1814
- const element = refContainer.current;
1815
- if (!element) return;
1816
- const update = () => {
1817
- const { width, height } = element.getBoundingClientRect();
1818
- setHasSize(width > 0 && height > 0);
1819
- };
1820
- update();
1821
- const observer = new ResizeObserver(update);
1822
- observer.observe(element);
1823
- return () => observer.disconnect();
1824
- }, []);
1825
- return /* @__PURE__ */ jsx(ChartContext.Provider, {
1826
- value: { config },
1827
- children: /* @__PURE__ */ jsxs("div", {
1828
- ref: refContainer,
1829
- "data-slot": "chart",
1830
- id,
1831
- "data-chart": chartId,
1832
- className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
1833
- ...props,
1834
- children: [/* @__PURE__ */ jsx(ChartStyle, {
1835
- id: chartId,
1836
- config
1837
- }), hasSize && /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, {
1838
- initialDimension,
1839
- children
1840
- })]
1841
- })
1842
- });
1843
- };
1844
- var ChartStyle = ({ id, config }) => {
1845
- const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
1846
- if (!colorConfig.length) return null;
1847
- const css = Object.entries(THEMES).map(([theme, prefix]) => `
1848
- ${prefix} [data-chart=${id}] {
1849
- ${colorConfig.map(([key, itemConfig]) => {
1850
- const color = itemConfig.theme?.[theme] ?? itemConfig.color;
1851
- return color ? ` --color-${key}: ${color};` : null;
1852
- }).join("\n")}
1853
- }
1854
- `).join("\n");
1855
- return /* @__PURE__ */ jsx("style", { children: css });
1856
- };
1857
- var ChartTooltip = RechartsPrimitive.Tooltip;
1858
- var ChartTooltipContent = ({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) => {
1859
- const { config } = useChart();
1860
- const tooltipLabel = React.useMemo(() => {
1861
- if (hideLabel || !payload?.length) return null;
1862
- const [item] = payload;
1863
- const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
1864
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1865
- const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
1866
- if (labelFormatter) return /* @__PURE__ */ jsx("div", {
1867
- className: cn("font-medium", labelClassName),
1868
- children: labelFormatter(value, payload)
1869
- });
1870
- if (!value) return null;
1871
- return /* @__PURE__ */ jsx("div", {
1872
- className: cn("font-medium", labelClassName),
1873
- children: value
1874
- });
1875
- }, [
1876
- label,
1877
- labelFormatter,
1878
- payload,
1879
- hideLabel,
1880
- labelClassName,
1881
- config,
1882
- labelKey
1883
- ]);
1884
- if (!active || !payload?.length) return null;
1885
- const nestLabel = payload.length === 1 && indicator !== "dot";
1886
- return /* @__PURE__ */ jsxs("div", {
1887
- className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
1888
- children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
1889
- className: "grid gap-1.5",
1890
- children: payload.filter((item) => item.type !== "none").map((item, index) => {
1891
- const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
1892
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1893
- const indicatorColor = color ?? item.payload?.fill ?? item.color;
1894
- return /* @__PURE__ */ jsx("div", {
1895
- className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
1896
- children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
1897
- className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
1898
- "h-2.5 w-2.5": indicator === "dot",
1899
- "w-1": indicator === "line",
1900
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
1901
- "my-0.5": nestLabel && indicator === "dashed"
1902
- }),
1903
- style: {
1904
- "--color-bg": indicatorColor,
1905
- "--color-border": indicatorColor
1906
- }
1907
- }), /* @__PURE__ */ jsxs("div", {
1908
- className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
1909
- children: [/* @__PURE__ */ jsxs("div", {
1910
- className: "grid gap-1.5",
1911
- children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
1912
- className: "text-muted-foreground",
1913
- children: itemConfig?.label ?? item.name
1914
- })]
1915
- }), item.value != null && /* @__PURE__ */ jsx("span", {
1916
- className: "font-mono font-medium text-foreground tabular-nums",
1917
- children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
1918
- })]
1919
- })] })
1920
- }, `${key}-${String(item.value ?? "")}`);
1921
- })
1922
- })]
1923
- });
1924
- };
1925
- var ChartLegend = RechartsPrimitive.Legend;
1926
- var ChartLegendContent = ({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) => {
1927
- const { config } = useChart();
1928
- if (!payload?.length) return null;
1929
- return /* @__PURE__ */ jsx("div", {
1930
- className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
1931
- children: payload.filter((item) => item.type !== "none").map((item) => {
1932
- const key = `${nameKey ?? item.dataKey ?? "value"}`;
1933
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1934
- return /* @__PURE__ */ jsxs("div", {
1935
- className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
1936
- children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
1937
- className: "h-2 w-2 shrink-0 rounded-[2px]",
1938
- style: { backgroundColor: item.color }
1939
- }), itemConfig?.label]
1940
- }, `${key}-${String(item.value ?? "")}`);
1941
- })
1942
- });
1943
- };
1944
- var getPayloadConfigFromPayload = (config, payload, key) => {
1945
- if (typeof payload !== "object" || payload === null) return;
1946
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
1947
- let configLabelKey = key;
1948
- if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
1949
- else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
1950
- return configLabelKey in config ? config[configLabelKey] : config[key];
1951
- };
1952
- //#endregion
1953
- //#region ../ui/src/components/ui/checkbox/checkbox.tsx
1954
- var Checkbox = ({ className, ...props }) => {
1955
- return /* @__PURE__ */ jsx(Checkbox$1.Root, {
1956
- "data-slot": "checkbox",
1957
- className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
1958
- ...props,
1959
- children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
1960
- "data-slot": "checkbox-indicator",
1961
- className: "group/checkbox-indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
1962
- children: [/* @__PURE__ */ jsx(IconCheck, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), /* @__PURE__ */ jsx(IconMinus, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })]
1963
- })
1964
- });
1965
- };
1966
- //#endregion
1967
- //#region ../ui/src/components/ui/collapsible/collapsible.tsx
1968
- var Collapsible = ({ ...props }) => {
1969
- return /* @__PURE__ */ jsx(Collapsible$1.Root, {
1970
- "data-slot": "collapsible",
1971
- ...props
1972
- });
1973
- };
1974
- var CollapsibleTrigger = ({ ...props }) => {
1975
- return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
1976
- "data-slot": "collapsible-trigger",
1977
- ...props
1978
- });
1979
- };
1980
- var CollapsibleContent = ({ ...props }) => {
1981
- return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
1982
- "data-slot": "collapsible-content",
1983
- "data-focus": "inset",
1984
- ...props
1985
- });
1986
- };
1987
- //#endregion
1988
- //#region ../ui/src/components/ui/combobox/combobox.tsx
1989
- var Combobox = ({ ...props }) => {
1990
- return /* @__PURE__ */ jsx(Combobox$1.Root, {
1991
- "data-slot": "combobox",
1992
- ...props
1993
- });
1994
- };
1995
- var ComboboxInput = ({ className, ...props }) => {
1996
- return /* @__PURE__ */ jsxs(Combobox$1.InputGroup, {
1997
- "data-slot": "combobox-input-group",
1998
- className: "relative flex w-full items-center",
1999
- children: [/* @__PURE__ */ jsx(Combobox$1.Input, {
2000
- "data-slot": "combobox-input",
2001
- className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 pr-8 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
2002
- ...props
2003
- }), /* @__PURE__ */ jsx(Combobox$1.Trigger, {
2004
- "data-slot": "combobox-trigger",
2005
- className: "absolute right-2 flex items-center text-muted-foreground disabled:pointer-events-none disabled:opacity-50",
2006
- tabIndex: -1,
2007
- "aria-hidden": true,
2008
- children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
2009
- })]
2010
- });
2011
- };
2012
- var ComboboxContent = ({ className, children, empty, portalContainer, ...props }) => {
2013
- return /* @__PURE__ */ jsx(Combobox$1.Portal, {
2014
- "data-slot": "combobox-portal",
2015
- container: portalContainer,
2016
- children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
2017
- "data-slot": "combobox-positioner",
2018
- sideOffset: 4,
2019
- align: "start",
2020
- className: "z-50",
2021
- children: /* @__PURE__ */ jsxs(Combobox$1.Popup, {
2022
- "data-slot": "combobox-content",
2023
- className: cn(POPUP_LIST_WIDTH_CLASS, "overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md outline-none motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2024
- ...props,
2025
- children: [/* @__PURE__ */ jsx(ComboboxEmpty, { children: empty }), /* @__PURE__ */ jsx(ScrollArea, {
2026
- type: "always",
2027
- fade: true,
2028
- fadeFrom: "popover",
2029
- className: "max-h-60",
2030
- children: /* @__PURE__ */ jsx(Combobox$1.List, {
2031
- "data-slot": "combobox-list",
2032
- className: "p-1",
2033
- children
2034
- })
2035
- })]
2036
- })
2037
- })
2038
- });
2039
- };
2040
- var ComboboxItem = ({ className, children, ...props }) => {
2041
- return /* @__PURE__ */ jsxs(Combobox$1.Item, {
2042
- "data-slot": "combobox-item",
2043
- className: cn(popupItemClass("base-ui", true), className),
2044
- ...props,
2045
- children: [/* @__PURE__ */ jsx("span", {
2046
- className: "flex-1",
2047
- children
2048
- }), /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
2049
- "data-slot": "combobox-item-indicator",
2050
- className: POPUP_ITEM_INDICATOR_CLASS,
2051
- children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
2052
- })]
2053
- });
2054
- };
2055
- var ComboboxEmpty = ({ className, children, ...props }) => {
2056
- return /* @__PURE__ */ jsx(Combobox$1.Empty, {
2057
- "data-slot": "combobox-empty",
2058
- className: cn("py-4 text-center text-sm text-muted-foreground empty:py-0", className),
2059
- ...props,
2060
- children: children ?? "No results found."
2061
- });
2062
- };
2063
- //#endregion
2064
- //#region ../ui/src/components/ui/dialog/dialog.tsx
2065
- var Dialog = ({ ...props }) => {
2066
- return /* @__PURE__ */ jsx(Dialog$1.Root, {
2067
- "data-slot": "dialog",
2068
- ...props
2069
- });
2070
- };
2071
- var DialogTrigger = ({ ...props }) => {
2072
- return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
2073
- "data-slot": "dialog-trigger",
2074
- ...props
2075
- });
2076
- };
2077
- var DialogPortal = ({ ...props }) => {
2078
- return /* @__PURE__ */ jsx(Dialog$1.Portal, {
2079
- "data-slot": "dialog-portal",
2080
- ...props
2081
- });
2082
- };
2083
- var DialogClose = ({ ...props }) => {
2084
- return /* @__PURE__ */ jsx(Dialog$1.Close, {
2085
- "data-slot": "dialog-close",
2086
- ...props
2087
- });
2088
- };
2089
- var DialogOverlay = ({ className, ...props }) => {
2090
- return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
2091
- "data-slot": "dialog-overlay",
2092
- className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
2093
- ...props
2094
- });
2095
- };
2096
- var DialogContent = ({ className, children, showCloseButton = true, ...props }) => {
2097
- return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
2098
- "data-slot": "dialog-content",
2099
- className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 motion-reduce:animate-none outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2100
- ...props,
2101
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
2102
- "data-slot": "dialog-close",
2103
- render: /* @__PURE__ */ jsx(Button, {
2104
- variant: "ghost",
2105
- className: "absolute top-2 right-2",
2106
- size: "icon-sm"
2107
- }),
2108
- children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
2109
- className: "sr-only",
2110
- children: "Close"
2111
- })]
2112
- })]
2113
- })] });
2114
- };
2115
- var DialogHeader = ({ className, ...props }) => {
2116
- return /* @__PURE__ */ jsx("div", {
2117
- "data-slot": "dialog-header",
2118
- className: cn("flex flex-col gap-2", className),
2119
- ...props
2120
- });
2121
- };
2122
- var DialogFooter = ({ className, showCloseButton = false, children, ...props }) => {
2123
- return /* @__PURE__ */ jsxs("div", {
2124
- "data-slot": "dialog-footer",
2125
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
2126
- ...props,
2127
- children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
2128
- render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
2129
- children: "Close"
2130
- })]
2131
- });
2132
- };
2133
- var DialogTitle = ({ className, ...props }) => {
2134
- return /* @__PURE__ */ jsx(Dialog$1.Title, {
2135
- "data-slot": "dialog-title",
2136
- className: cn("text-base leading-none font-medium", className),
2137
- ...props
2138
- });
2139
- };
2140
- var DialogDescription = ({ className, ...props }) => {
2141
- return /* @__PURE__ */ jsx(Dialog$1.Description, {
2142
- "data-slot": "dialog-description",
2143
- className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
2144
- ...props
2145
- });
2146
- };
2147
- //#endregion
2148
- //#region ../ui/src/components/ui/textarea/textarea.tsx
2149
- var Textarea = ({ className, ...props }) => {
2150
- return /* @__PURE__ */ jsx("textarea", {
2151
- "data-slot": "textarea",
2152
- className: cn("block min-h-16 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1.5 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 field-sizing-content resize-y md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
2153
- ...props
2154
- });
2155
- };
2156
- //#endregion
2157
- //#region ../ui/src/components/ui/input-group/input-group.tsx
2158
- var InputGroup = ({ className, ...props }) => {
2159
- return /* @__PURE__ */ jsx("div", {
2160
- "data-slot": "input-group",
2161
- className: cn("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none", "has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", "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),
2162
- ...props
2163
- });
2164
- };
2165
- var inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-foreground/70 select-none [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
2166
- variants: { align: {
2167
- "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
2168
- "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
2169
- "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
2170
- "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
2171
- } },
2172
- defaultVariants: { align: "inline-start" }
2173
- });
2174
- var InputGroupAddon = ({ className, align = "inline-start", ...props }) => {
2175
- return /* @__PURE__ */ jsx("div", {
2176
- "data-slot": "input-group-addon",
2177
- "data-align": align,
2178
- className: cn(inputGroupAddonVariants({ align }), className),
2179
- onPointerDown: (event) => {
2180
- if (event.target.closest("button")) return;
2181
- event.currentTarget.parentElement?.querySelector("input")?.focus();
2182
- },
2183
- ...props
2184
- });
2185
- };
2186
- var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
2187
- variants: { size: {
2188
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
2189
- sm: "",
2190
- "icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
2191
- "icon-sm": "size-8 p-0 has-[>svg]:p-0"
2192
- } },
2193
- defaultVariants: { size: "xs" }
2194
- });
2195
- var InputGroupButton = ({ className, type = "button", variant = "ghost", size = "xs", ...props }) => {
2196
- return /* @__PURE__ */ jsx(Button, {
2197
- type,
2198
- "data-size": size,
2199
- variant,
2200
- className: cn(inputGroupButtonVariants({ size }), className),
2201
- ...props
2202
- });
2203
- };
2204
- var InputGroupText = ({ className, ...props }) => {
2205
- return /* @__PURE__ */ jsx("span", {
2206
- className: cn("flex items-center gap-2 text-sm text-foreground/70 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
2207
- ...props
2208
- });
2209
- };
2210
- var InputGroupInput = ({ className, ...props }) => {
2211
- return /* @__PURE__ */ jsx(Input, {
2212
- "data-slot": "input-group-control",
2213
- className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
2214
- ...props
2215
- });
2216
- };
2217
- var InputGroupTextarea = ({ className, ...props }) => {
2218
- return /* @__PURE__ */ jsx(Textarea, {
2219
- "data-slot": "input-group-control",
2220
- className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
2221
- ...props
2222
- });
2223
- };
2224
- //#endregion
2225
- //#region ../ui/src/components/ui/command/command.tsx
2226
- var Command = ({ className, ...props }) => {
2227
- return /* @__PURE__ */ jsx(Command$1, {
2228
- "data-slot": "command",
2229
- className: cn("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", className),
2230
- ...props
2231
- });
2232
- };
2233
- var CommandDialog = ({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) => {
2234
- return /* @__PURE__ */ jsxs(Dialog, {
2235
- ...props,
2236
- children: [/* @__PURE__ */ jsxs(DialogHeader, {
2237
- className: "sr-only",
2238
- children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
2239
- }), /* @__PURE__ */ jsx(DialogContent, {
2240
- className: cn("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", className),
2241
- showCloseButton,
2242
- children
2243
- })]
2244
- });
2245
- };
2246
- var CommandInput = ({ className, ...props }) => {
2247
- return /* @__PURE__ */ jsx("div", {
2248
- "data-slot": "command-input-wrapper",
2249
- className: "border-b border-border p-1",
2250
- children: /* @__PURE__ */ jsxs(InputGroup, {
2251
- className: "h-8 border-transparent bg-transparent shadow-none *:data-[slot=input-group-addon]:pl-2 dark:bg-transparent",
2252
- children: [/* @__PURE__ */ jsx(Command$1.Input, {
2253
- "data-slot": "command-input",
2254
- className: cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
2255
- ...props
2256
- }), /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(IconSearch, { className: "size-4 shrink-0 opacity-50" }) })]
2257
- })
2258
- });
2259
- };
2260
- /**
2261
- * The palette's results list. The scroll container is the DS ScrollArea rather
2262
- * than the primitive's own `overflow-y-auto`, because a list of results that
2263
- * continues past the fold with no bar and no fade reads as a complete list. The
2264
- * cap stays overridable: `cn` lets a caller's own `max-h-*` replace the default.
2265
- *
2266
- * The ScrollArea wraps the list from OUTSIDE rather than lining it: cmdk's list
2267
- * carries `role="listbox"`, and a listbox may not contain presentation wrappers
2268
- * (axe flags that as a critical aria-required-children violation). The options
2269
- * have to stay direct children of the element that holds the role.
2270
- *
2271
- * cmdk keeps the active item in view with `scrollIntoView({ block: 'nearest' })`
2272
- * on the item, which acts on the nearest scrollable ancestor, so that keeps
2273
- * working now that the viewport is the one that scrolls. `scroll-py-1` goes on
2274
- * the viewport for the same reason: it is what pads that scroll.
2275
- */
2276
- var CommandList = ({ className, children, ...props }) => {
2277
- return /* @__PURE__ */ jsx(ScrollArea, {
2278
- type: "always",
2279
- fade: true,
2280
- fadeFrom: "popover",
2281
- className: cn("max-h-72", className),
2282
- viewPortClassName: "scroll-py-1",
2283
- children: /* @__PURE__ */ jsx(Command$1.List, {
2284
- "data-slot": "command-list",
2285
- className: "outline-none",
2286
- ...props,
2287
- children
2288
- })
2289
- });
2290
- };
2291
- var CommandEmpty = ({ className, ...props }) => {
2292
- return /* @__PURE__ */ jsx(Command$1.Empty, {
2293
- "data-slot": "command-empty",
2294
- className: cn("py-6 text-center text-sm", className),
2295
- ...props
2296
- });
2297
- };
2298
- var CommandGroup = ({ className, ...props }) => {
2299
- return /* @__PURE__ */ jsx(Command$1.Group, {
2300
- "data-slot": "command-group",
2301
- className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
2302
- ...props
2303
- });
2304
- };
2305
- var CommandSeparator = ({ className, ...props }) => {
2306
- return /* @__PURE__ */ jsx(Command$1.Separator, {
2307
- "data-slot": "command-separator",
2308
- className: cn("-mx-1 h-px bg-border", className),
2309
- ...props
2310
- });
2311
- };
2312
- var CommandItem = ({ className, children, ...props }) => {
2313
- return /* @__PURE__ */ jsxs(Command$1.Item, {
2314
- "data-slot": "command-item",
2315
- className: cn("group/command-item", popupItemClass("cmdk"), className),
2316
- ...props,
2317
- children: [children, /* @__PURE__ */ jsx(IconCheck, {
2318
- "data-slot": "command-item-indicator",
2319
- className: "ml-auto size-4 shrink-0 opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"
2320
- })]
2321
- });
2322
- };
2323
- var CommandShortcut = ({ className, ...props }) => {
2324
- return /* @__PURE__ */ jsx("span", {
2325
- "data-slot": "command-shortcut",
2326
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className),
2327
- ...props
2328
- });
2329
- };
2330
- //#endregion
2331
- //#region ../ui/src/components/ui/context-menu/context-menu.tsx
2332
- var ContextMenu = ({ ...props }) => {
2333
- return /* @__PURE__ */ jsx(ContextMenu$1.Root, {
2334
- "data-slot": "context-menu",
2335
- ...props
2336
- });
2337
- };
2338
- var ContextMenuPortal = ({ ...props }) => {
2339
- return /* @__PURE__ */ jsx(ContextMenu$1.Portal, {
2340
- "data-slot": "context-menu-portal",
2341
- ...props
2342
- });
2343
- };
2344
- var ContextMenuTrigger = ({ className, ...props }) => {
2345
- return /* @__PURE__ */ jsx(ContextMenu$1.Trigger, {
2346
- "data-slot": "context-menu-trigger",
2347
- className: cn("select-none", className),
2348
- ...props
2349
- });
2350
- };
2351
- var ContextMenuContent = ({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) => {
2352
- return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
2353
- className: "isolate z-50 outline-none",
2354
- align,
2355
- alignOffset,
2356
- side,
2357
- sideOffset,
2358
- children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
2359
- "data-slot": "context-menu-content",
2360
- className: cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
2361
- ...props
2362
- })
2363
- }) });
2364
- };
2365
- var ContextMenuGroup = ({ ...props }) => {
2366
- return /* @__PURE__ */ jsx(ContextMenu$1.Group, {
2367
- "data-slot": "context-menu-group",
2368
- ...props
2369
- });
2370
- };
2371
- var ContextMenuLabel = ({ className, inset, ...props }) => {
2372
- return /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, {
2373
- "data-slot": "context-menu-label",
2374
- "data-inset": inset,
2375
- className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-[inset=true]:pl-7", className),
2376
- ...props
2377
- });
2378
- };
2379
- var ContextMenuItem = ({ className, inset, variant = "default", ...props }) => {
2380
- return /* @__PURE__ */ jsx(ContextMenu$1.Item, {
2381
- "data-slot": "context-menu-item",
2382
- "data-inset": inset,
2383
- "data-variant": variant,
2384
- className: cn("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
2385
- ...props
2386
- });
2387
- };
2388
- var ContextMenuSub = ({ ...props }) => {
2389
- return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuRoot, {
2390
- "data-slot": "context-menu-sub",
2391
- ...props
2392
- });
2393
- };
2394
- var ContextMenuSubTrigger = ({ className, inset, children, ...props }) => {
2395
- return /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
2396
- "data-slot": "context-menu-sub-trigger",
2397
- "data-inset": inset,
2398
- className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2399
- ...props,
2400
- children: [children, /* @__PURE__ */ jsx(IconChevronRight, { className: "ml-auto" })]
2401
- });
2402
- };
2403
- var ContextMenuSubContent = ({ ...props }) => {
2404
- return /* @__PURE__ */ jsx(ContextMenuContent, {
2405
- "data-slot": "context-menu-sub-content",
2406
- className: "shadow-lg",
2407
- side: "right",
2408
- ...props
2409
- });
2410
- };
2411
- var ContextMenuCheckboxItem = ({ className, children, checked, inset, ...props }) => {
2412
- return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
2413
- "data-slot": "context-menu-checkbox-item",
2414
- "data-inset": inset,
2415
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2416
- checked,
2417
- ...props,
2418
- children: [/* @__PURE__ */ jsx("span", {
2419
- className: "pointer-events-none absolute right-2",
2420
- children: /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2421
- }), children]
2422
- });
2423
- };
2424
- var ContextMenuRadioGroup = ({ ...props }) => {
2425
- return /* @__PURE__ */ jsx(ContextMenu$1.RadioGroup, {
2426
- "data-slot": "context-menu-radio-group",
2427
- ...props
2428
- });
2429
- };
2430
- var ContextMenuRadioItem = ({ className, children, inset, ...props }) => {
2431
- return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
2432
- "data-slot": "context-menu-radio-item",
2433
- "data-inset": inset,
2434
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2435
- ...props,
2436
- children: [/* @__PURE__ */ jsx("span", {
2437
- className: "pointer-events-none absolute right-2",
2438
- children: /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2439
- }), children]
2440
- });
2441
- };
2442
- var ContextMenuSeparator = ({ className, ...props }) => {
2443
- return /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
2444
- "data-slot": "context-menu-separator",
2445
- className: cn("-mx-1 my-1 h-px bg-border", className),
2446
- ...props
2447
- });
2448
- };
2449
- var ContextMenuShortcut = ({ className, ...props }) => {
2450
- return /* @__PURE__ */ jsx("span", {
2451
- "data-slot": "context-menu-shortcut",
2452
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
2453
- ...props
2454
- });
2455
- };
2456
- //#endregion
2457
- //#region ../ui/src/components/ui/drawer/drawer.tsx
2458
- var Drawer = ({ ...props }) => {
2459
- return /* @__PURE__ */ jsx(Dialog$1.Root, {
2460
- "data-slot": "drawer",
2461
- ...props
2462
- });
2463
- };
2464
- var DrawerTrigger = ({ ...props }) => {
2465
- return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
2466
- "data-slot": "drawer-trigger",
2467
- ...props
2468
- });
2469
- };
2470
- var DrawerClose = ({ ...props }) => {
2471
- return /* @__PURE__ */ jsx(Dialog$1.Close, {
2472
- "data-slot": "drawer-close",
2473
- ...props
2474
- });
2475
- };
2476
- var DrawerOverlay = ({ className, ...props }) => {
2477
- return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
2478
- "data-slot": "drawer-overlay",
2479
- className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
2480
- ...props
2481
- });
2482
- };
2483
- var DrawerContent = ({ className, children, side = "right", showCloseButton = true, ...props }) => {
2484
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, {
2485
- "data-slot": "drawer-portal",
2486
- children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
2487
- "data-slot": "drawer-content",
2488
- "data-side": side,
2489
- className: cn("fixed z-50 flex flex-col gap-4 border-border bg-popover p-4 text-sm text-popover-foreground shadow-lg outline-none duration-100 motion-reduce:animate-none data-open:animate-in data-closed:animate-out", side === "right" && "inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-open:slide-in-from-right data-closed:slide-out-to-right", side === "left" && "inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-open:slide-in-from-left data-closed:slide-out-to-left", side === "top" && "inset-x-0 top-0 h-auto border-b data-open:slide-in-from-top data-closed:slide-out-to-top", side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-open:slide-in-from-bottom data-closed:slide-out-to-bottom", className),
2490
- ...props,
2491
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
2492
- "data-slot": "drawer-close",
2493
- render: /* @__PURE__ */ jsx(Button, {
2494
- variant: "ghost",
2495
- className: "absolute top-2 right-2",
2496
- size: "icon-sm"
2497
- }),
2498
- children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
2499
- className: "sr-only",
2500
- children: "Close"
2501
- })]
2502
- })]
2503
- })]
2504
- });
2505
- };
2506
- var DrawerHeader = ({ className, ...props }) => {
2507
- return /* @__PURE__ */ jsx("div", {
2508
- "data-slot": "drawer-header",
2509
- className: cn("flex flex-col gap-2", className),
2510
- ...props
2511
- });
2512
- };
2513
- var DrawerFooter = ({ className, ...props }) => {
2514
- return /* @__PURE__ */ jsx("div", {
2515
- "data-slot": "drawer-footer",
2516
- className: cn("mt-auto flex flex-col gap-2", className),
2517
- ...props
2518
- });
2519
- };
2520
- var DrawerTitle = ({ className, ...props }) => {
2521
- return /* @__PURE__ */ jsx(Dialog$1.Title, {
2522
- "data-slot": "drawer-title",
2523
- className: cn("text-base leading-none font-medium", className),
2524
- ...props
2525
- });
2526
- };
2527
- var DrawerDescription = ({ className, ...props }) => {
2528
- return /* @__PURE__ */ jsx(Dialog$1.Description, {
2529
- "data-slot": "drawer-description",
2530
- className: cn("text-sm text-muted-foreground", className),
2531
- ...props
2532
- });
2533
- };
2534
- //#endregion
2535
- //#region ../ui/src/components/ui/empty/empty.tsx
2536
- var Empty = ({ className, ...props }) => {
2537
- return /* @__PURE__ */ jsx("div", {
2538
- "data-slot": "empty",
2539
- className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", className),
2540
- ...props
2541
- });
2542
- };
2543
- var EmptyHeader = ({ className, ...props }) => {
2544
- return /* @__PURE__ */ jsx("div", {
2545
- "data-slot": "empty-header",
2546
- className: cn("flex max-w-sm flex-col items-center gap-2", className),
2547
- ...props
2548
- });
2549
- };
2550
- var emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
2551
- variants: { variant: {
2552
- default: "bg-transparent",
2553
- icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
2554
- } },
2555
- defaultVariants: { variant: "default" }
2556
- });
2557
- var EmptyMedia = ({ className, variant = "default", ...props }) => {
2558
- return /* @__PURE__ */ jsx("div", {
2559
- "data-slot": "empty-icon",
2560
- "data-variant": variant,
2561
- className: cn(emptyMediaVariants({
2562
- variant,
2563
- className
2564
- })),
2565
- ...props
2566
- });
2567
- };
2568
- var EmptyTitle = ({ className, ...props }) => {
2569
- return /* @__PURE__ */ jsx("div", {
2570
- "data-slot": "empty-title",
2571
- className: cn("font-heading text-sm font-medium tracking-tight", className),
2572
- ...props
2573
- });
2574
- };
2575
- var EmptyDescription = ({ className, ...props }) => {
2576
- return /* @__PURE__ */ jsx("div", {
2577
- "data-slot": "empty-description",
2578
- className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
2579
- ...props
2580
- });
2581
- };
2582
- var EmptyContent = ({ className, ...props }) => {
2583
- return /* @__PURE__ */ jsx("div", {
2584
- "data-slot": "empty-content",
2585
- className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className),
2586
- ...props
2587
- });
2588
- };
2589
- //#endregion
2590
- //#region ../ui/src/components/ui/field/field.tsx
2591
- var Field = ({ className, ...props }) => {
2592
- return /* @__PURE__ */ jsx(Field$1.Root, {
2593
- "data-slot": "field",
2594
- className: cn("group/field flex flex-col gap-1.5", className),
2595
- ...props
2596
- });
2597
- };
2598
- var FieldLabel = ({ className, ...props }) => {
2599
- return /* @__PURE__ */ jsx(Field$1.Label, {
2600
- "data-slot": "field-label",
2601
- className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-has-disabled/field:pointer-events-none group-has-disabled/field:opacity-50", className),
2602
- ...props
2603
- });
2604
- };
2605
- var FieldDescription = ({ className, ...props }) => {
2606
- return /* @__PURE__ */ jsx(Field$1.Description, {
2607
- "data-slot": "field-description",
2608
- className: cn("text-sm text-muted-foreground", className),
2609
- ...props
2610
- });
2611
- };
2612
- var FieldError = ({ className, ...props }) => {
2613
- return /* @__PURE__ */ jsx(Field$1.Error, {
2614
- "data-slot": "field-error",
2615
- className: cn("text-sm text-destructive", className),
2616
- ...props
2617
- });
2618
- };
2619
- //#endregion
2620
- //#region ../ui/src/components/ui/hover-card/hover-card.tsx
2621
- var HoverCard = ({ ...props }) => {
2622
- return /* @__PURE__ */ jsx(PreviewCard.Root, {
2623
- "data-slot": "hover-card",
2624
- ...props
2625
- });
2626
- };
2627
- var HoverCardTrigger = ({ ...props }) => {
2628
- return /* @__PURE__ */ jsx(PreviewCard.Trigger, {
2629
- "data-slot": "hover-card-trigger",
2630
- ...props
2631
- });
2632
- };
2633
- var HoverCardContent = ({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, ...props }) => {
2634
- return /* @__PURE__ */ jsx(PreviewCard.Portal, {
2635
- "data-slot": "hover-card-portal",
2636
- children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
2637
- align,
2638
- alignOffset,
2639
- side,
2640
- sideOffset,
2641
- className: "isolate z-50",
2642
- children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
2643
- "data-slot": "hover-card-content",
2644
- className: cn("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 motion-reduce:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2645
- ...props
2646
- })
2647
- })
2648
- });
2649
- };
2650
- //#endregion
2651
- //#region ../ui/src/components/ui/indicator/indicator.tsx
2652
- /**
2653
- * Indicator: notification count-bubble or status-dot that attaches to a corner
2654
- * of another element (the Material/Angular "badge" concept; our Badge is the
2655
- * label chip). The parent element must be position-relative (e.g. `relative`).
2656
- *
2657
- * Legacy mapping: `edynBadge` directive -> `Indicator` default/destructive;
2658
- * `edyn-dot` -> `Indicator` dot variant.
2659
- * Positioning uses Radix vocabulary: side (top|bottom) + align (start|end).
2660
- */
2661
- var indicatorVariants = cva("absolute z-10 inline-flex shrink-0 items-center justify-center font-medium leading-none ring-2 ring-background", {
2662
- variants: {
2663
- variant: {
2664
- /** Count bubble: primary colors, shows children as the count/text. */
2665
- default: "h-4 min-w-4 rounded-full bg-primary px-1 text-xs tabular-nums text-primary-foreground",
2666
- /** Status dot: solid circle, no children rendered. */
2667
- dot: "size-2 rounded-full bg-primary",
2668
- /** Count bubble in destructive (error/alert) colors. */
2669
- destructive: "h-4 min-w-4 rounded-full bg-destructive px-1 text-xs text-destructive-foreground tabular-nums dark:text-background"
2670
- },
2671
- side: {
2672
- top: "top-0",
2673
- bottom: "bottom-0"
2674
- },
2675
- align: {
2676
- start: "left-0",
2677
- end: "right-0"
2678
- }
2679
- },
2680
- compoundVariants: [
2681
- {
2682
- side: "top",
2683
- align: "start",
2684
- class: "-translate-x-1/2 -translate-y-1/2"
2685
- },
2686
- {
2687
- side: "top",
2688
- align: "end",
2689
- class: "translate-x-1/2 -translate-y-1/2"
2690
- },
2691
- {
2692
- side: "bottom",
2693
- align: "start",
2694
- class: "-translate-x-1/2 translate-y-1/2"
2695
- },
2696
- {
2697
- side: "bottom",
2698
- align: "end",
2699
- class: "translate-x-1/2 translate-y-1/2"
2700
- }
2701
- ],
2702
- defaultVariants: {
2703
- variant: "default",
2704
- side: "top",
2705
- align: "end"
2706
- }
2707
- });
2708
- var Indicator = ({ className, variant = "default", side = "top", align = "end", children, ...props }) => {
2709
- return /* @__PURE__ */ jsx("span", {
2710
- "data-slot": "indicator",
2711
- "data-variant": variant,
2712
- "data-side": side,
2713
- "data-align": align,
2714
- className: cn(indicatorVariants({
2715
- variant,
2716
- side,
2717
- align
2718
- }), className),
2719
- ...props,
2720
- children: variant !== "dot" ? children : null
2721
- });
2722
- };
2723
- //#endregion
2724
- //#region ../ui/src/components/ui/input-otp/input-otp.tsx
2725
- var InputOTP = ({ className, containerClassName, ...props }) => {
2726
- return /* @__PURE__ */ jsx(OTPInput, {
2727
- "data-slot": "input-otp",
2728
- containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
2729
- spellCheck: false,
2730
- className: cn("disabled:cursor-not-allowed", className),
2731
- ...props
2732
- });
2733
- };
2734
- var InputOTPGroup = ({ className, ...props }) => {
2735
- return /* @__PURE__ */ jsx("div", {
2736
- "data-slot": "input-otp-group",
2737
- className: cn("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", className),
2738
- ...props
2739
- });
2740
- };
2741
- var InputOTPSlot = ({ index, className, ...props }) => {
2742
- const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
2743
- return /* @__PURE__ */ jsxs("div", {
2744
- "data-slot": "input-otp-slot",
2745
- "data-active": isActive,
2746
- className: cn("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
2747
- ...props,
2748
- children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
2749
- className: "pointer-events-none absolute inset-0 flex items-center justify-center",
2750
- children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000 motion-reduce:animate-none" })
2751
- })]
2752
- });
2753
- };
2754
- var InputOTPSeparator = ({ ...props }) => {
2755
- return /* @__PURE__ */ jsx("div", {
2756
- "data-slot": "input-otp-separator",
2757
- className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
2758
- "aria-hidden": "true",
2759
- ...props,
2760
- children: /* @__PURE__ */ jsx(IconMinus, {})
2761
- });
2762
- };
2763
- //#endregion
2764
- //#region ../ui/src/components/ui/separator/separator.tsx
2765
- /**
2766
- * Hairline rule between content, announced as `role="separator"`.
2767
- *
2768
- * The orientation styles are branched in TS rather than written as
2769
- * `data-[orientation=*]:` variants on purpose. A variant carries two
2770
- * selectors' worth of specificity, so it would outrank a plain class passed in
2771
- * by the caller: the sidebar's own `w-auto` lost to `w-full` that way. Branching
2772
- * emits one plain class per axis, which `cn` can dedupe and a caller can
2773
- * override.
2774
- *
2775
- * Vertical uses `self-stretch` instead of `h-full`: a percentage height needs a
2776
- * definite parent, and the usual host is an `items-center` row whose height
2777
- * comes from its content.
2778
- */
2779
- var Separator = ({ className, orientation = "horizontal", ...props }) => {
2780
- return /* @__PURE__ */ jsx(Separator$1, {
2781
- "data-slot": "separator",
2782
- orientation,
2783
- className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-px w-full" : "w-px self-stretch", className),
2784
- ...props
2785
- });
2786
- };
2787
- //#endregion
2788
- //#region ../ui/src/components/ui/item/item.tsx
2789
- var ItemGroup = ({ className, ...props }) => {
2790
- return /* @__PURE__ */ jsx("div", {
2791
- role: "list",
2792
- "data-slot": "item-group",
2793
- className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
2794
- ...props
2795
- });
2796
- };
2797
- var ItemSeparator = ({ className, ...props }) => {
2798
- return /* @__PURE__ */ jsx(Separator, {
2799
- "data-slot": "item-separator",
2800
- orientation: "horizontal",
2801
- className: cn("my-2", className),
2802
- ...props
2803
- });
2804
- };
2805
- var itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
2806
- variants: {
2807
- variant: {
2808
- default: "border-transparent",
2809
- outline: "border-border",
2810
- muted: "border-transparent bg-muted/50"
2811
- },
2812
- size: {
2813
- default: "gap-2.5 px-3 py-2.5",
2814
- sm: "gap-2.5 px-3 py-2.5",
2815
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
2816
- }
2817
- },
2818
- defaultVariants: {
2819
- variant: "default",
2820
- size: "default"
2821
- }
2822
- });
2823
- var Item = ({ className, variant = "default", size = "default", render, ...props }) => {
2824
- return useRender({
2825
- defaultTagName: "div",
2826
- props: mergeProps({ className: cn(itemVariants({
2827
- variant,
2828
- size,
2829
- className
2830
- })) }, props),
2831
- render,
2832
- state: {
2833
- slot: "item",
2834
- variant,
2835
- size
2836
- }
2837
- });
2838
- };
2839
- var itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
2840
- variants: { variant: {
2841
- default: "bg-transparent",
2842
- icon: "[&_svg:not([class*='size-'])]:size-4",
2843
- image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
2844
- } },
2845
- defaultVariants: { variant: "default" }
2846
- });
2847
- var ItemMedia = ({ className, variant = "default", ...props }) => {
2848
- return /* @__PURE__ */ jsx("div", {
2849
- "data-slot": "item-media",
2850
- "data-variant": variant,
2851
- className: cn(itemMediaVariants({
2852
- variant,
2853
- className
2854
- })),
2855
- ...props
2856
- });
2857
- };
2858
- var ItemContent = ({ className, ...props }) => {
2859
- return /* @__PURE__ */ jsx("div", {
2860
- "data-slot": "item-content",
2861
- className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
2862
- ...props
2863
- });
2864
- };
2865
- var ItemTitle = ({ className, ...props }) => {
2866
- return /* @__PURE__ */ jsx("div", {
2867
- "data-slot": "item-title",
2868
- className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
2869
- ...props
2870
- });
2871
- };
2872
- var ItemDescription = ({ className, ...props }) => {
2873
- return /* @__PURE__ */ jsx("p", {
2874
- "data-slot": "item-description",
2875
- className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
2876
- ...props
2877
- });
2878
- };
2879
- var ItemActions = ({ className, ...props }) => {
2880
- return /* @__PURE__ */ jsx("div", {
2881
- "data-slot": "item-actions",
2882
- className: cn("flex items-center gap-2", className),
2883
- ...props
2884
- });
2885
- };
2886
- var ItemHeader = ({ className, ...props }) => {
2887
- return /* @__PURE__ */ jsx("div", {
2888
- "data-slot": "item-header",
2889
- className: cn("flex basis-full items-center justify-between gap-2", className),
2890
- ...props
2891
- });
2892
- };
2893
- var ItemFooter = ({ className, ...props }) => {
2894
- return /* @__PURE__ */ jsx("div", {
2895
- "data-slot": "item-footer",
2896
- className: cn("flex basis-full items-center justify-between gap-2", className),
2897
- ...props
2898
- });
2899
- };
2900
- //#endregion
2901
- //#region ../ui/src/components/ui/kbd/kbd.tsx
2902
- var Kbd = ({ className, ...props }) => {
2903
- return /* @__PURE__ */ jsx("kbd", {
2904
- "data-slot": "kbd",
2905
- className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
2906
- ...props
2907
- });
2908
- };
2909
- var KbdGroup = ({ className, ...props }) => {
2910
- return /* @__PURE__ */ jsx("kbd", {
2911
- "data-slot": "kbd-group",
2912
- className: cn("inline-flex items-center gap-1", className),
2913
- ...props
2914
- });
2915
- };
2916
- //#endregion
2917
- //#region ../ui/src/components/ui/label/label.tsx
2918
- var Label = ({ className, ...props }) => {
2919
- return /* @__PURE__ */ jsx("label", {
2920
- "data-slot": "label",
2921
- className: 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),
2922
- ...props
2923
- });
2924
- };
2925
- //#endregion
2926
- //#region ../ui/src/components/ui/marker/marker.tsx
2927
- var markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
2928
- default: "",
2929
- separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
2930
- border: "border-b border-border pb-2"
2931
- } } });
2932
- var Marker = ({ className, variant = "default", render, ...props }) => {
2933
- return useRender({
2934
- defaultTagName: "div",
2935
- props: mergeProps({ className: cn(markerVariants({
2936
- variant,
2937
- className
2938
- })) }, props),
2939
- render,
2940
- state: {
2941
- slot: "marker",
2942
- variant
2943
- }
2944
- });
2945
- };
2946
- var MarkerIcon = ({ className, ...props }) => {
2947
- return /* @__PURE__ */ jsx("span", {
2948
- "data-slot": "marker-icon",
2949
- "aria-hidden": "true",
2950
- className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2951
- ...props
2952
- });
2953
- };
2954
- var MarkerContent = ({ className, ...props }) => {
2955
- return /* @__PURE__ */ jsx("span", {
2956
- "data-slot": "marker-content",
2957
- className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
2958
- ...props
2959
- });
2960
- };
2961
- //#endregion
2962
- //#region ../ui/src/components/ui/menubar/menubar.tsx
2963
- var Menubar = ({ className, ...props }) => {
2964
- return /* @__PURE__ */ jsx(Menubar$1, {
2965
- "data-slot": "menubar",
2966
- className: cn("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", className),
2967
- ...props
2968
- });
2969
- };
2970
- var MenubarMenu = ({ ...props }) => {
2971
- return /* @__PURE__ */ jsx(DropdownMenu, {
2972
- "data-slot": "menubar-menu",
2973
- ...props
2974
- });
2975
- };
2976
- var MenubarGroup = ({ ...props }) => {
2977
- return /* @__PURE__ */ jsx(DropdownMenuGroup, {
2978
- "data-slot": "menubar-group",
2979
- ...props
2980
- });
2981
- };
2982
- var MenubarPortal = ({ ...props }) => {
2983
- return /* @__PURE__ */ jsx(DropdownMenuPortal, {
2984
- "data-slot": "menubar-portal",
2985
- ...props
2986
- });
2987
- };
2988
- var MenubarTrigger = ({ className, ...props }) => {
2989
- return /* @__PURE__ */ jsx(DropdownMenuTrigger, {
2990
- "data-slot": "menubar-trigger",
2991
- className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
2992
- ...props
2993
- });
2994
- };
2995
- var MenubarContent = ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) => {
2996
- return /* @__PURE__ */ jsx(DropdownMenuContent, {
2997
- "data-slot": "menubar-content",
2998
- align,
2999
- alignOffset,
3000
- sideOffset,
3001
- className: cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "motion-reduce:animate-none", className),
3002
- ...props
3003
- });
3004
- };
3005
- var MenubarItem = ({ className, inset, variant = "default", ...props }) => {
3006
- return /* @__PURE__ */ jsx(DropdownMenuItem, {
3007
- "data-slot": "menubar-item",
3008
- "data-inset": inset,
3009
- "data-variant": variant,
3010
- className: cn("group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className),
3011
- ...props
3012
- });
3013
- };
3014
- var MenubarCheckboxItem = ({ className, children, checked, inset, ...props }) => {
3015
- return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
3016
- "data-slot": "menubar-checkbox-item",
3017
- "data-inset": inset,
3018
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
3019
- checked,
3020
- ...props,
3021
- children: [/* @__PURE__ */ jsx("span", {
3022
- className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
3023
- children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
3024
- }), children]
3025
- });
3026
- };
3027
- var MenubarRadioGroup = ({ ...props }) => {
3028
- return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
3029
- "data-slot": "menubar-radio-group",
3030
- ...props
3031
- });
3032
- };
3033
- var MenubarRadioItem = ({ className, children, inset, ...props }) => {
3034
- return /* @__PURE__ */ jsxs(Menu.RadioItem, {
3035
- "data-slot": "menubar-radio-item",
3036
- "data-inset": inset,
3037
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
3038
- ...props,
3039
- children: [/* @__PURE__ */ jsx("span", {
3040
- className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
3041
- children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
3042
- }), children]
3043
- });
3044
- };
3045
- var MenubarLabel = ({ className, inset, ...props }) => {
3046
- return /* @__PURE__ */ jsx(DropdownMenuLabel, {
3047
- "data-slot": "menubar-label",
3048
- "data-inset": inset,
3049
- className: cn("px-1.5 py-1 text-sm font-medium data-[inset=true]:pl-7", className),
3050
- ...props
3051
- });
3052
- };
3053
- var MenubarSeparator = ({ className, ...props }) => {
3054
- return /* @__PURE__ */ jsx(DropdownMenuSeparator, {
3055
- "data-slot": "menubar-separator",
3056
- className: cn("-mx-1 my-1 h-px bg-border", className),
3057
- ...props
3058
- });
3059
- };
3060
- var MenubarShortcut = ({ className, ...props }) => {
3061
- return /* @__PURE__ */ jsx(DropdownMenuShortcut, {
3062
- "data-slot": "menubar-shortcut",
3063
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
3064
- ...props
3065
- });
3066
- };
3067
- var MenubarSub = ({ ...props }) => {
3068
- return /* @__PURE__ */ jsx(DropdownMenuSub, {
3069
- "data-slot": "menubar-sub",
3070
- ...props
3071
- });
3072
- };
3073
- var MenubarSubTrigger = ({ className, inset, ...props }) => {
3074
- return /* @__PURE__ */ jsx(DropdownMenuSubTrigger, {
3075
- "data-slot": "menubar-sub-trigger",
3076
- "data-inset": inset,
3077
- className: cn("gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
3078
- ...props
3079
- });
3080
- };
3081
- var MenubarSubContent = ({ className, ...props }) => {
3082
- return /* @__PURE__ */ jsx(DropdownMenuSubContent, {
3083
- "data-slot": "menubar-sub-content",
3084
- className: cn("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
3085
- ...props
3086
- });
3087
- };
3088
- //#endregion
3089
- //#region ../ui/src/components/ui/message/message.tsx
3090
- var MessageGroup = ({ className, ...props }) => {
3091
- return /* @__PURE__ */ jsx("div", {
3092
- "data-slot": "message-group",
3093
- className: cn("flex min-w-0 flex-col gap-2", className),
3094
- ...props
3095
- });
3096
- };
3097
- var Message = ({ className, align = "start", ...props }) => {
3098
- return /* @__PURE__ */ jsx("div", {
3099
- "data-slot": "message",
3100
- "data-align": align,
3101
- className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
3102
- ...props
3103
- });
3104
- };
3105
- var MessageAvatar = ({ className, ...props }) => {
3106
- return /* @__PURE__ */ jsx("div", {
3107
- "data-slot": "message-avatar",
3108
- className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
3109
- ...props
3110
- });
3111
- };
3112
- var MessageContent = ({ className, ...props }) => {
3113
- return /* @__PURE__ */ jsx("div", {
3114
- "data-slot": "message-content",
3115
- className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
3116
- ...props
3117
- });
3118
- };
3119
- var MessageHeader = ({ className, ...props }) => {
3120
- return /* @__PURE__ */ jsx("div", {
3121
- "data-slot": "message-header",
3122
- className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className),
3123
- ...props
3124
- });
3125
- };
3126
- var MessageFooter = ({ className, ...props }) => {
3127
- return /* @__PURE__ */ jsx("div", {
3128
- "data-slot": "message-footer",
3129
- className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className),
3130
- ...props
3131
- });
3132
- };
3133
- //#endregion
3134
- //#region ../ui/src/components/ui/message-scroller/message-scroller.tsx
3135
- var MessageScrollerProvider = (props) => {
3136
- return /* @__PURE__ */ jsx(MessageScroller$1.Provider, { ...props });
3137
- };
3138
- var MessageScroller = ({ className, ...props }) => {
3139
- return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
3140
- "data-slot": "message-scroller",
3141
- className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
3142
- ...props
3143
- });
3144
- };
3145
- var MessageScrollerViewport = ({ className, ...props }) => {
3146
- return /* @__PURE__ */ jsx(MessageScroller$1.Viewport, {
3147
- "data-slot": "message-scroller-viewport",
3148
- className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
3149
- ...props
3150
- });
3151
- };
3152
- var MessageScrollerContent = ({ className, ...props }) => {
3153
- return /* @__PURE__ */ jsx(MessageScroller$1.Content, {
3154
- "data-slot": "message-scroller-content",
3155
- className: cn("flex h-max min-h-full flex-col gap-6", className),
3156
- ...props
3157
- });
3158
- };
3159
- var MessageScrollerItem = ({ className, scrollAnchor = false, ...props }) => {
3160
- return /* @__PURE__ */ jsx(MessageScroller$1.Item, {
3161
- "data-slot": "message-scroller-item",
3162
- scrollAnchor,
3163
- className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
3164
- ...props
3165
- });
3166
- };
3167
- var MessageScrollerButton = ({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) => {
3168
- return /* @__PURE__ */ jsx(MessageScroller$1.Button, {
3169
- "data-slot": "message-scroller-button",
3170
- "data-direction": direction,
3171
- "data-variant": variant,
3172
- "data-size": size,
3173
- direction,
3174
- className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 motion-reduce:transition-none hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
3175
- render: render ?? /* @__PURE__ */ jsx(Button, {
3176
- variant,
3177
- size
3178
- }),
3179
- ...props,
3180
- children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconArrowDown, {}), /* @__PURE__ */ jsx("span", {
3181
- className: "sr-only",
3182
- children: direction === "end" ? "Scroll to end" : "Scroll to start"
3183
- })] })
3184
- });
3185
- };
3186
- //#endregion
3187
- //#region ../ui/src/components/ui/native-select/native-select.tsx
3188
- var NativeSelect = ({ className, size = "default", ...props }) => {
3189
- return /* @__PURE__ */ jsxs("div", {
3190
- className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
3191
- "data-slot": "native-select-wrapper",
3192
- "data-size": size,
3193
- children: [/* @__PURE__ */ jsx("select", {
3194
- "data-slot": "native-select",
3195
- "data-size": size,
3196
- className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
3197
- ...props
3198
- }), /* @__PURE__ */ jsx(IconSelector, {
3199
- className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
3200
- "aria-hidden": "true",
3201
- "data-slot": "native-select-icon"
3202
- })]
3203
- });
3204
- };
3205
- var NativeSelectOption = ({ className, ...props }) => {
3206
- return /* @__PURE__ */ jsx("option", {
3207
- "data-slot": "native-select-option",
3208
- className: cn("bg-[Canvas] text-[CanvasText]", className),
3209
- ...props
3210
- });
3211
- };
3212
- var NativeSelectOptGroup = ({ className, ...props }) => {
3213
- return /* @__PURE__ */ jsx("optgroup", {
3214
- "data-slot": "native-select-optgroup",
3215
- className: cn("bg-[Canvas] text-[CanvasText]", className),
3216
- ...props
3217
- });
3218
- };
3219
- //#endregion
3220
- //#region ../ui/src/components/ui/navigation-menu/navigation-menu.tsx
3221
- var NavigationMenu = ({ align = "start", className, children, ...props }) => {
3222
- return /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
3223
- "data-slot": "navigation-menu",
3224
- className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
3225
- ...props,
3226
- children: [children, /* @__PURE__ */ jsx(NavigationMenuPositioner, { align })]
3227
- });
3228
- };
3229
- var NavigationMenuList = ({ className, ...props }) => {
3230
- return /* @__PURE__ */ jsx(NavigationMenu$1.List, {
3231
- "data-slot": "navigation-menu-list",
3232
- className: cn("group flex flex-1 list-none items-center justify-center gap-0", className),
3233
- ...props
3234
- });
3235
- };
3236
- var NavigationMenuItem = ({ className, ...props }) => {
3237
- return /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
3238
- "data-slot": "navigation-menu-item",
3239
- className: cn("relative", className),
3240
- ...props
3241
- });
3242
- };
3243
- var navigationMenuTriggerStyle = cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
3244
- var NavigationMenuTrigger = ({ className, children, ...props }) => {
3245
- return /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
3246
- "data-slot": "navigation-menu-trigger",
3247
- className: cn(navigationMenuTriggerStyle(), "group", className),
3248
- ...props,
3249
- children: [
3250
- children,
3251
- " ",
3252
- /* @__PURE__ */ jsx(IconChevronDown, {
3253
- className: "relative top-px ml-1 size-3 transition duration-300 motion-reduce:transition-none group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
3254
- "aria-hidden": "true"
3255
- })
3256
- ]
3257
- });
3258
- };
3259
- var NavigationMenuContent = ({ className, ...props }) => {
3260
- return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
3261
- "data-slot": "navigation-menu-content",
3262
- className: cn("motion-reduce:animate-none motion-reduce:transition-none", "data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
3263
- ...props
3264
- });
3265
- };
3266
- var NavigationMenuPositioner = ({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) => {
3267
- return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
3268
- side,
3269
- sideOffset,
3270
- align,
3271
- alignOffset,
3272
- className: cn("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className),
3273
- ...props,
3274
- children: /* @__PURE__ */ jsx(NavigationMenu$1.Popup, {
3275
- className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none motion-reduce:transition-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",
3276
- children: /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, { className: "relative size-full overflow-hidden" })
3277
- })
3278
- }) });
3279
- };
3280
- var NavigationMenuLink = ({ className, ...props }) => {
3281
- return /* @__PURE__ */ jsx(NavigationMenu$1.Link, {
3282
- "data-slot": "navigation-menu-link",
3283
- className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className),
3284
- ...props
3285
- });
3286
- };
3287
- var NavigationMenuIndicator = ({ className, ...props }) => {
3288
- return /* @__PURE__ */ jsx(NavigationMenu$1.Icon, {
3289
- "data-slot": "navigation-menu-indicator",
3290
- className: cn("motion-reduce:animate-none", "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className),
3291
- ...props,
3292
- children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
3293
- });
3294
- };
3295
- //#endregion
3296
- //#region ../ui/src/components/ui/pagination/pagination.tsx
3297
- /**
3298
- * Compute the ordered list of page numbers and ellipsis markers to render.
3299
- * First and last pages are always included. `siblingCount` controls how many
3300
- * page numbers appear on each side of the current page.
3301
- */
3302
- var getPaginationRange = (page, count, siblingCount = 1) => {
3303
- if (count <= 0) return [];
3304
- const currentPage = Math.min(Math.max(page, 1), count);
3305
- if (count <= 2 * siblingCount + 5) return Array.from({ length: count }, (_, i) => i + 1);
3306
- const leftSiblingStart = Math.max(currentPage - siblingCount, 2);
3307
- const rightSiblingEnd = Math.min(currentPage + siblingCount, count - 1);
3308
- const showLeftEllipsis = leftSiblingStart > 2;
3309
- const showRightEllipsis = rightSiblingEnd < count - 1;
3310
- const range = [1];
3311
- if (showLeftEllipsis) range.push("ellipsis");
3312
- else for (let i = 2; i < leftSiblingStart; i++) range.push(i);
3313
- for (let i = leftSiblingStart; i <= rightSiblingEnd; i++) range.push(i);
3314
- if (showRightEllipsis) range.push("ellipsis");
3315
- else for (let i = rightSiblingEnd + 1; i < count; i++) range.push(i);
3316
- range.push(count);
3317
- return range;
3318
- };
3319
- /** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
3320
- var clampPage = (page, count) => Math.min(Math.max(page, 1), Math.max(count, 1));
3321
- var Pagination = ({ page, count, onPageChange, siblingCount = 1, className, ...props }) => {
3322
- const currentPage = clampPage(page, count);
3323
- const range = getPaginationRange(currentPage, count, siblingCount);
3324
- let ellipsisCount = 0;
3325
- const handlePrev = () => {
3326
- if (currentPage > 1) onPageChange(currentPage - 1);
3327
- };
3328
- const handleNext = () => {
3329
- if (currentPage < count) onPageChange(currentPage + 1);
3330
- };
3331
- return /* @__PURE__ */ jsx("nav", {
3332
- "aria-label": "pagination",
3333
- ...props,
3334
- className: cn("mx-auto flex w-full justify-center", className),
3335
- children: /* @__PURE__ */ jsxs("ul", {
3336
- className: "flex flex-row items-center gap-1",
3337
- children: [
3338
- /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
3339
- type: "button",
3340
- "aria-label": "Go to previous page",
3341
- disabled: currentPage <= 1,
3342
- onClick: handlePrev,
3343
- className: cn(buttonVariants({
3344
- variant: "ghost",
3345
- size: "icon"
3346
- }), "size-8"),
3347
- children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 16 })
3348
- }) }),
3349
- range.map((item) => {
3350
- if (item === "ellipsis") {
3351
- ellipsisCount += 1;
3352
- const ellipsisKey = `ellipsis-${ellipsisCount}`;
3353
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("span", {
3354
- "aria-hidden": "true",
3355
- className: cn(buttonVariants({
3356
- variant: "ghost",
3357
- size: "icon"
3358
- }), "size-8 cursor-default pointer-events-none"),
3359
- children: /* @__PURE__ */ jsx(IconDots, { size: 16 })
3360
- }) }, ellipsisKey);
3361
- }
3362
- const isActive = item === currentPage;
3363
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
3364
- type: "button",
3365
- "aria-label": `Go to page ${item}`,
3366
- "aria-current": isActive ? "page" : void 0,
3367
- onClick: () => {
3368
- if (!isActive) onPageChange(item);
3369
- },
3370
- className: cn(buttonVariants({
3371
- variant: isActive ? "outline" : "ghost",
3372
- size: "icon"
3373
- }), "size-8", isActive && "pointer-events-none font-semibold"),
3374
- children: item
3375
- }) }, item);
3376
- }),
3377
- /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
3378
- type: "button",
3379
- "aria-label": "Go to next page",
3380
- disabled: currentPage >= count,
3381
- onClick: handleNext,
3382
- className: cn(buttonVariants({
3383
- variant: "ghost",
3384
- size: "icon"
3385
- }), "size-8"),
3386
- children: /* @__PURE__ */ jsx(IconChevronRight, { size: 16 })
3387
- }) })
3388
- ]
3389
- })
3390
- });
3391
- };
3392
- //#endregion
3393
- //#region ../ui/src/components/ui/progress/progress.tsx
3394
- /**
3395
- * The tones: a closed set of semantic colours rather than a class string, so a bar cannot carry a
3396
- * colour the theme does not define and dark mode and a re-theme keep working. Each is the theme token
3397
- * the fill uses; the track is a 20% tint of the same token.
3398
- */
3399
- var TONE_TOKEN = {
3400
- default: "var(--primary)",
3401
- info: "var(--info)",
3402
- success: "var(--success)",
3403
- warning: "var(--warning)",
3404
- destructive: "var(--destructive)"
3405
- };
3406
- /**
3407
- * Colours an app can set without a class string. --progress-color replaces the fill (any colour, such as an
3408
- * app's own status tokens); --progress-track replaces the track, which does not follow the fill: an app
3409
- * that wants a neutral track sets it to var(--muted). Both are read where the bar is, so they follow the
3410
- * theme and can be set on :root or on any ancestor.
3411
- */
3412
- var progressFill = (tone) => `var(--progress-color, ${TONE_TOKEN[tone]})`;
3413
- var progressTrack = (tone) => `var(--progress-track, color-mix(in oklab, ${TONE_TOKEN[tone]} 20%, transparent))`;
3414
- /**
3415
- * How the fill eases its width. The defaults are the 300ms ease-in-out it always had; an app retunes them
3416
- * with --progress-duration and --progress-ease, or turns the easing off with `animated={false}` when the
3417
- * number it shows is itself animated and the bar is driven from the same clock.
3418
- */
3419
- var PROGRESS_DURATION = "var(--progress-duration, 300ms)";
3420
- var PROGRESS_EASE = "var(--progress-ease, cubic-bezier(0.4, 0, 0.2, 1))";
3421
- var progressTrackVariants = cva("relative w-full overflow-hidden rounded-full", {
3422
- variants: { size: {
3423
- sm: "h-1",
3424
- default: "h-2"
3425
- } },
3426
- defaultVariants: { size: "default" }
3427
- });
3428
- var Progress = ({ value = null, tone = "default", size, animated = true, className, ...props }) => {
3429
- const fillStyle = {
3430
- backgroundColor: progressFill(tone),
3431
- ...value != null ? { width: `${value}%` } : null,
3432
- ...animated ? {
3433
- transitionDuration: PROGRESS_DURATION,
3434
- transitionTimingFunction: PROGRESS_EASE
3435
- } : null
3436
- };
3437
- return /* @__PURE__ */ jsx(Progress$1.Root, {
3438
- "data-slot": "progress",
3439
- value: value ?? null,
3440
- className: cn("w-full", className),
3441
- ...props,
3442
- children: /* @__PURE__ */ jsx(Progress$1.Track, {
3443
- "data-slot": "progress-track",
3444
- className: progressTrackVariants({ size }),
3445
- style: { backgroundColor: progressTrack(tone) },
3446
- children: /* @__PURE__ */ jsx(Progress$1.Indicator, {
3447
- "data-slot": "progress-indicator",
3448
- "data-tone": tone,
3449
- className: cn("h-full rounded-full motion-reduce:transition-none motion-reduce:animate-none data-indeterminate:w-1/3 data-indeterminate:animate-[progress-indeterminate_1.5s_ease-in-out_infinite]", animated ? "transition-[width] duration-300 ease-in-out" : "transition-none"),
3450
- style: fillStyle
3451
- })
3452
- })
3453
- });
3454
- };
3455
- //#endregion
3456
- //#region ../ui/src/components/ui/questionnaire/questionnaire.tsx
3457
- var Questionnaire = ({ className, ...props }) => {
3458
- return /* @__PURE__ */ jsx(Questionnaire$1.Root, {
3459
- "data-slot": "questionnaire",
3460
- className: cn("flex w-full min-w-0 flex-col gap-4", className),
3461
- ...props
3462
- });
3463
- };
3464
- var QuestionnaireProgress = ({ className, ...props }) => {
3465
- return /* @__PURE__ */ jsx(Questionnaire$1.Progress, {
3466
- "data-slot": "questionnaire-progress",
3467
- className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
3468
- ...props
3469
- });
3470
- };
3471
- var QuestionnaireItem = ({ className, ...props }) => {
3472
- return /* @__PURE__ */ jsx(Questionnaire$1.Item, {
3473
- "data-slot": "questionnaire-item",
3474
- className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
3475
- ...props
3476
- });
3477
- };
3478
- var QuestionnaireTitle = ({ className, ...props }) => {
3479
- return /* @__PURE__ */ jsx(Questionnaire$1.Title, {
3480
- "data-slot": "questionnaire-title",
3481
- className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
3482
- ...props
3483
- });
3484
- };
3485
- var QuestionnaireDescription = ({ className, ...props }) => {
3486
- return /* @__PURE__ */ jsx(Questionnaire$1.Description, {
3487
- "data-slot": "questionnaire-description",
3488
- className: cn("text-sm text-pretty text-muted-foreground", className),
3489
- ...props
3490
- });
3491
- };
3492
- var QuestionnaireChoices = ({ className, ...props }) => {
3493
- return /* @__PURE__ */ jsx(Questionnaire$1.Choices, {
3494
- "data-slot": "questionnaire-choices",
3495
- className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
3496
- ...props
3497
- });
3498
- };
3499
- var QuestionnaireChoice = ({ children, className, ...props }) => {
3500
- return /* @__PURE__ */ jsxs(Questionnaire$1.Choice, {
3501
- "data-slot": "questionnaire-choice",
3502
- className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
3503
- ...props,
3504
- children: [
3505
- /* @__PURE__ */ jsx(Questionnaire$1.ChoiceInput, {
3506
- "data-slot": "questionnaire-choice-input",
3507
- className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
3508
- }),
3509
- /* @__PURE__ */ jsxs("span", {
3510
- "aria-hidden": "true",
3511
- "data-slot": "questionnaire-choice-indicator",
3512
- className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
3513
- children: [/* @__PURE__ */ jsx("span", {
3514
- "data-slot": "questionnaire-choice-indicator-dot",
3515
- className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
3516
- }), /* @__PURE__ */ jsx(IconCheck, {
3517
- "data-slot": "questionnaire-choice-indicator-check",
3518
- className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
3519
- })]
3520
- }),
3521
- /* @__PURE__ */ jsx(Questionnaire$1.ChoiceLabel, {
3522
- "data-slot": "questionnaire-choice-label",
3523
- className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
3524
- children
3525
- }),
3526
- /* @__PURE__ */ jsx(Questionnaire$1.ChoiceShortcut, {
3527
- "data-slot": "questionnaire-choice-shortcut",
3528
- className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
3529
- })
3530
- ]
3531
- });
3532
- };
3533
- var QuestionnaireChoiceDescription = ({ className, ...props }) => {
3534
- return /* @__PURE__ */ jsx("span", {
3535
- "data-slot": "questionnaire-choice-description",
3536
- className: cn("text-muted-foreground", className),
3537
- ...props
3538
- });
3539
- };
3540
- var QuestionnaireInput = ({ className, ...props }) => {
3541
- return /* @__PURE__ */ jsx("div", {
3542
- "data-slot": "questionnaire-input-wrapper",
3543
- className: "group/questionnaire-input relative w-full min-w-0",
3544
- children: /* @__PURE__ */ jsx(Questionnaire$1.Input, {
3545
- "data-slot": "questionnaire-input",
3546
- className: cn("h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
3547
- ...props
3548
- })
3549
- });
3550
- };
3551
- var QuestionnaireError = ({ className, ...props }) => {
3552
- return /* @__PURE__ */ jsx(Questionnaire$1.Error, {
3553
- "data-slot": "questionnaire-error",
3554
- className: cn("mt-2 text-sm text-destructive", className),
3555
- ...props
3556
- });
3557
- };
3558
- var QuestionnaireActions = ({ className, ...props }) => {
3559
- return /* @__PURE__ */ jsx("div", {
3560
- "data-slot": "questionnaire-actions",
3561
- className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
3562
- ...props
3563
- });
3564
- };
3565
- var QuestionnairePrevious = ({ children, className, size = "default", variant = "outline", ...props }) => {
3566
- return /* @__PURE__ */ jsx(Questionnaire$1.Previous, {
3567
- "data-slot": "questionnaire-previous",
3568
- "data-size": size,
3569
- "data-variant": variant,
3570
- className: cn(buttonVariants({
3571
- size,
3572
- variant
3573
- }), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
3574
- ...props,
3575
- children: children ?? "Previous"
3576
- });
3577
- };
3578
- var QuestionnaireSkip = ({ children, className, size = "default", variant = "outline", ...props }) => {
3579
- return /* @__PURE__ */ jsx(Questionnaire$1.Skip, {
3580
- "data-slot": "questionnaire-skip",
3581
- "data-size": size,
3582
- "data-variant": variant,
3583
- className: cn(buttonVariants({
3584
- size,
3585
- variant
3586
- }), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3587
- ...props,
3588
- children: children ?? "Skip"
3589
- });
3590
- };
3591
- var QuestionnaireNext = ({ children, className, size = "default", variant = "default", ...props }) => {
3592
- return /* @__PURE__ */ jsx(Questionnaire$1.Next, {
3593
- "data-slot": "questionnaire-next",
3594
- "data-size": size,
3595
- "data-variant": variant,
3596
- className: cn(buttonVariants({
3597
- size,
3598
- variant
3599
- }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3600
- ...props,
3601
- children: children ?? "Next"
3602
- });
3603
- };
3604
- var QuestionnaireSubmit = ({ children, className, size = "default", variant = "default", ...props }) => {
3605
- return /* @__PURE__ */ jsx(Questionnaire$1.Submit, {
3606
- "data-slot": "questionnaire-submit",
3607
- "data-size": size,
3608
- "data-variant": variant,
3609
- className: cn(buttonVariants({
3610
- size,
3611
- variant
3612
- }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3613
- ...props,
3614
- children: children ?? "Submit"
3615
- });
3616
- };
3617
- //#endregion
3618
- //#region ../ui/src/components/ui/radio-group/radio-group.tsx
3619
- var RadioGroup = ({ className, orientation = "vertical", ...props }) => {
3620
- return /* @__PURE__ */ jsx(RadioGroup$1, {
3621
- "data-slot": "radio-group",
3622
- "data-orientation": orientation,
3623
- "aria-orientation": orientation,
3624
- className: cn("grid w-full gap-2 data-[orientation=horizontal]:flex data-[orientation=horizontal]:items-center", className),
3625
- ...props
3626
- });
3627
- };
3628
- var RadioGroupItem = ({ className, ...props }) => {
3629
- return /* @__PURE__ */ jsx(Radio.Root, {
3630
- "data-slot": "radio-group-item",
3631
- className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-full border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className),
3632
- ...props,
3633
- children: /* @__PURE__ */ jsx(Radio.Indicator, {
3634
- "data-slot": "radio-group-item-indicator",
3635
- className: "flex size-2 shrink-0 rounded-full bg-primary transition-none"
3636
- })
3637
- });
3638
- };
3639
- //#endregion
3640
- //#region ../ui/src/components/ui/resizable/resizable.tsx
3641
- var ResizablePanelGroup = ({ className, ...props }) => {
3642
- return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
3643
- "data-slot": "resizable-panel-group",
3644
- className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
3645
- ...props
3646
- });
3647
- };
3648
- var ResizablePanel = ({ ...props }) => {
3649
- return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
3650
- "data-slot": "resizable-panel",
3651
- ...props
3652
- });
3653
- };
3654
- var ResizableHandle = ({ withHandle, className, ...props }) => {
3655
- return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
3656
- "data-slot": "resizable-handle",
3657
- className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className),
3658
- ...props,
3659
- children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
3660
- });
3661
- };
3662
- //#endregion
3663
- //#region ../ui/src/components/ui/select/select.tsx
3664
- var Select = ({ ...props }) => {
3665
- return /* @__PURE__ */ jsx(Select$1.Root, {
3666
- "data-slot": "select",
3667
- ...props
3668
- });
3669
- };
3670
- var SelectTrigger = ({ className, size = "default", children, ...props }) => {
3671
- return /* @__PURE__ */ jsxs(Select$1.Trigger, {
3672
- "data-slot": "select-trigger",
3673
- className: cn("flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-transparent text-sm text-foreground transition-colors outline-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20", "data-popup-open:border-ring data-popup-open:ring-3 data-popup-open:ring-ring/50", "dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", size === "sm" ? "h-7 px-2.5 text-[0.8rem]" : "h-8 px-2.5", className),
3674
- ...props,
3675
- children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
3676
- "data-slot": "select-icon",
3677
- className: "shrink-0 text-muted-foreground",
3678
- children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
3679
- })]
3680
- });
3681
- };
3682
- var SelectValue = ({ className, ...props }) => {
3683
- return /* @__PURE__ */ jsx(Select$1.Value, {
3684
- "data-slot": "select-value",
3685
- className: cn("truncate data-placeholder:text-muted-foreground", className),
3686
- ...props
3687
- });
3688
- };
3689
- var SelectContent = ({ className, children, portalContainer, ...props }) => {
3690
- return /* @__PURE__ */ jsx(Select$1.Portal, {
3691
- container: portalContainer,
3692
- children: /* @__PURE__ */ jsx(Select$1.Positioner, {
3693
- "data-slot": "select-positioner",
3694
- sideOffset: 4,
3695
- align: "start",
3696
- alignItemWithTrigger: false,
3697
- children: /* @__PURE__ */ jsx(Select$1.Popup, {
3698
- "data-slot": "select-content",
3699
- className: cn("z-50 min-w-[var(--anchor-width)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity] motion-reduce:animate-none motion-reduce:transition-none data-open:scale-100 data-open:opacity-100 data-closed:scale-95 data-closed:opacity-0 data-open:animate-in data-closed:animate-out data-open:fade-in-0 data-closed:fade-out-0", className),
3700
- ...props,
3701
- children: /* @__PURE__ */ jsx(ScrollArea, {
3702
- type: "always",
3703
- fade: true,
3704
- fadeFrom: "popover",
3705
- className: "max-h-(--available-height)",
3706
- children: /* @__PURE__ */ jsx(Select$1.List, {
3707
- "data-slot": "select-list",
3708
- children
3709
- })
3710
- })
3711
- })
3712
- })
3713
- });
3714
- };
3715
- var SelectGroup = ({ className, ...props }) => {
3716
- return /* @__PURE__ */ jsx(Select$1.Group, {
3717
- "data-slot": "select-group",
3718
- className: cn("flex flex-col gap-0.5", className),
3719
- ...props
3720
- });
3721
- };
3722
- var SelectLabel = ({ className, ...props }) => {
3723
- return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
3724
- "data-slot": "select-label",
3725
- className: cn("px-2 py-1 text-xs font-semibold text-muted-foreground", className),
3726
- ...props
3727
- });
3728
- };
3729
- var SelectItem = ({ className, children, ...props }) => {
3730
- return /* @__PURE__ */ jsxs(Select$1.Item, {
3731
- "data-slot": "select-item",
3732
- className: cn(popupItemClass("base-ui", true), className),
3733
- ...props,
3734
- children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
3735
- "data-slot": "select-item-text",
3736
- children
3737
- }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
3738
- "data-slot": "select-item-indicator",
3739
- className: POPUP_ITEM_INDICATOR_CLASS,
3740
- children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
3741
- })]
3742
- });
3743
- };
3744
- var SelectSeparator = ({ className, ...props }) => {
3745
- return /* @__PURE__ */ jsx("div", {
3746
- "data-slot": "select-separator",
3747
- className: cn("-mx-1 my-1 h-px bg-border", className),
3748
- "aria-hidden": "true",
3749
- ...props
3750
- });
3751
- };
3752
- //#endregion
3753
- //#region ../ui/src/components/ui/sheet/sheet.tsx
3754
- var Sheet = ({ ...props }) => {
3755
- return /* @__PURE__ */ jsx(Dialog$1.Root, {
3756
- "data-slot": "sheet",
3757
- ...props
3758
- });
3759
- };
3760
- var SheetTrigger = ({ ...props }) => {
3761
- return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
3762
- "data-slot": "sheet-trigger",
3763
- ...props
3764
- });
3765
- };
3766
- var SheetClose = ({ ...props }) => {
3767
- return /* @__PURE__ */ jsx(Dialog$1.Close, {
3768
- "data-slot": "sheet-close",
3769
- ...props
3770
- });
3771
- };
3772
- var SheetPortal = ({ ...props }) => {
3773
- return /* @__PURE__ */ jsx(Dialog$1.Portal, {
3774
- "data-slot": "sheet-portal",
3775
- ...props
3776
- });
3777
- };
3778
- var SheetOverlay = ({ className, ...props }) => {
3779
- return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
3780
- "data-slot": "sheet-overlay",
3781
- className: cn("fixed inset-0 z-50 bg-overlay transition-opacity duration-150 motion-reduce:transition-none data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
3782
- ...props
3783
- });
3784
- };
3785
- var SheetContent = ({ className, children, side = "right", showCloseButton = true, ...props }) => {
3786
- return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
3787
- "data-slot": "sheet-content",
3788
- "data-side": side,
3789
- className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 motion-reduce:transition-none ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] 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=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] 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=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
3790
- ...props,
3791
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
3792
- "data-slot": "sheet-close",
3793
- render: /* @__PURE__ */ jsx(Button, {
3794
- variant: "ghost",
3795
- className: "absolute top-3 right-3",
3796
- size: "icon-sm"
3797
- }),
3798
- children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
3799
- className: "sr-only",
3800
- children: "Close"
3801
- })]
3802
- })]
3803
- })] });
3804
- };
3805
- var SheetHeader = ({ className, ...props }) => {
3806
- return /* @__PURE__ */ jsx("div", {
3807
- "data-slot": "sheet-header",
3808
- className: cn("flex flex-col gap-0.5 p-4", className),
3809
- ...props
3810
- });
3811
- };
3812
- var SheetFooter = ({ className, ...props }) => {
3813
- return /* @__PURE__ */ jsx("div", {
3814
- "data-slot": "sheet-footer",
3815
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
3816
- ...props
3817
- });
3818
- };
3819
- var SheetTitle = ({ className, ...props }) => {
3820
- return /* @__PURE__ */ jsx(Dialog$1.Title, {
3821
- "data-slot": "sheet-title",
3822
- className: cn("font-heading text-base font-medium text-foreground", className),
3823
- ...props
3824
- });
3825
- };
3826
- var SheetDescription = ({ className, ...props }) => {
3827
- return /* @__PURE__ */ jsx(Dialog$1.Description, {
3828
- "data-slot": "sheet-description",
3829
- className: cn("text-sm text-muted-foreground", className),
3830
- ...props
3831
- });
3832
- };
3833
- //#endregion
3834
- //#region ../ui/src/components/ui/skeleton/skeleton.tsx
3835
- var Skeleton = ({ className, ...props }) => {
3836
- return /* @__PURE__ */ jsx("div", {
3837
- "data-slot": "skeleton",
3838
- className: cn("animate-pulse rounded-md bg-muted motion-reduce:animate-none", className),
3839
- ...props
3840
- });
3841
- };
3842
- //#endregion
3843
- //#region ../ui/src/components/ui/sidebar/sidebar.tsx
3844
- var SIDEBAR_COOKIE_NAME = "sidebar_state";
3845
- var SIDEBAR_COOKIE_MAX_AGE = 604800;
3846
- var SIDEBAR_WIDTH = "16rem";
3847
- var SIDEBAR_WIDTH_MOBILE = "18rem";
3848
- var SIDEBAR_WIDTH_ICON = "3rem";
3849
- var SIDEBAR_KEYBOARD_SHORTCUT = "b";
3850
- var SidebarContext = React.createContext(null);
3851
- var useSidebar = () => {
3852
- const context = React.useContext(SidebarContext);
3853
- if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
3854
- return context;
3855
- };
3856
- var SidebarProvider = ({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) => {
3857
- const isMobile = useIsMobile();
3858
- const [openMobile, setOpenMobile] = React.useState(false);
3859
- const [_open, _setOpen] = React.useState(defaultOpen);
3860
- const open = openProp ?? _open;
3861
- const setOpen = React.useCallback((value) => {
3862
- const openState = typeof value === "function" ? value(open) : value;
3863
- if (setOpenProp) setOpenProp(openState);
3864
- else _setOpen(openState);
3865
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
3866
- }, [setOpenProp, open]);
3867
- const toggleSidebar = React.useCallback(() => {
3868
- return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
3869
- }, [isMobile, setOpen]);
3870
- React.useEffect(() => {
3871
- const handleKeyDown = (event) => {
3872
- if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
3873
- event.preventDefault();
3874
- toggleSidebar();
3875
- }
3876
- };
3877
- window.addEventListener("keydown", handleKeyDown);
3878
- return () => window.removeEventListener("keydown", handleKeyDown);
3879
- }, [toggleSidebar]);
3880
- const state = open ? "expanded" : "collapsed";
3881
- const contextValue = React.useMemo(() => ({
3882
- state,
3883
- open,
3884
- setOpen,
3885
- isMobile,
3886
- openMobile,
3887
- setOpenMobile,
3888
- toggleSidebar
3889
- }), [
3890
- state,
3891
- open,
3892
- setOpen,
3893
- isMobile,
3894
- openMobile,
3895
- toggleSidebar
3896
- ]);
3897
- return /* @__PURE__ */ jsx(SidebarContext.Provider, {
3898
- value: contextValue,
3899
- children: /* @__PURE__ */ jsx("div", {
3900
- "data-slot": "sidebar-wrapper",
3901
- style: {
3902
- "--sidebar-width": SIDEBAR_WIDTH,
3903
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
3904
- ...style
3905
- },
3906
- className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
3907
- ...props,
3908
- children
3909
- })
3910
- });
3911
- };
3912
- var Sidebar = ({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) => {
3913
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
3914
- if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
3915
- "data-slot": "sidebar",
3916
- className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
3917
- ...props,
3918
- children
3919
- });
3920
- if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
3921
- open: openMobile,
3922
- onOpenChange: setOpenMobile,
3923
- ...props,
3924
- children: /* @__PURE__ */ jsxs(SheetContent, {
3925
- dir,
3926
- "data-sidebar": "sidebar",
3927
- "data-slot": "sidebar",
3928
- "data-mobile": "true",
3929
- className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
3930
- style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
3931
- side,
3932
- children: [/* @__PURE__ */ jsxs(SheetHeader, {
3933
- className: "sr-only",
3934
- children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
3935
- }), /* @__PURE__ */ jsx("div", {
3936
- className: "flex h-full w-full flex-col",
3937
- children
3938
- })]
3939
- })
3940
- });
3941
- return /* @__PURE__ */ jsxs("div", {
3942
- className: "group peer hidden text-sidebar-foreground md:block",
3943
- "data-state": state,
3944
- "data-collapsible": state === "collapsed" ? collapsible : "",
3945
- "data-variant": variant,
3946
- "data-side": side,
3947
- "data-slot": "sidebar",
3948
- children: [/* @__PURE__ */ jsx("div", {
3949
- "data-slot": "sidebar-gap",
3950
- className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 motion-reduce:transition-none ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
3951
- }), /* @__PURE__ */ jsx("div", {
3952
- "data-slot": "sidebar-container",
3953
- "data-side": side,
3954
- className: cn("fixed inset-y-0 top-(--sidebar-top) z-10 hidden h-[calc(100svh-var(--sidebar-top))] w-(--sidebar-width) transition-[left,right,width] duration-200 motion-reduce:transition-none ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
3955
- ...props,
3956
- children: /* @__PURE__ */ jsx("div", {
3957
- "data-sidebar": "sidebar",
3958
- "data-slot": "sidebar-inner",
3959
- className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
3960
- children
3961
- })
3962
- })]
3963
- });
3964
- };
3965
- var SidebarTrigger = ({ className, onClick, ...props }) => {
3966
- const { toggleSidebar } = useSidebar();
3967
- return /* @__PURE__ */ jsxs(Button, {
3968
- "data-sidebar": "trigger",
3969
- "data-slot": "sidebar-trigger",
3970
- variant: "ghost",
3971
- size: "icon-sm",
3972
- className: cn(className),
3973
- onClick: (event) => {
3974
- onClick?.(event);
3975
- toggleSidebar();
3976
- },
3977
- ...props,
3978
- children: [/* @__PURE__ */ jsx(IconLayoutSidebar, {}), /* @__PURE__ */ jsx("span", {
3979
- className: "sr-only",
3980
- children: "Toggle Sidebar"
3981
- })]
3982
- });
3983
- };
3984
- var SidebarRail = ({ className, ...props }) => {
3985
- const { toggleSidebar } = useSidebar();
3986
- return /* @__PURE__ */ jsx("button", {
3987
- "data-sidebar": "rail",
3988
- "data-slot": "sidebar-rail",
3989
- "aria-label": "Toggle Sidebar",
3990
- tabIndex: -1,
3991
- onClick: toggleSidebar,
3992
- title: "Toggle Sidebar",
3993
- className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all motion-reduce:transition-none ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
3994
- ...props
3995
- });
3996
- };
3997
- var SidebarInset = ({ className, ...props }) => {
3998
- return /* @__PURE__ */ jsx("main", {
3999
- "data-slot": "sidebar-inset",
4000
- className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
4001
- ...props
4002
- });
4003
- };
4004
- var SidebarInput = ({ className, ...props }) => {
4005
- return /* @__PURE__ */ jsx(Input, {
4006
- "data-slot": "sidebar-input",
4007
- "data-sidebar": "input",
4008
- className: cn("h-8 w-full bg-background shadow-none", className),
4009
- ...props
4010
- });
4011
- };
4012
- var SidebarHeader = ({ className, ...props }) => {
4013
- return /* @__PURE__ */ jsx("div", {
4014
- "data-slot": "sidebar-header",
4015
- "data-sidebar": "header",
4016
- className: cn("flex flex-col gap-2 p-2", className),
4017
- ...props
4018
- });
4019
- };
4020
- var SidebarFooter = ({ className, ...props }) => {
4021
- return /* @__PURE__ */ jsx("div", {
4022
- "data-slot": "sidebar-footer",
4023
- "data-sidebar": "footer",
4024
- className: cn("flex flex-col gap-2 p-2", className),
4025
- ...props
4026
- });
4027
- };
4028
- var SidebarSeparator = ({ className, ...props }) => {
4029
- return /* @__PURE__ */ jsx(Separator, {
4030
- "data-slot": "sidebar-separator",
4031
- "data-sidebar": "separator",
4032
- className: cn("mx-2 w-auto bg-sidebar-border", className),
4033
- ...props
4034
- });
4035
- };
4036
- var SidebarContent = ({ className, ...props }) => {
4037
- return /* @__PURE__ */ jsx("div", {
4038
- "data-slot": "sidebar-content",
4039
- "data-sidebar": "content",
4040
- "data-focus": "inset",
4041
- className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
4042
- ...props
4043
- });
4044
- };
4045
- var SidebarGroup = ({ className, ...props }) => {
4046
- return /* @__PURE__ */ jsx("div", {
4047
- "data-slot": "sidebar-group",
4048
- "data-sidebar": "group",
4049
- className: cn("relative flex w-full min-w-0 flex-col p-2", className),
4050
- ...props
4051
- });
4052
- };
4053
- var SidebarGroupLabel = ({ className, render, ...props }) => {
4054
- return useRender({
4055
- defaultTagName: "div",
4056
- props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 motion-reduce:transition-none ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
4057
- render,
4058
- state: {
4059
- slot: "sidebar-group-label",
4060
- sidebar: "group-label"
4061
- }
4062
- });
4063
- };
4064
- var SidebarGroupAction = ({ className, render, ...props }) => {
4065
- return useRender({
4066
- defaultTagName: "button",
4067
- props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
4068
- render,
4069
- state: {
4070
- slot: "sidebar-group-action",
4071
- sidebar: "group-action"
4072
- }
4073
- });
4074
- };
4075
- var SidebarGroupContent = ({ className, ...props }) => {
4076
- return /* @__PURE__ */ jsx("div", {
4077
- "data-slot": "sidebar-group-content",
4078
- "data-sidebar": "group-content",
4079
- className: cn("w-full text-sm", className),
4080
- ...props
4081
- });
4082
- };
4083
- var SidebarMenu = ({ className, ...props }) => {
4084
- return /* @__PURE__ */ jsx("ul", {
4085
- "data-slot": "sidebar-menu",
4086
- "data-sidebar": "menu",
4087
- className: cn("flex w-full min-w-0 flex-col gap-0", className),
4088
- ...props
4089
- });
4090
- };
4091
- var SidebarMenuItem = ({ className, ...props }) => {
4092
- return /* @__PURE__ */ jsx("li", {
4093
- "data-slot": "sidebar-menu-item",
4094
- "data-sidebar": "menu-item",
4095
- className: cn("group/menu-item relative", className),
4096
- ...props
4097
- });
4098
- };
4099
- var sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] motion-reduce:transition-none group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
4100
- variants: {
4101
- variant: {
4102
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
4103
- outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
4104
- },
4105
- size: {
4106
- default: "h-8 text-sm",
4107
- sm: "h-7 text-xs",
4108
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
4109
- }
4110
- },
4111
- defaultVariants: {
4112
- variant: "default",
4113
- size: "default"
4114
- }
4115
- });
4116
- var SidebarMenuButton = ({ render, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) => {
4117
- const { isMobile, state } = useSidebar();
4118
- const comp = useRender({
4119
- defaultTagName: "button",
4120
- props: mergeProps({ className: cn(sidebarMenuButtonVariants({
4121
- variant,
4122
- size
4123
- }), className) }, props),
4124
- render: !tooltip ? render : /* @__PURE__ */ jsx(TooltipTrigger, { render }),
4125
- state: {
4126
- slot: "sidebar-menu-button",
4127
- sidebar: "menu-button",
4128
- size,
4129
- active: isActive
4130
- }
4131
- });
4132
- if (!tooltip) return comp;
4133
- if (typeof tooltip === "string") tooltip = { children: tooltip };
4134
- return /* @__PURE__ */ jsxs(Tooltip, { children: [comp, /* @__PURE__ */ jsx(TooltipContent, {
4135
- side: "right",
4136
- align: "center",
4137
- hidden: state !== "collapsed" || isMobile,
4138
- ...tooltip
4139
- })] });
4140
- };
4141
- var SidebarMenuAction = ({ className, render, showOnHover = false, ...props }) => {
4142
- return useRender({
4143
- defaultTagName: "button",
4144
- props: mergeProps({ className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className) }, props),
4145
- render,
4146
- state: {
4147
- slot: "sidebar-menu-action",
4148
- sidebar: "menu-action"
4149
- }
4150
- });
4151
- };
4152
- var SidebarMenuBadge = ({ className, ...props }) => {
4153
- return /* @__PURE__ */ jsx("div", {
4154
- "data-slot": "sidebar-menu-badge",
4155
- "data-sidebar": "menu-badge",
4156
- className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
4157
- ...props
4158
- });
4159
- };
4160
- var SidebarMenuSkeleton = ({ className, showIcon = false, ...props }) => {
4161
- const [width] = React.useState(() => {
4162
- return `${Math.floor(Math.random() * 40) + 50}%`;
4163
- });
4164
- return /* @__PURE__ */ jsxs("div", {
4165
- "data-slot": "sidebar-menu-skeleton",
4166
- "data-sidebar": "menu-skeleton",
4167
- className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
4168
- ...props,
4169
- children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
4170
- className: "size-4 rounded-md",
4171
- "data-sidebar": "menu-skeleton-icon"
4172
- }), /* @__PURE__ */ jsx(Skeleton, {
4173
- className: "h-4 max-w-(--skeleton-width) flex-1",
4174
- "data-sidebar": "menu-skeleton-text",
4175
- style: { "--skeleton-width": width }
4176
- })]
4177
- });
4178
- };
4179
- var SidebarMenuSub = ({ className, ...props }) => {
4180
- return /* @__PURE__ */ jsx("ul", {
4181
- "data-slot": "sidebar-menu-sub",
4182
- "data-sidebar": "menu-sub",
4183
- className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
4184
- ...props
4185
- });
4186
- };
4187
- var SidebarMenuSubItem = ({ className, ...props }) => {
4188
- return /* @__PURE__ */ jsx("li", {
4189
- "data-slot": "sidebar-menu-sub-item",
4190
- "data-sidebar": "menu-sub-item",
4191
- className: cn("group/menu-sub-item relative", className),
4192
- ...props
4193
- });
4194
- };
4195
- var SidebarMenuSubButton = ({ render, size = "md", isActive = false, className, ...props }) => {
4196
- return useRender({
4197
- defaultTagName: "a",
4198
- props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className) }, props),
4199
- render,
4200
- state: {
4201
- slot: "sidebar-menu-sub-button",
4202
- sidebar: "menu-sub-button",
4203
- size,
4204
- active: isActive
4205
- }
4206
- });
4207
- };
4208
- //#endregion
4209
- //#region ../ui/src/components/ui/spinner/spinner.tsx
4210
- var spinnerVariants = cva("animate-spin motion-reduce:animate-none", {
4211
- variants: { size: {
4212
- xs: "size-3",
4213
- sm: "size-4",
4214
- default: "size-5",
4215
- lg: "size-6",
4216
- xl: "size-8"
4217
- } },
4218
- defaultVariants: { size: "default" }
4219
- });
4220
- var Spinner = ({ className, size = "default", ...props }) => {
4221
- return /* @__PURE__ */ jsx(IconLoader, {
4222
- "data-slot": "spinner",
4223
- role: "status",
4224
- "aria-label": "Loading",
4225
- className: cn(spinnerVariants({ size }), className),
4226
- ...props
4227
- });
4228
- };
4229
- //#endregion
4230
- //#region ../ui/src/components/ui/switch/switch.tsx
4231
- var Switch = ({ className, size = "default", ...props }) => {
4232
- return /* @__PURE__ */ jsx(Switch$1.Root, {
4233
- "data-slot": "switch",
4234
- "data-size": size,
4235
- className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all motion-reduce:transition-none outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
4236
- ...props,
4237
- children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
4238
- "data-slot": "switch-thumb",
4239
- className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform motion-reduce:transition-none group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
4240
- })
4241
- });
4242
- };
4243
- //#endregion
4244
- //#region ../ui/src/components/ui/table/table.tsx
4245
- var Table = ({ className, containerClassName, ...props }) => {
4246
- return /* @__PURE__ */ jsx("div", {
4247
- "data-slot": "table-container",
4248
- "data-focus": "inset",
4249
- className: cn("relative w-full overflow-x-auto", containerClassName),
4250
- children: /* @__PURE__ */ jsx("table", {
4251
- "data-slot": "table",
4252
- className: cn("w-full caption-bottom text-sm", className),
4253
- ...props
4254
- })
4255
- });
4256
- };
4257
- var TableHeader = ({ className, ...props }) => {
4258
- return /* @__PURE__ */ jsx("thead", {
4259
- "data-slot": "table-header",
4260
- className: cn("[&_tr]:border-b", className),
4261
- ...props
4262
- });
4263
- };
4264
- var TableBody = ({ className, ...props }) => {
4265
- return /* @__PURE__ */ jsx("tbody", {
4266
- "data-slot": "table-body",
4267
- className: cn("[&_tr:last-child]:border-0", className),
4268
- ...props
4269
- });
4270
- };
4271
- var TableFooter = ({ className, ...props }) => {
4272
- return /* @__PURE__ */ jsx("tfoot", {
4273
- "data-slot": "table-footer",
4274
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
4275
- ...props
4276
- });
4277
- };
4278
- var TableRow = ({ className, ...props }) => {
4279
- return /* @__PURE__ */ jsx("tr", {
4280
- "data-slot": "table-row",
4281
- className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
4282
- ...props
4283
- });
4284
- };
4285
- var TableHead = ({ className, ...props }) => {
4286
- return /* @__PURE__ */ jsx("th", {
4287
- "data-slot": "table-head",
4288
- className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
4289
- ...props
4290
- });
4291
- };
4292
- var TableCell = ({ className, ...props }) => {
4293
- return /* @__PURE__ */ jsx("td", {
4294
- "data-slot": "table-cell",
4295
- className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
4296
- ...props
4297
- });
4298
- };
4299
- var TableCaption = ({ className, ...props }) => {
4300
- return /* @__PURE__ */ jsx("caption", {
4301
- "data-slot": "table-caption",
4302
- className: cn("mt-4 text-sm text-muted-foreground", className),
4303
- ...props
4304
- });
4305
- };
4306
- //#endregion
4307
- //#region ../ui/src/components/ui/tabs/tabs.tsx
4308
- var Tabs = ({ value, defaultValue, onValueChange, className, orientation = "horizontal", children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.Root, {
4309
- "data-slot": "tabs",
4310
- ...props,
4311
- "data-orientation": orientation,
4312
- value,
4313
- defaultValue,
4314
- orientation,
4315
- onValueChange: (next) => {
4316
- onValueChange?.(String(next));
4317
- },
4318
- className: cn("group/tabs flex w-full gap-2 data-[orientation=horizontal]:flex-col", className),
4319
- children
4320
- });
4321
- var tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", {
4322
- variants: { variant: {
4323
- default: "bg-muted",
4324
- line: "gap-1 bg-transparent"
4325
- } },
4326
- defaultVariants: { variant: "default" }
4327
- });
4328
- var TabsList = ({ className, variant = "default", children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.List, {
4329
- "data-slot": "tabs-list",
4330
- ...props,
4331
- "data-variant": variant,
4332
- className: cn(tabsListVariants({ variant }), className),
4333
- children
4334
- });
4335
- var TabsTrigger = ({ value, disabled, className, children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.Tab, {
4336
- ...props,
4337
- value,
4338
- disabled,
4339
- className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
4340
- children
4341
- });
4342
- var TabsContent = ({ value, keepMounted = false, className, children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.Panel, {
4343
- ...props,
4344
- value,
4345
- keepMounted,
4346
- className: cn("flex-1 text-sm outline-none", className),
4347
- children
4348
- });
4349
- //#endregion
4350
- //#region ../ui/src/components/ui/toast/toast.tsx
4351
- var toast = Toast$1.createToastManager();
4352
- var ToastProvider = ({ ...props }) => {
4353
- return /* @__PURE__ */ jsx(Toast$1.Provider, { ...props });
4354
- };
4355
- var ToastPortal = ({ ...props }) => {
4356
- return /* @__PURE__ */ jsx(Toast$1.Portal, {
4357
- "data-slot": "toast-portal",
4358
- ...props
4359
- });
4360
- };
4361
- var ToastViewport = ({ className, ...props }) => {
4362
- return /* @__PURE__ */ jsx(Toast$1.Viewport, {
4363
- "data-slot": "toast-viewport",
4364
- className: cn("pointer-events-none fixed inset-x-4 bottom-4 z-50 mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full", className),
4365
- ...props
4366
- });
4367
- };
4368
- var Toast = ({ className, ...props }) => {
4369
- return /* @__PURE__ */ jsx(Toast$1.Root, {
4370
- "data-slot": "toast",
4371
- className: cn("group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]", "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms] motion-reduce:transition-none", "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']", "data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]", "data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]", "data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", "data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", className),
4372
- ...props
4373
- });
4374
- };
4375
- var ToastContent = ({ className, ...props }) => {
4376
- return /* @__PURE__ */ jsx(Toast$1.Content, {
4377
- "data-slot": "toast-content",
4378
- className: cn("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-behind:opacity-0 data-expanded:opacity-100", className),
4379
- ...props
4380
- });
4381
- };
4382
- var ToastTitle = ({ className, ...props }) => {
4383
- return /* @__PURE__ */ jsx(Toast$1.Title, {
4384
- "data-slot": "toast-title",
4385
- className: cn("text-sm font-medium", className),
4386
- ...props
4387
- });
4388
- };
4389
- var ToastDescription = ({ className, ...props }) => {
4390
- return /* @__PURE__ */ jsx(Toast$1.Description, {
4391
- "data-slot": "toast-description",
4392
- className: cn("text-sm text-muted-foreground", className),
4393
- ...props
4394
- });
4395
- };
4396
- var ToastAction = ({ className, render = /* @__PURE__ */ jsx(Button, {
4397
- variant: "outline",
4398
- size: "sm"
4399
- }), ...props }) => {
4400
- return /* @__PURE__ */ jsx(Toast$1.Action, {
4401
- "data-slot": "toast-action",
4402
- render,
4403
- className: cn("shrink-0", className),
4404
- ...props
4405
- });
4406
- };
4407
- var ToastClose = ({ className, children, render = /* @__PURE__ */ jsx(Button, {
4408
- variant: "ghost",
4409
- size: "icon-sm"
4410
- }), ...props }) => {
4411
- return /* @__PURE__ */ jsx(Toast$1.Close, {
4412
- "data-slot": "toast-close",
4413
- "aria-label": "Close toast",
4414
- render,
4415
- className: cn("relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground", className),
4416
- ...props,
4417
- children: children ?? /* @__PURE__ */ jsx(IconX, { "aria-hidden": "true" })
4418
- });
4419
- };
4420
- var ToastIcon = ({ type }) => {
4421
- let icon = null;
4422
- if (type === "success") icon = /* @__PURE__ */ jsx(IconCircleCheck, { "aria-hidden": "true" });
4423
- if (type === "info") icon = /* @__PURE__ */ jsx(IconInfoCircle, { "aria-hidden": "true" });
4424
- if (type === "warning") icon = /* @__PURE__ */ jsx(IconAlertTriangle, { "aria-hidden": "true" });
4425
- if (type === "error") icon = /* @__PURE__ */ jsx(IconAlertOctagon, {
4426
- className: "text-destructive",
4427
- "aria-hidden": "true"
4428
- });
4429
- if (type === "loading") icon = /* @__PURE__ */ jsx(IconLoader, {
4430
- className: "animate-spin motion-reduce:animate-none",
4431
- "aria-hidden": "true"
4432
- });
4433
- if (!icon) return null;
4434
- return /* @__PURE__ */ jsx("span", {
4435
- "data-slot": "toast-icon",
4436
- className: "shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
4437
- children: icon
4438
- });
4439
- };
4440
- var ToastList = () => {
4441
- const { toasts } = Toast$1.useToastManager();
4442
- return toasts.map((toastItem) => /* @__PURE__ */ jsx(Toast, {
4443
- toast: toastItem,
4444
- children: /* @__PURE__ */ jsxs(ToastContent, { children: [
4445
- /* @__PURE__ */ jsx(ToastIcon, { type: toastItem.type }),
4446
- /* @__PURE__ */ jsxs("div", {
4447
- className: "flex min-w-0 flex-1 flex-col gap-1",
4448
- children: [/* @__PURE__ */ jsx(ToastTitle, {}), /* @__PURE__ */ jsx(ToastDescription, {})]
4449
- }),
4450
- /* @__PURE__ */ jsx(ToastAction, {}),
4451
- /* @__PURE__ */ jsx(ToastClose, {})
4452
- ] })
4453
- }, toastItem.id));
4454
- };
4455
- var Toaster = ({ children, toastManager = toast, ...props }) => {
4456
- return /* @__PURE__ */ jsxs(ToastProvider, {
4457
- toastManager,
4458
- ...props,
4459
- children: [children, /* @__PURE__ */ jsx(ToastPortal, { children: /* @__PURE__ */ jsx(ToastViewport, { children: /* @__PURE__ */ jsx(ToastList, {}) }) })]
4460
- });
4461
- };
4462
- var createToastManager = Toast$1.createToastManager;
4463
- var useToastManager = Toast$1.useToastManager;
4464
- //#endregion
4465
- //#region ../ui/src/components/ui/toggle-group/toggle-group.tsx
4466
- var ToggleGroupContext = createContext({
4467
- variant: "default",
4468
- size: "default",
4469
- spacing: 2,
4470
- orientation: "horizontal"
4471
- });
4472
- var ToggleGroup = ({ className, variant = "default", size = "default", spacing = 2, orientation = "horizontal", children, ...props }) => {
4473
- return /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
4474
- value: {
4475
- variant,
4476
- size,
4477
- spacing,
4478
- orientation
4479
- },
4480
- children: /* @__PURE__ */ jsx(ToggleGroup$1, {
4481
- "data-slot": "toggle-group",
4482
- "data-variant": variant,
4483
- "data-size": size,
4484
- "data-spacing": spacing,
4485
- "data-orientation": orientation,
4486
- orientation,
4487
- "aria-orientation": void 0,
4488
- style: { gap: `calc(var(--spacing) * ${spacing})` },
4489
- className: cn("group/toggle-group flex w-fit flex-row items-center rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", className),
4490
- ...props,
4491
- children
4492
- })
4493
- });
4494
- };
4495
- var ToggleGroupItem = ({ className, variant, size, ...props }) => {
4496
- const ctx = useContext(ToggleGroupContext);
4497
- const resolvedVariant = variant ?? ctx.variant ?? "default";
4498
- const resolvedSize = size ?? ctx.size ?? "default";
4499
- return /* @__PURE__ */ jsx(Toggle$1, {
4500
- "data-slot": "toggle-group-item",
4501
- "data-variant": resolvedVariant,
4502
- "data-size": resolvedSize,
4503
- "data-spacing": ctx.spacing,
4504
- className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
4505
- variant: resolvedVariant,
4506
- size: resolvedSize
4507
- }), className),
4508
- ...props
4509
- });
4510
- };
4511
- //#endregion
1
+ import { AnimatedNumber, NumberText, formatCount, useAnimatedValues } from "./ui/src/components/edyn/animated-number/animated-number.js";
2
+ import { cn } from "./ui/src/lib/utils.js";
3
+ import { Button, buttonVariants } from "./ui/src/components/ui/button/button.js";
4
+ import { Slider } from "./ui/src/components/ui/slider/slider.js";
5
+ import { formatMediaTime, useMediaPlayer } from "./ui/src/hooks/use-media-player.js";
6
+ import { AudioPlayer } from "./ui/src/components/edyn/audio-player/audio-player.js";
7
+ import { Calendar, CalendarDayButton } from "./ui/src/components/ui/calendar/calendar.js";
8
+ import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "./ui/src/components/ui/popover/popover.js";
9
+ import { useIsMobile } from "./ui/src/hooks/use-mobile.js";
10
+ import { DateRangePicker, dateToDay, dayToDate } from "./ui/src/components/edyn/date-range-picker/date-range-picker.js";
11
+ import { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "./ui/src/components/ui/avatar/avatar.js";
12
+ import { AVATAR_TONES, InitialsAvatar, avatarTone, initialsOf } from "./ui/src/components/edyn/initials-avatar/initials-avatar.js";
13
+ import { useMergedRefs } from "./ui/src/hooks/use-merged-refs.js";
14
+ import { ScrollArea, ScrollBar } from "./ui/src/components/ui/scroll-area/scroll-area.js";
15
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/src/components/ui/tooltip/tooltip.js";
16
+ import { DEFAULT_MULTI_SELECT_LABELS, MultiSelect, VIRTUALIZE_FROM, fullSelection, resolveChosen, summarize } from "./ui/src/components/edyn/multi-select/multi-select.js";
17
+ import { PROGRESS_LINE_COLOR, ProgressLine } from "./ui/src/components/edyn/progress-line/progress-line.js";
18
+ import { RICH_TEXT_ATTRIBUTES, RICH_TEXT_ELEMENTS, RICH_TEXT_LINK_PROTOCOLS, isAllowedRichTextHref } from "./ui/src/components/edyn/rich-text-content/allow-list.js";
19
+ import { RICH_TEXT_BODY_CLASS, RICH_TEXT_MENTION_CLASS, RichTextContent, richTextToNodes } from "./ui/src/components/edyn/rich-text-content/rich-text-content.js";
20
+ import { VideoPlayer } from "./ui/src/components/edyn/video-player/video-player.js";
21
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./ui/src/components/ui/accordion/accordion.js";
22
+ import { Alert, AlertAction, AlertDescription, AlertTitle } from "./ui/src/components/ui/alert/alert.js";
23
+ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./ui/src/components/ui/alert-dialog/alert-dialog.js";
24
+ import { AspectRatio } from "./ui/src/components/ui/aspect-ratio/aspect-ratio.js";
25
+ import { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger } from "./ui/src/components/ui/attachment/attachment.js";
26
+ import { Badge, badgeVariants } from "./ui/src/components/ui/badge/badge.js";
27
+ import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./ui/src/components/ui/breadcrumb/breadcrumb.js";
28
+ import { Bubble, BubbleContent, BubbleGroup, BubbleReactions } from "./ui/src/components/ui/bubble/bubble.js";
29
+ import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from "./ui/src/components/ui/button-group/button-group.js";
30
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./ui/src/components/ui/card/card.js";
31
+ import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel } from "./ui/src/components/ui/carousel/carousel.js";
32
+ import { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from "./ui/src/components/ui/chart/chart.js";
33
+ import { Checkbox } from "./ui/src/components/ui/checkbox/checkbox.js";
34
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/src/components/ui/collapsible/collapsible.js";
35
+ import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem } from "./ui/src/components/ui/combobox/combobox.js";
36
+ import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./ui/src/components/ui/dialog/dialog.js";
37
+ import { Input } from "./ui/src/components/ui/input/input.js";
38
+ import { Textarea } from "./ui/src/components/ui/textarea/textarea.js";
39
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "./ui/src/components/ui/input-group/input-group.js";
40
+ import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./ui/src/components/ui/command/command.js";
41
+ import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./ui/src/components/ui/context-menu/context-menu.js";
42
+ import { DirectionProvider, useDirection } from "./ui/src/components/ui/direction/direction.js";
43
+ import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from "./ui/src/components/ui/drawer/drawer.js";
44
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./ui/src/components/ui/dropdown-menu/dropdown-menu.js";
45
+ import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./ui/src/components/ui/empty/empty.js";
46
+ import { Field, FieldDescription, FieldError, FieldLabel } from "./ui/src/components/ui/field/field.js";
47
+ import { HoverCard, HoverCardContent, HoverCardTrigger } from "./ui/src/components/ui/hover-card/hover-card.js";
48
+ import { Indicator, indicatorVariants } from "./ui/src/components/ui/indicator/indicator.js";
49
+ import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "./ui/src/components/ui/input-otp/input-otp.js";
50
+ import { Separator } from "./ui/src/components/ui/separator/separator.js";
51
+ import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./ui/src/components/ui/item/item.js";
52
+ import { Kbd, KbdGroup } from "./ui/src/components/ui/kbd/kbd.js";
53
+ import { Label } from "./ui/src/components/ui/label/label.js";
54
+ import { Marker, MarkerContent, MarkerIcon, markerVariants } from "./ui/src/components/ui/marker/marker.js";
55
+ import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./ui/src/components/ui/menubar/menubar.js";
56
+ import { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader } from "./ui/src/components/ui/message/message.js";
57
+ import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "./ui/src/components/ui/message-scroller/message-scroller.js";
58
+ import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./ui/src/components/ui/native-select/native-select.js";
59
+ import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle } from "./ui/src/components/ui/navigation-menu/navigation-menu.js";
60
+ import { Pagination, clampPage, getPaginationRange } from "./ui/src/components/ui/pagination/pagination.js";
61
+ import { PROGRESS_DURATION, PROGRESS_EASE, Progress, progressFill, progressTrack } from "./ui/src/components/ui/progress/progress.js";
62
+ import { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle } from "./ui/src/components/ui/questionnaire/questionnaire.js";
63
+ import { RadioGroup, RadioGroupItem } from "./ui/src/components/ui/radio-group/radio-group.js";
64
+ import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./ui/src/components/ui/resizable/resizable.js";
65
+ import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from "./ui/src/components/ui/select/select.js";
66
+ import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./ui/src/components/ui/sheet/sheet.js";
67
+ import { Skeleton } from "./ui/src/components/ui/skeleton/skeleton.js";
68
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./ui/src/components/ui/sidebar/sidebar.js";
69
+ import { Spinner, spinnerVariants } from "./ui/src/components/ui/spinner/spinner.js";
70
+ import { Switch } from "./ui/src/components/ui/switch/switch.js";
71
+ import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./ui/src/components/ui/table/table.js";
72
+ import { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants } from "./ui/src/components/ui/tabs/tabs.js";
73
+ import { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, createToastManager, toast, useToastManager } from "./ui/src/components/ui/toast/toast.js";
74
+ import { Toggle, toggleVariants } from "./ui/src/components/ui/toggle/toggle.js";
75
+ import { ToggleGroup, ToggleGroupItem } from "./ui/src/components/ui/toggle-group/toggle-group.js";
4512
76
  export { AVATAR_TONES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnimatedNumber, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AudioPlayer, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_MULTI_SELECT_LABELS, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldDescription, FieldError, FieldLabel, HoverCard, HoverCardContent, HoverCardTrigger, Indicator, InitialsAvatar, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MultiSelect, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, NumberText, PROGRESS_DURATION, PROGRESS_EASE, PROGRESS_LINE_COLOR, Pagination, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressLine, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RICH_TEXT_ATTRIBUTES, RICH_TEXT_BODY_CLASS, RICH_TEXT_ELEMENTS, RICH_TEXT_LINK_PROTOCOLS, RICH_TEXT_MENTION_CLASS, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextContent, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VIRTUALIZE_FROM, VideoPlayer, avatarTone, badgeVariants, buttonVariants, clampPage, cn, createToastManager, dateToDay, dayToDate, formatCount, formatMediaTime, fullSelection, getPaginationRange, indicatorVariants, initialsOf, isAllowedRichTextHref, markerVariants, navigationMenuTriggerStyle, progressFill, progressTrack, resolveChosen, richTextToNodes, spinnerVariants, summarize, tabsListVariants, toast, toggleVariants, useAnimatedValues, useCarousel, useDirection, useIsMobile, useMediaPlayer, useMergedRefs, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useToastManager };
4513
-
4514
- //# sourceMappingURL=index.js.map