@moldable-ai/ui 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/components/chat/chat-input.d.ts.map +1 -1
  2. package/dist/components/chat/chat-input.js +8 -6
  3. package/dist/components/chat/chat-panel.d.ts +5 -1
  4. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  5. package/dist/components/chat/chat-panel.js +6 -2
  6. package/dist/components/chat/markdown.d.ts +9 -0
  7. package/dist/components/chat/markdown.d.ts.map +1 -0
  8. package/dist/components/chat/markdown.js +47 -0
  9. package/dist/components/chat/tool-handlers.d.ts.map +1 -1
  10. package/dist/components/chat/tool-handlers.js +21 -51
  11. package/dist/components/ui/accordion.d.ts +8 -0
  12. package/dist/components/ui/accordion.d.ts.map +1 -0
  13. package/dist/components/ui/accordion.js +17 -0
  14. package/dist/components/ui/alert-dialog.d.ts +4 -4
  15. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  16. package/dist/components/ui/alert-dialog.js +10 -10
  17. package/dist/components/ui/alert.d.ts +10 -0
  18. package/dist/components/ui/alert.d.ts.map +1 -0
  19. package/dist/components/ui/alert.js +24 -0
  20. package/dist/components/ui/aspect-ratio.d.ts +4 -0
  21. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  22. package/dist/components/ui/aspect-ratio.js +7 -0
  23. package/dist/components/ui/avatar.d.ts +7 -0
  24. package/dist/components/ui/avatar.d.ts.map +1 -0
  25. package/dist/components/ui/avatar.js +13 -0
  26. package/dist/components/ui/badge.d.ts +3 -3
  27. package/dist/components/ui/badge.d.ts.map +1 -1
  28. package/dist/components/ui/badge.js +10 -10
  29. package/dist/components/ui/breadcrumb.d.ts +12 -0
  30. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  31. package/dist/components/ui/breadcrumb.js +27 -0
  32. package/dist/components/ui/button-group.d.ts +12 -0
  33. package/dist/components/ui/button-group.d.ts.map +1 -0
  34. package/dist/components/ui/button-group.js +27 -0
  35. package/dist/components/ui/button.d.ts +4 -5
  36. package/dist/components/ui/button.d.ts.map +1 -1
  37. package/dist/components/ui/button.js +22 -24
  38. package/dist/components/ui/calendar.d.ts +9 -0
  39. package/dist/components/ui/calendar.d.ts.map +1 -0
  40. package/dist/components/ui/calendar.js +76 -0
  41. package/dist/components/ui/card.d.ts +9 -8
  42. package/dist/components/ui/card.d.ts.map +1 -1
  43. package/dist/components/ui/card.js +23 -15
  44. package/dist/components/ui/carousel.d.ts +20 -0
  45. package/dist/components/ui/carousel.d.ts.map +1 -0
  46. package/dist/components/ui/carousel.js +90 -0
  47. package/dist/components/ui/chart.d.ts +41 -0
  48. package/dist/components/ui/chart.d.ts.map +1 -0
  49. package/dist/components/ui/chart.js +132 -0
  50. package/dist/components/ui/checkbox.d.ts +2 -2
  51. package/dist/components/ui/checkbox.d.ts.map +1 -1
  52. package/dist/components/ui/checkbox.js +5 -5
  53. package/dist/components/ui/collapsible.d.ts +4 -4
  54. package/dist/components/ui/collapsible.d.ts.map +1 -1
  55. package/dist/components/ui/collapsible.js +11 -4
  56. package/dist/components/ui/command.d.ts +17 -17
  57. package/dist/components/ui/command.d.ts.map +1 -1
  58. package/dist/components/ui/command.js +31 -27
  59. package/dist/components/ui/context-menu.d.ts +26 -0
  60. package/dist/components/ui/context-menu.d.ts.map +1 -0
  61. package/dist/components/ui/context-menu.js +51 -0
  62. package/dist/components/ui/dialog.d.ts +15 -19
  63. package/dist/components/ui/dialog.d.ts.map +1 -1
  64. package/dist/components/ui/dialog.js +34 -22
  65. package/dist/components/ui/drawer.d.ts +14 -0
  66. package/dist/components/ui/drawer.d.ts.map +1 -0
  67. package/dist/components/ui/drawer.js +35 -0
  68. package/dist/components/ui/dropdown-menu.d.ts +4 -4
  69. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  70. package/dist/components/ui/dropdown-menu.js +13 -14
  71. package/dist/components/ui/empty.d.ts +12 -0
  72. package/dist/components/ui/empty.d.ts.map +1 -0
  73. package/dist/components/ui/empty.js +33 -0
  74. package/dist/components/ui/field.d.ts +25 -0
  75. package/dist/components/ui/field.d.ts.map +1 -0
  76. package/dist/components/ui/field.js +75 -0
  77. package/dist/components/ui/form.d.ts +25 -0
  78. package/dist/components/ui/form.d.ts.map +1 -0
  79. package/dist/components/ui/form.js +59 -0
  80. package/dist/components/ui/hover-card.d.ts +7 -0
  81. package/dist/components/ui/hover-card.d.ts.map +1 -0
  82. package/dist/components/ui/hover-card.js +14 -0
  83. package/dist/components/ui/index.d.ts +35 -0
  84. package/dist/components/ui/index.d.ts.map +1 -1
  85. package/dist/components/ui/index.js +35 -0
  86. package/dist/components/ui/input-group.d.ts +17 -0
  87. package/dist/components/ui/input-group.d.ts.map +1 -0
  88. package/dist/components/ui/input-group.js +63 -0
  89. package/dist/components/ui/input-otp.d.ts +12 -0
  90. package/dist/components/ui/input-otp.d.ts.map +1 -0
  91. package/dist/components/ui/input-otp.js +20 -0
  92. package/dist/components/ui/input.d.ts +2 -3
  93. package/dist/components/ui/input.d.ts.map +1 -1
  94. package/dist/components/ui/input.js +4 -6
  95. package/dist/components/ui/item.d.ts +24 -0
  96. package/dist/components/ui/item.d.ts.map +1 -0
  97. package/dist/components/ui/item.js +66 -0
  98. package/dist/components/ui/kbd.d.ts +4 -0
  99. package/dist/components/ui/kbd.d.ts.map +1 -0
  100. package/dist/components/ui/kbd.js +9 -0
  101. package/dist/components/ui/label.d.ts +3 -3
  102. package/dist/components/ui/label.d.ts.map +1 -1
  103. package/dist/components/ui/label.js +6 -6
  104. package/dist/components/ui/menubar.d.ts +27 -0
  105. package/dist/components/ui/menubar.d.ts.map +1 -0
  106. package/dist/components/ui/menubar.js +53 -0
  107. package/dist/components/ui/navigation-menu.d.ts +15 -0
  108. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  109. package/dist/components/ui/navigation-menu.js +31 -0
  110. package/dist/components/ui/pagination.d.ts +14 -0
  111. package/dist/components/ui/pagination.d.ts.map +1 -0
  112. package/dist/components/ui/pagination.js +29 -0
  113. package/dist/components/ui/popover.d.ts +2 -2
  114. package/dist/components/ui/popover.d.ts.map +1 -1
  115. package/dist/components/ui/popover.js +5 -4
  116. package/dist/components/ui/progress.d.ts +5 -0
  117. package/dist/components/ui/progress.d.ts.map +1 -0
  118. package/dist/components/ui/progress.js +7 -0
  119. package/dist/components/ui/radio-group.d.ts +6 -0
  120. package/dist/components/ui/radio-group.d.ts.map +1 -0
  121. package/dist/components/ui/radio-group.js +12 -0
  122. package/dist/components/ui/resizable.d.ts +8 -0
  123. package/dist/components/ui/resizable.d.ts.map +1 -0
  124. package/dist/components/ui/resizable.js +14 -0
  125. package/dist/components/ui/scroll-area.d.ts +4 -4
  126. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  127. package/dist/components/ui/scroll-area.js +11 -9
  128. package/dist/components/ui/select.d.ts +15 -13
  129. package/dist/components/ui/select.d.ts.map +1 -1
  130. package/dist/components/ui/select.js +36 -25
  131. package/dist/components/ui/separator.d.ts +5 -0
  132. package/dist/components/ui/separator.d.ts.map +1 -0
  133. package/dist/components/ui/separator.js +8 -0
  134. package/dist/components/ui/sheet.d.ts +14 -0
  135. package/dist/components/ui/sheet.d.ts.map +1 -0
  136. package/dist/components/ui/sheet.js +39 -0
  137. package/dist/components/ui/sidebar.d.ts +70 -0
  138. package/dist/components/ui/sidebar.d.ts.map +1 -0
  139. package/dist/components/ui/sidebar.js +212 -0
  140. package/dist/components/ui/skeleton.d.ts +3 -0
  141. package/dist/components/ui/skeleton.d.ts.map +1 -0
  142. package/dist/components/ui/skeleton.js +6 -0
  143. package/dist/components/ui/slider.d.ts +5 -0
  144. package/dist/components/ui/slider.d.ts.map +1 -0
  145. package/dist/components/ui/slider.js +14 -0
  146. package/dist/components/ui/sonner.d.ts +4 -0
  147. package/dist/components/ui/sonner.d.ts.map +1 -0
  148. package/dist/components/ui/sonner.js +20 -0
  149. package/dist/components/ui/spinner.d.ts +3 -0
  150. package/dist/components/ui/spinner.d.ts.map +1 -0
  151. package/dist/components/ui/spinner.js +7 -0
  152. package/dist/components/ui/switch.d.ts +3 -3
  153. package/dist/components/ui/switch.d.ts.map +1 -1
  154. package/dist/components/ui/switch.js +6 -6
  155. package/dist/components/ui/table.d.ts +11 -0
  156. package/dist/components/ui/table.d.ts.map +1 -0
  157. package/dist/components/ui/table.js +27 -0
  158. package/dist/components/ui/tabs.d.ts +2 -2
  159. package/dist/components/ui/tabs.d.ts.map +1 -1
  160. package/dist/components/ui/tabs.js +7 -6
  161. package/dist/components/ui/textarea.d.ts +2 -3
  162. package/dist/components/ui/textarea.d.ts.map +1 -1
  163. package/dist/components/ui/textarea.js +4 -6
  164. package/dist/components/ui/toggle-group.d.ts +10 -0
  165. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  166. package/dist/components/ui/toggle-group.js +21 -0
  167. package/dist/components/ui/toggle.d.ts +10 -0
  168. package/dist/components/ui/toggle.d.ts.map +1 -0
  169. package/dist/components/ui/toggle.js +25 -0
  170. package/dist/components/ui/tooltip.d.ts +2 -2
  171. package/dist/components/ui/tooltip.d.ts.map +1 -1
  172. package/dist/components/ui/tooltip.js +4 -4
  173. package/dist/hooks/use-mobile.d.ts +2 -0
  174. package/dist/hooks/use-mobile.d.ts.map +1 -0
  175. package/dist/hooks/use-mobile.js +15 -0
  176. package/dist/index.d.ts +1 -0
  177. package/dist/index.d.ts.map +1 -1
  178. package/dist/index.js +2 -0
  179. package/package.json +48 -24
@@ -0,0 +1,132 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as RechartsPrimitive from "recharts";
5
+ import { cn } from "../../lib/utils";
6
+ // Format: { THEME_NAME: CSS_SELECTOR }
7
+ const THEMES = { light: "", dark: ".dark" };
8
+ const ChartContext = React.createContext(null);
9
+ function useChart() {
10
+ const context = React.useContext(ChartContext);
11
+ if (!context) {
12
+ throw new Error("useChart must be used within a <ChartContainer />");
13
+ }
14
+ return context;
15
+ }
16
+ function ChartContainer({ id, className, children, config, ...props }) {
17
+ const uniqueId = React.useId();
18
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
19
+ return (_jsx(ChartContext.Provider, { value: { config }, children: _jsxs("div", { "data-slot": "chart", "data-chart": chartId, className: cn("[&_.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-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 flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { children: children })] }) }));
20
+ }
21
+ const ChartStyle = ({ id, config }) => {
22
+ const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
23
+ if (!colorConfig.length) {
24
+ return null;
25
+ }
26
+ return (_jsx("style", { dangerouslySetInnerHTML: {
27
+ __html: Object.entries(THEMES)
28
+ .map(([theme, prefix]) => `
29
+ ${prefix} [data-chart=${id}] {
30
+ ${colorConfig
31
+ .map(([key, itemConfig]) => {
32
+ const color = itemConfig.theme?.[theme] ||
33
+ itemConfig.color;
34
+ return color ? ` --color-${key}: ${color};` : null;
35
+ })
36
+ .join("\n")}
37
+ }
38
+ `)
39
+ .join("\n"),
40
+ } }));
41
+ };
42
+ const ChartTooltip = RechartsPrimitive.Tooltip;
43
+ function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }) {
44
+ const { config } = useChart();
45
+ const tooltipLabel = React.useMemo(() => {
46
+ if (hideLabel || !payload?.length) {
47
+ return null;
48
+ }
49
+ const [item] = payload;
50
+ const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
51
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
52
+ const value = !labelKey && typeof label === "string"
53
+ ? config[label]?.label || label
54
+ : itemConfig?.label;
55
+ if (labelFormatter) {
56
+ return (_jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) }));
57
+ }
58
+ if (!value) {
59
+ return null;
60
+ }
61
+ return _jsx("div", { className: cn("font-medium", labelClassName), children: value });
62
+ }, [
63
+ label,
64
+ labelFormatter,
65
+ payload,
66
+ hideLabel,
67
+ labelClassName,
68
+ config,
69
+ labelKey,
70
+ ]);
71
+ if (!active || !payload?.length) {
72
+ return null;
73
+ }
74
+ const nestLabel = payload.length === 1 && indicator !== "dot";
75
+ return (_jsxs("div", { className: cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
76
+ .filter((item) => item.type !== "none")
77
+ .map((item, index) => {
78
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
79
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
80
+ const indicatorColor = color || item.payload.fill || item.color;
81
+ return (_jsx("div", { className: cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
82
+ "h-2.5 w-2.5": indicator === "dot",
83
+ "w-1": indicator === "line",
84
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
85
+ "my-0.5": nestLabel && indicator === "dashed",
86
+ }), style: {
87
+ "--color-bg": indicatorColor,
88
+ "--color-border": indicatorColor,
89
+ } }))), _jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })] }), item.value && (_jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() }))] })] })) }, item.dataKey));
90
+ }) })] }));
91
+ }
92
+ const ChartLegend = RechartsPrimitive.Legend;
93
+ function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey, }) {
94
+ const { config } = useChart();
95
+ if (!payload?.length) {
96
+ return null;
97
+ }
98
+ return (_jsx("div", { className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload
99
+ .filter((item) => item.type !== "none")
100
+ .map((item) => {
101
+ const key = `${nameKey || item.dataKey || "value"}`;
102
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
103
+ return (_jsxs("div", { className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
104
+ backgroundColor: item.color,
105
+ } })), itemConfig?.label] }, item.value));
106
+ }) }));
107
+ }
108
+ // Helper to extract item config from a payload.
109
+ function getPayloadConfigFromPayload(config, payload, key) {
110
+ if (typeof payload !== "object" || payload === null) {
111
+ return undefined;
112
+ }
113
+ const payloadPayload = "payload" in payload &&
114
+ typeof payload.payload === "object" &&
115
+ payload.payload !== null
116
+ ? payload.payload
117
+ : undefined;
118
+ let configLabelKey = key;
119
+ if (key in payload &&
120
+ typeof payload[key] === "string") {
121
+ configLabelKey = payload[key];
122
+ }
123
+ else if (payloadPayload &&
124
+ key in payloadPayload &&
125
+ typeof payloadPayload[key] === "string") {
126
+ configLabelKey = payloadPayload[key];
127
+ }
128
+ return configLabelKey in config
129
+ ? config[configLabelKey]
130
+ : config[key];
131
+ }
132
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,5 +1,5 @@
1
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
- import * as React from 'react';
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
3
  declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  export { Checkbox };
5
5
  //# sourceMappingURL=checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,2CAkBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAK7D,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,2CAkBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,9 +1,9 @@
1
- 'use client';
1
+ "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
- import { CheckIcon } from 'lucide-react';
5
- import { cn } from '../../lib/utils';
3
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
4
+ import { CheckIcon } from "lucide-react";
5
+ import { cn } from "../../lib/utils";
6
6
  function Checkbox({ className, ...props }) {
7
- return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn('border-input shadow-xs focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary peer size-4 shrink-0 rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
7
+ return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
8
8
  }
9
9
  export { Checkbox };
@@ -1,6 +1,6 @@
1
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
- declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
3
- declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
- declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
1
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
5
5
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
6
6
  //# sourceMappingURL=collapsible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAA;AAEnE,QAAA,MAAM,WAAW,kIAA4B,CAAA;AAC7C,QAAA,MAAM,kBAAkB,4IAA0C,CAAA;AAClE,QAAA,MAAM,kBAAkB,yIAA0C,CAAA;AAElE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAA;AAEnE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,2CAOtE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,2CAOtE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,5 +1,12 @@
1
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
- const Collapsible = CollapsiblePrimitive.Root;
3
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
4
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
3
+ function Collapsible({ ...props }) {
4
+ return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
5
+ }
6
+ function CollapsibleTrigger({ ...props }) {
7
+ return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props }));
8
+ }
9
+ function CollapsibleContent({ ...props }) {
10
+ return (_jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props }));
11
+ }
5
12
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,19 +1,19 @@
1
- import { type DialogProps } from '@radix-ui/react-dialog';
2
- import * as React from 'react';
3
- import { Command as CommandPrimitive } from 'cmdk';
4
- declare const Command: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive>>>;
5
- declare const CommandDialog: ({ children, ...props }: DialogProps & {
6
- children: React.ReactNode;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- declare const CommandInput: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive.Input>>>;
9
- declare const CommandList: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive.List>>>;
10
- declare const CommandEmpty: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive.Empty>>>;
11
- declare const CommandGroup: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive.Group>>>;
12
- declare const CommandSeparator: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive.Separator>>>;
13
- declare const CommandItem: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & React.RefAttributes<React.ElementRef<typeof CommandPrimitive.Item>>>;
14
- declare const CommandShortcut: {
15
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
16
- displayName: string;
17
- };
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "./dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
13
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
16
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
18
18
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
19
19
  //# sourceMappingURL=command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAElD,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,yBAAyB,CAC5C,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,GACrD,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAahE,CAAA;AAGF,QAAA,MAAM,aAAa,GAAI,wBAGpB,WAAW,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAc7C,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,yBAAyB,CACjD,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAC3D,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAgBtE,CAAA;AAIF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,yBAAyB,CAChD,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAC1D,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAUrE,CAAA;AAIF,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,yBAAyB,CACjD,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAC3D,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAUtE,CAAA;AAIF,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,yBAAyB,CACjD,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAC3D,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAatE,CAAA;AAIF,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,yBAAyB,CACrD,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,GAC/D,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAU1E,CAAA;AAGF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,yBAAyB,CAChD,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAC1D,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAarE,CAAA;AAIF,QAAA,MAAM,eAAe;8BAGlB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAUvC,CAAA;AAGD,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAA"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAIlD,OAAO,EACL,MAAM,EAKP,MAAM,UAAU,CAAA;AAEjB,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAW/C;AAED,iBAAS,aAAa,CAAC,EACrB,KAAyB,EACzB,WAA8C,EAC9C,QAAQ,EACR,SAAS,EACT,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CAiBA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAiBrD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAWpD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAQrD;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAWrD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,2CAQzD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAWpD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAA"}
@@ -1,29 +1,33 @@
1
- 'use client';
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Search } from 'lucide-react';
4
- import * as React from 'react';
5
- import { cn } from '../../lib/utils';
6
- import { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';
7
- import { Command as CommandPrimitive } from 'cmdk';
8
- const Command = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive, { ref: ref, className: cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props })));
9
- Command.displayName = CommandPrimitive.displayName;
10
- const CommandDialog = ({ children, ...props }) => {
11
- return (_jsx(Dialog, { ...props, children: _jsxs(DialogContent, { className: "overflow-hidden p-0", children: [_jsx(DialogTitle, { className: "sr-only", children: "Command Menu" }), _jsx(DialogDescription, { className: "sr-only", children: "Search apps and commands" }), _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:select-none [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5 [&_[data-cmdk-input-wrapper]_svg]:size-5", children: children })] }) }));
12
- };
13
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => (_jsxs("div", { className: "flex items-center border-b px-3", "data-cmdk-input-wrapper": "", children: [_jsx(Search, { className: "mr-2 size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { ref: ref, className: cn('placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
14
- CommandInput.displayName = CommandPrimitive.Input.displayName;
15
- const CommandList = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.List, { ref: ref, className: cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className), ...props })));
16
- CommandList.displayName = CommandPrimitive.List.displayName;
17
- const CommandEmpty = React.forwardRef((props, ref) => (_jsx(CommandPrimitive.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
18
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
19
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Group, { ref: ref, className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props })));
20
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
21
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Separator, { ref: ref, className: cn('bg-border -mx-1 h-px', className), ...props })));
22
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
23
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Item, { ref: ref, className: cn("aria-selected:bg-accent aria-selected:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
24
- CommandItem.displayName = CommandPrimitive.Item.displayName;
25
- const CommandShortcut = ({ className, ...props }) => {
26
- return (_jsx("span", { className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className), ...props }));
27
- };
28
- CommandShortcut.displayName = 'CommandShortcut';
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { SearchIcon } from "lucide-react";
4
+ import { cn } from "../../lib/utils";
5
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog";
6
+ function Command({ className, ...props }) {
7
+ return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className), ...props }));
8
+ }
9
+ function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
10
+ return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), showCloseButton: showCloseButton, children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] }));
11
+ }
12
+ function CommandInput({ className, ...props }) {
13
+ return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
14
+ }
15
+ function CommandList({ className, ...props }) {
16
+ return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
17
+ }
18
+ function CommandEmpty({ ...props }) {
19
+ return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
20
+ }
21
+ function CommandGroup({ className, ...props }) {
22
+ return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className), ...props }));
23
+ }
24
+ function CommandSeparator({ className, ...props }) {
25
+ return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("bg-border -mx-1 h-px", className), ...props }));
26
+ }
27
+ function CommandItem({ className, ...props }) {
28
+ return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
29
+ }
30
+ function CommandShortcut({ className, ...props }) {
31
+ return (_jsx("span", { "data-slot": "command-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
32
+ }
29
33
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
6
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
7
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
8
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
9
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
10
+ inset?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
13
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
14
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
15
+ inset?: boolean;
16
+ variant?: "default" | "destructive";
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
19
+ declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
20
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
21
+ inset?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
24
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
25
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
26
+ //# sourceMappingURL=context-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AAKpE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAI3D;AAED,iBAAS,gBAAgB,CAAC,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,2CAIzD;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAI1D;AAED,iBAAS,cAAc,CAAC,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,GAAG,CAAC,2CAEvD;AAED,iBAAS,qBAAqB,CAAC,EAC7B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,UAAU,CAAC,2CAO9D;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,UAAU,CAAC,GAAG;IAChE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAeA;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,UAAU,CAAC,2CAW9D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAa3D;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;CACpC,2CAaA;AAED,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,YAAY,CAAC,2CAmBhE;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,2CAkB7D;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAYA;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,2CAQ7D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
4
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
5
+ import { cn } from "../../lib/utils";
6
+ function ContextMenu({ ...props }) {
7
+ return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
8
+ }
9
+ function ContextMenuTrigger({ ...props }) {
10
+ return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props }));
11
+ }
12
+ function ContextMenuGroup({ ...props }) {
13
+ return (_jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props }));
14
+ }
15
+ function ContextMenuPortal({ ...props }) {
16
+ return (_jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props }));
17
+ }
18
+ function ContextMenuSub({ ...props }) {
19
+ return _jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
20
+ }
21
+ function ContextMenuRadioGroup({ ...props }) {
22
+ return (_jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props }));
23
+ }
24
+ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
25
+ return (_jsxs(ContextMenuPrimitive.SubTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
26
+ }
27
+ function ContextMenuSubContent({ className, ...props }) {
28
+ return (_jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
29
+ }
30
+ function ContextMenuContent({ className, ...props }) {
31
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className), ...props }) }));
32
+ }
33
+ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
34
+ return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
35
+ }
36
+ function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
37
+ return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
38
+ }
39
+ function ContextMenuRadioItem({ className, children, ...props }) {
40
+ return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
41
+ }
42
+ function ContextMenuLabel({ className, inset, ...props }) {
43
+ return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
44
+ }
45
+ function ContextMenuSeparator({ className, ...props }) {
46
+ return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
47
+ }
48
+ function ContextMenuShortcut({ className, ...props }) {
49
+ return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
50
+ }
51
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -1,20 +1,16 @@
1
- import * as DialogPrimitive from '@radix-ui/react-dialog';
2
- import * as React from 'react';
3
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
- declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
- declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const DialogHeader: {
10
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
13
- declare const DialogFooter: {
14
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
17
- declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
- declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
- export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
20
16
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,aAAa,8GAA0B,CAAA;AAE7C,QAAA,MAAM,YAAY,6CAAyB,CAAA;AAE3C,QAAA,MAAM,WAAW,4GAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,8JAYjB,CAAA;AAGF,QAAA,MAAM,aAAa,8JAqBjB,CAAA;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,WAAW,oKAYf,CAAA;AAGF,QAAA,MAAM,iBAAiB,8KASrB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CAyBA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -1,23 +1,35 @@
1
- 'use client';
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as DialogPrimitive from '@radix-ui/react-dialog';
4
- import { X } from 'lucide-react';
5
- import * as React from 'react';
6
- import { cn } from '../../lib/utils';
7
- const Dialog = DialogPrimitive.Root;
8
- const DialogTrigger = DialogPrimitive.Trigger;
9
- const DialogPortal = DialogPrimitive.Portal;
10
- const DialogClose = DialogPrimitive.Close;
11
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props })));
12
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
13
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[48%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground focus:outline-hidden absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none", children: [_jsx(X, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
14
- DialogContent.displayName = DialogPrimitive.Content.displayName;
15
- const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
16
- DialogHeader.displayName = 'DialogHeader';
17
- const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
18
- DialogFooter.displayName = 'DialogFooter';
19
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
20
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
21
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
22
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
23
- export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ import { XIcon } from "lucide-react";
4
+ import { cn } from "../../lib/utils";
5
+ function Dialog({ ...props }) {
6
+ return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
7
+ }
8
+ function DialogTrigger({ ...props }) {
9
+ return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
10
+ }
11
+ function DialogPortal({ ...props }) {
12
+ return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
13
+ }
14
+ function DialogClose({ ...props }) {
15
+ return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
16
+ }
17
+ function DialogOverlay({ className, ...props }) {
18
+ return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className), ...props }));
19
+ }
20
+ function DialogContent({ className, children, showCloseButton = true, ...props }) {
21
+ return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
22
+ }
23
+ function DialogHeader({ className, ...props }) {
24
+ return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
25
+ }
26
+ function DialogFooter({ className, ...props }) {
27
+ return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
28
+ }
29
+ function DialogTitle({ className, ...props }) {
30
+ return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
31
+ }
32
+ function DialogDescription({ className, ...props }) {
33
+ return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
34
+ }
35
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { Drawer as DrawerPrimitive } from "vaul";
3
+ declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
9
+ declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
12
+ declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
14
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/ui/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAA;AAIhD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAqBtD;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}