@arolariu/components 0.3.1 → 0.4.1
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.
- package/EXAMPLES.md +1035 -1035
- package/changelog.md +9 -0
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +19 -41
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +34 -35
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +4 -3
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +2 -2
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.js +6 -2
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/index.css +56 -1804
- package/dist/index.css.map +1 -1
- package/dist/lib/utilities.js.map +1 -1
- package/package.json +2 -15
- package/src/components/ui/chart.tsx +163 -162
- package/src/components/ui/checkbox.tsx +2 -2
- package/src/components/ui/field.tsx +1 -1
- package/src/components/ui/form.tsx +8 -4
- package/src/components/ui/input-group.tsx +2 -0
- package/src/components/ui/sidebar.tsx +2 -0
- package/src/components/ui/table.tsx +2 -0
- package/src/components/ui/typewriter.tsx +2 -2
- package/src/index.css +6 -6
- package/dist/components/ui/field.d.ts +0 -26
- package/dist/components/ui/field.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, forwardRef, useContext, useId, useMemo } from "react";
|
|
4
|
-
import { Legend, ResponsiveContainer, Tooltip } from "recharts";
|
|
5
3
|
import { cn } from "../../lib/utilities.js";
|
|
4
|
+
import { createContext, useContext, useId, useMemo } from "react";
|
|
5
|
+
import { Legend, ResponsiveContainer, Tooltip } from "recharts";
|
|
6
6
|
const THEMES = {
|
|
7
7
|
light: "",
|
|
8
8
|
dark: ".dark"
|
|
@@ -13,17 +13,20 @@ function useChart() {
|
|
|
13
13
|
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
14
14
|
return context;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
function ChartContainer({ id, config, initialDimension = {
|
|
17
|
+
width: 320,
|
|
18
|
+
height: 200
|
|
19
|
+
}, className, children, ...props }) {
|
|
17
20
|
const uniqueId = useId();
|
|
18
|
-
const chartId = `chart-${id
|
|
21
|
+
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
19
22
|
return /*#__PURE__*/ jsx(ChartContext.Provider, {
|
|
20
23
|
value: {
|
|
21
24
|
config
|
|
22
25
|
},
|
|
23
26
|
children: /*#__PURE__*/ jsxs("div", {
|
|
27
|
+
"data-slot": "chart",
|
|
24
28
|
"data-chart": chartId,
|
|
25
|
-
|
|
26
|
-
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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none", className),
|
|
29
|
+
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),
|
|
27
30
|
...props,
|
|
28
31
|
children: [
|
|
29
32
|
/*#__PURE__*/ jsx(ChartStyle, {
|
|
@@ -31,38 +34,38 @@ const ChartContainer = /*#__PURE__*/ forwardRef(({ id, className, children, conf
|
|
|
31
34
|
config: config
|
|
32
35
|
}),
|
|
33
36
|
/*#__PURE__*/ jsx(ResponsiveContainer, {
|
|
37
|
+
initialDimension: initialDimension,
|
|
34
38
|
children: children
|
|
35
39
|
})
|
|
36
40
|
]
|
|
37
41
|
})
|
|
38
42
|
});
|
|
39
|
-
}
|
|
40
|
-
ChartContainer.displayName = "Chart";
|
|
43
|
+
}
|
|
41
44
|
const ChartStyle = ({ id, config })=>{
|
|
42
|
-
const colorConfig = Object.entries(config).filter(([, config])=>config.theme
|
|
45
|
+
const colorConfig = Object.entries(config).filter(([, config])=>config.theme ?? config.color);
|
|
43
46
|
if (!colorConfig.length) return null;
|
|
44
47
|
return /*#__PURE__*/ jsx("style", {
|
|
45
48
|
dangerouslySetInnerHTML: {
|
|
46
49
|
__html: Object.entries(THEMES).map(([theme, prefix])=>`
|
|
47
50
|
${prefix} [data-chart=${id}] {
|
|
48
51
|
${colorConfig.map(([key, itemConfig])=>{
|
|
49
|
-
const color = itemConfig.theme?.[theme]
|
|
52
|
+
const color = itemConfig.theme?.[theme] ?? itemConfig.color;
|
|
50
53
|
return color ? ` --color-${key}: ${color};` : null;
|
|
51
|
-
}).join("")}
|
|
54
|
+
}).join("\n")}
|
|
52
55
|
}
|
|
53
|
-
`).join("")
|
|
56
|
+
`).join("\n")
|
|
54
57
|
}
|
|
55
58
|
});
|
|
56
59
|
};
|
|
57
60
|
const ChartTooltip = Tooltip;
|
|
58
|
-
|
|
61
|
+
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
|
|
59
62
|
const { config } = useChart();
|
|
60
63
|
const tooltipLabel = useMemo(()=>{
|
|
61
64
|
if (hideLabel || !payload?.length) return null;
|
|
62
65
|
const [item] = payload;
|
|
63
|
-
const key = `${labelKey
|
|
66
|
+
const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
|
|
64
67
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
65
|
-
const value = labelKey || "string" != typeof label ? itemConfig?.label : config[label]?.label
|
|
68
|
+
const value = labelKey || "string" != typeof label ? itemConfig?.label : config[label]?.label ?? label;
|
|
66
69
|
if (labelFormatter) return /*#__PURE__*/ jsx("div", {
|
|
67
70
|
className: cn("font-medium", labelClassName),
|
|
68
71
|
children: labelFormatter(value, payload)
|
|
@@ -84,22 +87,21 @@ const ChartTooltipContent = /*#__PURE__*/ forwardRef(({ active, payload, classNa
|
|
|
84
87
|
if (!active || !payload?.length) return null;
|
|
85
88
|
const nestLabel = 1 === payload.length && "dot" !== indicator;
|
|
86
89
|
return /*#__PURE__*/ jsxs("div", {
|
|
87
|
-
|
|
88
|
-
className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950", className),
|
|
90
|
+
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),
|
|
89
91
|
children: [
|
|
90
92
|
nestLabel ? null : tooltipLabel,
|
|
91
93
|
/*#__PURE__*/ jsx("div", {
|
|
92
94
|
className: "grid gap-1.5",
|
|
93
95
|
children: payload.filter((item)=>"none" !== item.type).map((item, index)=>{
|
|
94
|
-
const key = `${nameKey
|
|
96
|
+
const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
|
|
95
97
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
96
|
-
const indicatorColor = color
|
|
98
|
+
const indicatorColor = color ?? item.payload?.fill ?? item.color;
|
|
97
99
|
return /*#__PURE__*/ jsx("div", {
|
|
98
|
-
className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5
|
|
100
|
+
className: cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", "dot" === indicator && "items-center"),
|
|
99
101
|
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /*#__PURE__*/ jsxs(Fragment, {
|
|
100
102
|
children: [
|
|
101
103
|
itemConfig?.icon ? /*#__PURE__*/ jsx(itemConfig.icon, {}) : !hideIndicator && /*#__PURE__*/ jsx("div", {
|
|
102
|
-
className: cn("shrink-0 rounded-[2px] border-
|
|
104
|
+
className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
103
105
|
"h-2.5 w-2.5": "dot" === indicator,
|
|
104
106
|
"w-1": "line" === indicator,
|
|
105
107
|
"w-0 border-[1.5px] border-dashed bg-transparent": "dashed" === indicator,
|
|
@@ -118,38 +120,36 @@ const ChartTooltipContent = /*#__PURE__*/ forwardRef(({ active, payload, classNa
|
|
|
118
120
|
children: [
|
|
119
121
|
nestLabel ? tooltipLabel : null,
|
|
120
122
|
/*#__PURE__*/ jsx("span", {
|
|
121
|
-
className: "text-
|
|
122
|
-
children: itemConfig?.label
|
|
123
|
+
className: "text-muted-foreground",
|
|
124
|
+
children: itemConfig?.label ?? item.name
|
|
123
125
|
})
|
|
124
126
|
]
|
|
125
127
|
}),
|
|
126
|
-
item.value && /*#__PURE__*/ jsx("span", {
|
|
127
|
-
className: "font-mono font-medium
|
|
128
|
-
children: item.value.toLocaleString()
|
|
128
|
+
null != item.value && /*#__PURE__*/ jsx("span", {
|
|
129
|
+
className: "text-foreground font-mono font-medium tabular-nums",
|
|
130
|
+
children: "number" == typeof item.value ? item.value.toLocaleString() : String(item.value)
|
|
129
131
|
})
|
|
130
132
|
]
|
|
131
133
|
})
|
|
132
134
|
]
|
|
133
135
|
})
|
|
134
|
-
},
|
|
136
|
+
}, index);
|
|
135
137
|
})
|
|
136
138
|
})
|
|
137
139
|
]
|
|
138
140
|
});
|
|
139
|
-
}
|
|
140
|
-
ChartTooltipContent.displayName = "ChartTooltip";
|
|
141
|
+
}
|
|
141
142
|
const ChartLegend = Legend;
|
|
142
|
-
|
|
143
|
+
function ChartLegendContent({ className, hideIcon = false, nameKey, payload, verticalAlign }) {
|
|
143
144
|
const { config } = useChart();
|
|
144
145
|
if (!payload?.length) return null;
|
|
145
146
|
return /*#__PURE__*/ jsx("div", {
|
|
146
|
-
ref: ref,
|
|
147
147
|
className: cn("flex items-center justify-center gap-4", "top" === verticalAlign ? "pb-3" : "pt-3", className),
|
|
148
148
|
children: payload.filter((item)=>"none" !== item.type).map((item)=>{
|
|
149
|
-
const key = `${nameKey
|
|
149
|
+
const key = `${nameKey ?? item.dataKey ?? "value"}`;
|
|
150
150
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
151
151
|
return /*#__PURE__*/ jsxs("div", {
|
|
152
|
-
className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3
|
|
152
|
+
className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
|
|
153
153
|
children: [
|
|
154
154
|
itemConfig?.icon && !hideIcon ? /*#__PURE__*/ jsx(itemConfig.icon, {}) : /*#__PURE__*/ jsx("div", {
|
|
155
155
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -162,8 +162,7 @@ const ChartLegendContent = /*#__PURE__*/ forwardRef(({ className, hideIcon = fal
|
|
|
162
162
|
}, item.value);
|
|
163
163
|
})
|
|
164
164
|
});
|
|
165
|
-
}
|
|
166
|
-
ChartLegendContent.displayName = "ChartLegend";
|
|
165
|
+
}
|
|
167
166
|
function getPayloadConfigFromPayload(config, payload, key) {
|
|
168
167
|
if ("object" != typeof payload || null === payload) return;
|
|
169
168
|
const payloadPayload = "payload" in payload && "object" == typeof payload.payload && null !== payload.payload ? payload.payload : void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\chart.js","sources":["webpack://@arolariu/components/./src/components/ui/chart.tsx"],"sourcesContent":["\r\n\r\n/* eslint-disable */\r\n\r\nimport * as React from \"react\";\r\nimport * as RechartsPrimitive from \"recharts\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\n// Format: { THEME_NAME: CSS_SELECTOR }\r\nconst THEMES = {light: \"\", dark: \".dark\"} as const;\r\n\r\nexport type ChartConfig = {\r\n [k in string]: {\r\n label?: React.ReactNode;\r\n icon?: React.ComponentType;\r\n } & ({color?: string; theme?: never} | {color?: never; theme: Record<keyof typeof THEMES, string>});\r\n};\r\n\r\ntype ChartContextProps = {\r\n config: ChartConfig;\r\n};\r\n\r\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\r\n\r\nfunction useChart() {\r\n const context = React.useContext(ChartContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useChart must be used within a <ChartContainer />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst ChartContainer = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\"> & {\r\n config: ChartConfig;\r\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\r\n }\r\n>(({id, className, children, config, ...props}, ref) => {\r\n const uniqueId = React.useId();\r\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\r\n\r\n return (\r\n <ChartContext.Provider value={{config}}>\r\n <div\r\n data-chart={chartId}\r\n ref={ref}\r\n className={cn(\r\n \"[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <ChartStyle\r\n id={chartId}\r\n config={config}\r\n />\r\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\r\n </div>\r\n </ChartContext.Provider>\r\n );\r\n});\r\nChartContainer.displayName = \"Chart\";\r\n\r\nconst ChartStyle = ({id, config}: {id: string; config: ChartConfig}) => {\r\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);\r\n\r\n if (!colorConfig.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <style\r\n dangerouslySetInnerHTML={{\r\n __html: Object.entries(THEMES)\r\n .map(\r\n ([theme, prefix]) => `\r\n${prefix} [data-chart=${id}] {\r\n${colorConfig\r\n .map(([key, itemConfig]) => {\r\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\r\n return color ? ` --color-${key}: ${color};` : null;\r\n })\r\n .join(\"\")}\r\n}\r\n`,\r\n )\r\n .join(\"\"),\r\n }}\r\n />\r\n );\r\n};\r\n\r\nconst ChartTooltip = RechartsPrimitive.Tooltip;\r\n\r\nconst ChartTooltipContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<typeof RechartsPrimitive.Tooltip>\r\n & React.ComponentProps<\"div\"> & {\r\n hideLabel?: boolean;\r\n hideIndicator?: boolean;\r\n indicator?: \"line\" | \"dot\" | \"dashed\";\r\n nameKey?: string;\r\n labelKey?: string;\r\n }\r\n>(\r\n (\r\n {\r\n active,\r\n payload,\r\n className,\r\n indicator = \"dot\",\r\n hideLabel = false,\r\n hideIndicator = false,\r\n label,\r\n labelFormatter,\r\n labelClassName,\r\n formatter,\r\n color,\r\n nameKey,\r\n labelKey,\r\n },\r\n ref,\r\n ) => {\r\n const {config} = useChart();\r\n\r\n const tooltipLabel = React.useMemo(() => {\r\n if (hideLabel || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const [item] = payload;\r\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const value = !labelKey && typeof label === \"string\" ? config[label as keyof typeof config]?.label || label : itemConfig?.label;\r\n\r\n if (labelFormatter) {\r\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>;\r\n }\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\r\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\r\n\r\n if (!active || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\r\n className,\r\n )}>\r\n {!nestLabel ? tooltipLabel : null}\r\n <div className='grid gap-1.5'>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item, index) => {\r\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const indicatorColor = color || item.payload.fill || item.color;\r\n\r\n return (\r\n <div\r\n key={item.dataKey}\r\n className={cn(\r\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\r\n indicator === \"dot\" && \"items-center\",\r\n )}>\r\n {formatter && item?.value !== undefined && item.name ? (\r\n formatter(item.value, item.name, item, index, item.payload)\r\n ) : (\r\n <>\r\n {itemConfig?.icon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n !hideIndicator && (\r\n <div\r\n className={cn(\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\", {\r\n \"h-2.5 w-2.5\": indicator === \"dot\",\r\n \"w-1\": indicator === \"line\",\r\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\r\n \"my-0.5\": nestLabel && indicator === \"dashed\",\r\n })}\r\n style={\r\n {\r\n \"--color-bg\": indicatorColor,\r\n \"--color-border\": indicatorColor,\r\n } as React.CSSProperties\r\n }\r\n />\r\n )\r\n )}\r\n <div className={cn(\"flex flex-1 justify-between leading-none\", nestLabel ? \"items-end\" : \"items-center\")}>\r\n <div className='grid gap-1.5'>\r\n {nestLabel ? tooltipLabel : null}\r\n <span className='text-neutral-500 dark:text-neutral-400'>{itemConfig?.label || item.name}</span>\r\n </div>\r\n {item.value && (\r\n <span className='font-mono font-medium text-neutral-950 tabular-nums dark:text-neutral-50'>\r\n {item.value.toLocaleString()}\r\n </span>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n },\r\n);\r\nChartTooltipContent.displayName = \"ChartTooltip\";\r\n\r\nconst ChartLegend = RechartsPrimitive.Legend;\r\n\r\nconst ChartLegendContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\">\r\n & Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\r\n hideIcon?: boolean;\r\n nameKey?: string;\r\n }\r\n>(({className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey}, ref) => {\r\n const {config} = useChart();\r\n\r\n if (!payload?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item) => {\r\n const key = `${nameKey || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n\r\n return (\r\n <div\r\n key={item.value}\r\n className={cn(\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\")}>\r\n {itemConfig?.icon && !hideIcon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n <div\r\n className='h-2 w-2 shrink-0 rounded-[2px]'\r\n style={{\r\n backgroundColor: item.color,\r\n }}\r\n />\r\n )}\r\n {itemConfig?.label}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n});\r\nChartLegendContent.displayName = \"ChartLegend\";\r\n\r\n// Helper to extract item config from a payload.\r\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\r\n if (typeof payload !== \"object\" || payload === null) {\r\n return;\r\n }\r\n\r\n const payloadPayload =\r\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null ? payload.payload : undefined;\r\n\r\n let configLabelKey: string = key;\r\n\r\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\r\n configLabelKey = payload[key as keyof typeof payload] as string;\r\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\") {\r\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\r\n }\r\n\r\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\r\n}\r\n\r\nexport {ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent};\r\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","ref","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;AAUA,MAAMA,SAAS;IAAC,OAAO;IAAI,MAAM;AAAO;AAaxC,MAAMC,eAAe,WAAfA,GAAeC,cAA8C;AAEnE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,iBAAiB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0CAA0CkC,UAAAA,gBAA0B,SAAS,QAAQzC;kBAClGoB,QACE,MAAM,CAAC,CAACW,OAASA,WAAAA,KAAK,IAAI,EAC1B,GAAG,CAAC,CAACA;YACJ,MAAMjB,MAAM,GAAGc,WAAWG,KAAK,OAAO,IAAI,SAAS;YACnD,MAAMhB,aAAaiB,4BAA4B9B,QAAQ6B,MAAMjB;YAE7D,OAAO,WAAP,GACE,KAAC;gBAEC,WAAWP,GAAG;;oBACbQ,YAAY,QAAQ,CAACyB,WAAW,WAAXA,GACpB,IAACzB,WAAW,IAAI,sBAEhB,IAAC;wBACC,WAAU;wBACV,OAAO;4BACL,iBAAiBgB,KAAK,KAAK;wBAC7B;;oBAGHhB,YAAY;;eAZRgB,KAAK,KAAK;QAerB;;AAGR;AACAQ,mBAAmB,WAAW,GAAG;AAGjC,SAASP,4BAA4B9B,MAAmB,EAAEkB,OAAgB,EAAEN,GAAW;IACrF,IAAI,mBAAOM,WAAwBA,SAAAA,SACjC;IAGF,MAAMsB,iBACJ,aAAatB,WAAW,mBAAOA,QAAQ,OAAO,IAAiBA,SAAAA,QAAQ,OAAO,GAAYA,QAAQ,OAAO,GAAGiB;IAE9G,IAAIM,iBAAyB7B;IAE7B,IAAIA,OAAOM,WAAW,mBAAOA,OAAO,CAACN,IAA4B,EAC/D6B,iBAAiBvB,OAAO,CAACN,IAA4B;SAChD,IAAI4B,kBAAkB5B,OAAO4B,kBAAkB,mBAAOA,cAAc,CAAC5B,IAAmC,EAC7G6B,iBAAiBD,cAAc,CAAC5B,IAAmC;IAGrE,OAAO6B,kBAAkBzC,SAASA,MAAM,CAACyC,eAAe,GAAGzC,MAAM,CAACY,IAA2B;AAC/F"}
|
|
1
|
+
{"version":3,"file":"components/ui/chart.js","sources":["../../../src/components/ui/chart.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable */\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport * as React from \"react\";\r\nimport * as RechartsPrimitive from \"recharts\";\r\nimport type {NameType, ValueType} from \"recharts/types/component/DefaultTooltipContent\";\r\n\r\n// Format: { THEME_NAME: CSS_SELECTOR }\r\nconst THEMES = {light: \"\", dark: \".dark\"} as const;\r\n\r\nexport type ChartConfig = Record<\r\n string,\r\n {\r\n label?: React.ReactNode;\r\n icon?: React.ComponentType;\r\n } & ({color?: string; theme?: never} | {color?: never; theme: Record<keyof typeof THEMES, string>})\r\n>;\r\n\r\ninterface ChartContextProps {\r\n config: ChartConfig;\r\n}\r\n\r\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\r\n\r\nfunction useChart() {\r\n const context = React.useContext(ChartContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useChart must be used within a <ChartContainer />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\ninterface ChartContainerProps\r\n extends\r\n Omit<React.ComponentProps<\"div\">, \"children\">,\r\n Pick<\r\n React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>,\r\n \"initialDimension\" | \"aspect\" | \"debounce\" | \"minHeight\" | \"minWidth\" | \"maxHeight\" | \"height\" | \"width\" | \"onResize\" | \"children\"\r\n > {\r\n config: ChartConfig;\r\n innerResponsiveContainerStyle?: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"style\"];\r\n}\r\n\r\nfunction ChartContainer({\r\n id,\r\n config,\r\n initialDimension = {width: 320, height: 200},\r\n className,\r\n children,\r\n ...props\r\n}: Readonly<ChartContainerProps>) {\r\n const uniqueId = React.useId();\r\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`;\r\n\r\n return (\r\n <ChartContext.Provider value={{config}}>\r\n <div\r\n data-slot='chart'\r\n data-chart={chartId}\r\n className={cn(\r\n \"[&_.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\",\r\n className,\r\n )}\r\n {...props}>\r\n <ChartStyle\r\n id={chartId}\r\n config={config}\r\n />\r\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>{children}</RechartsPrimitive.ResponsiveContainer>\r\n </div>\r\n </ChartContext.Provider>\r\n );\r\n}\r\n\r\nconst ChartStyle = ({id, config}: {id: string; config: ChartConfig}) => {\r\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);\r\n\r\n if (!colorConfig.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <style\r\n dangerouslySetInnerHTML={{\r\n __html: Object.entries(THEMES)\r\n .map(\r\n ([theme, prefix]) => `\r\n${prefix} [data-chart=${id}] {\r\n${colorConfig\r\n .map(([key, itemConfig]) => {\r\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color;\r\n return color ? ` --color-${key}: ${color};` : null;\r\n })\r\n .join(\"\\n\")}\r\n}\r\n`,\r\n )\r\n .join(\"\\n\"),\r\n }}\r\n />\r\n );\r\n};\r\n\r\nconst ChartTooltip = RechartsPrimitive.Tooltip;\r\n\r\nfunction ChartTooltipContent({\r\n active,\r\n payload,\r\n className,\r\n indicator = \"dot\",\r\n hideLabel = false,\r\n hideIndicator = false,\r\n label,\r\n labelFormatter,\r\n labelClassName,\r\n formatter,\r\n color,\r\n nameKey,\r\n labelKey,\r\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip>\r\n & React.ComponentProps<\"div\"> & {\r\n hideLabel?: boolean;\r\n hideIndicator?: boolean;\r\n indicator?: \"line\" | \"dot\" | \"dashed\";\r\n nameKey?: string;\r\n labelKey?: string;\r\n } & Omit<RechartsPrimitive.DefaultTooltipContentProps<ValueType, NameType>, \"accessibilityLayer\">) {\r\n const {config} = useChart();\r\n\r\n const tooltipLabel = React.useMemo(() => {\r\n if (hideLabel || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const [item] = payload;\r\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const value = !labelKey && typeof label === \"string\" ? (config[label]?.label ?? label) : itemConfig?.label;\r\n\r\n if (labelFormatter) {\r\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>;\r\n }\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\r\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\r\n\r\n if (!active || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\r\n\r\n return (\r\n <div\r\n className={cn(\r\n \"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\",\r\n className,\r\n )}>\r\n {!nestLabel ? tooltipLabel : null}\r\n <div className='grid gap-1.5'>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item, index) => {\r\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const indicatorColor = color ?? item.payload?.fill ?? item.color;\r\n\r\n return (\r\n <div\r\n key={index}\r\n className={cn(\r\n \"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5\",\r\n indicator === \"dot\" && \"items-center\",\r\n )}>\r\n {formatter && item?.value !== undefined && item.name ? (\r\n formatter(item.value, item.name, item, index, item.payload)\r\n ) : (\r\n <>\r\n {itemConfig?.icon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n !hideIndicator && (\r\n <div\r\n className={cn(\"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\", {\r\n \"h-2.5 w-2.5\": indicator === \"dot\",\r\n \"w-1\": indicator === \"line\",\r\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\r\n \"my-0.5\": nestLabel && indicator === \"dashed\",\r\n })}\r\n style={\r\n {\r\n \"--color-bg\": indicatorColor,\r\n \"--color-border\": indicatorColor,\r\n } as React.CSSProperties\r\n }\r\n />\r\n )\r\n )}\r\n <div className={cn(\"flex flex-1 justify-between leading-none\", nestLabel ? \"items-end\" : \"items-center\")}>\r\n <div className='grid gap-1.5'>\r\n {nestLabel ? tooltipLabel : null}\r\n <span className='text-muted-foreground'>{itemConfig?.label ?? item.name}</span>\r\n </div>\r\n {item.value != null && (\r\n <span className='text-foreground font-mono font-medium tabular-nums'>\r\n {typeof item.value === \"number\" ? item.value.toLocaleString() : String(item.value)}\r\n </span>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nconst ChartLegend = RechartsPrimitive.Legend;\r\n\r\nfunction ChartLegendContent({\r\n className,\r\n hideIcon = false,\r\n nameKey,\r\n payload,\r\n verticalAlign,\r\n}: React.ComponentProps<\"div\"> & {\r\n hideIcon?: boolean;\r\n nameKey?: string;\r\n} & RechartsPrimitive.DefaultLegendContentProps) {\r\n const {config} = useChart();\r\n\r\n if (!payload?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item) => {\r\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n\r\n return (\r\n <div\r\n key={item.value}\r\n className={cn(\"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3\")}>\r\n {itemConfig?.icon && !hideIcon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n <div\r\n className='h-2 w-2 shrink-0 rounded-[2px]'\r\n style={{\r\n backgroundColor: item.color,\r\n }}\r\n />\r\n )}\r\n {itemConfig?.label}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n}\r\n\r\n// Helper to extract item config from a payload.\r\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\r\n if (typeof payload !== \"object\" || payload === null) {\r\n return undefined;\r\n }\r\n\r\n const payloadPayload =\r\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null ? payload.payload : undefined;\r\n\r\n let configLabelKey: string = key;\r\n\r\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\r\n configLabelKey = payload[key as keyof typeof payload] as string;\r\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\") {\r\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\r\n }\r\n\r\n return configLabelKey in config ? config[configLabelKey] : config[key];\r\n}\r\n\r\nexport {ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent};\r\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","config","initialDimension","className","children","props","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","String","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;AAUA,MAAMA,SAAS;IAAC,OAAO;IAAI,MAAM;AAAO;AAcxC,MAAMC,eAAe,WAAfA,GAAeC,cAA8C;AAEnE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import { forwardRef } from "react";
|
|
|
6
6
|
import { cn } from "../../lib/utilities.js";
|
|
7
7
|
const Checkbox = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
|
|
8
8
|
ref: ref,
|
|
9
|
-
className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900", className),
|
|
9
|
+
className: cn("peer grid h-4 w-4 shrink-0 place-content-center rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900", className),
|
|
10
10
|
...props,
|
|
11
11
|
children: /*#__PURE__*/ jsx(Indicator, {
|
|
12
|
-
className: cn("
|
|
12
|
+
className: cn("grid place-content-center text-current"),
|
|
13
13
|
children: /*#__PURE__*/ jsx(Check, {
|
|
14
14
|
className: "h-4 w-4"
|
|
15
15
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components
|
|
1
|
+
{"version":3,"file":"components/ui/checkbox.js","sources":["../../../src/components/ui/checkbox.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\nimport {Check} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\r\n>(({className, ...props}, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"peer grid h-4 w-4 shrink-0 place-content-center rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900\",\r\n className,\r\n )}\r\n {...props}>\r\n <CheckboxPrimitive.Indicator className={cn(\"grid place-content-center text-current\")}>\r\n <Check className='h-4 w-4' />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n));\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\r\n\r\nexport {Checkbox};\r\n"],"names":["Checkbox","React","className","props","ref","CheckboxPrimitive","cn","Check"],"mappings":";;;;;;AAQA,MAAMA,WAAW,WAAXA,GAAWC,WAGf,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,MAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,geACAJ;QAED,GAAGC,KAAK;kBACT,kBAACE,WAA2B;YAAC,WAAWC,GAAG;sBACzC,kBAACC,OAAKA;gBAAC,WAAU;;;;AAIvBP,SAAS,WAAW,GAAGK,KAAAA,WAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components
|
|
1
|
+
{"version":3,"file":"components/ui/collapsible.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/components/ui/collapsible.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use client\";\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root;\r\n\r\nconst {CollapsibleTrigger, CollapsibleContent} = CollapsiblePrimitive;\r\n\r\nexport {Collapsible, CollapsibleContent, CollapsibleTrigger};\r\n"],"names":["__webpack_require__","exports","definition","key","Object","obj","prop","Symbol","Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAACC,SAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGF,oBAAoB,CAAC,CAACE,YAAYC,QAAQ,CAACH,oBAAoB,CAAC,CAACC,SAASE,MACzEC,OAAO,cAAc,CAACH,SAASE,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAH,oBAAoB,CAAC,GAAG,CAACK,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFN,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAACH,SAASM,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAACH,SAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;ACFA,MAAMO,cAAcC;AAEpB,MAAM,EAACC,oBAAkB,gCAAEC,oBAAkB,gCAAC,GAAGF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components
|
|
1
|
+
{"version":3,"file":"components/ui/command.js","sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport type {DialogProps} from \"@radix-ui/react-dialog\";\r\nimport {Command as CommandPrimitive} from \"cmdk\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Dialog, DialogContent} from \"@/components/ui/dialog\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Command = React.forwardRef<React.ComponentRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(\r\n ({className, ...props}, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\r\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nCommand.displayName = CommandPrimitive.displayName;\r\n\r\nconst CommandDialog = ({children, ...props}: DialogProps) => {\r\n return (\r\n <Dialog {...props}>\r\n <DialogContent className='overflow-hidden p-0'>\r\n <Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[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'>\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n );\r\n};\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({className, ...props}, ref) => (\r\n <div\r\n className='flex items-center border-b px-3'\r\n // eslint-disable-next-line react/no-unknown-property -- cmdk specific attribute\r\n cmdk-input-wrapper=''>\r\n <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\r\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n));\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName;\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-x-hidden overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName;\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty\r\n ref={ref}\r\n className='py-6 text-center text-sm'\r\n {...props}\r\n />\r\n));\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\r\n \"overflow-hidden p-1 text-neutral-950 dark:text-neutral-50 [&_[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-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName;\r\n\r\nconst CommandShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["Command","React","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","C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,WAAkC;AAE7D,MAAMU,eAAe,WAAfA,GAAed,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,KAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,0RACAJ;QAED,GAAGC,KAAK;;AAIbY,aAAa,WAAW,GAAGV,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMW,mBAAmB,WAAnBA,GAAmBf,WAGvB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,SAA0B;QACzB,KAAKD;QACL,WAAWE,GAAG,iDAAiDJ;QAC9D,GAAGC,KAAK;;AAGba,iBAAiB,WAAW,GAAGX,QAAAA,SAAAA,CAAAA,WAAsC;AAErE,MAAMY,cAAc,WAAdA,GAAchB,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GACT,6YACAJ;QAED,GAAGC,KAAK;;AAIbc,YAAY,WAAW,GAAGZ,QAAAA,IAAAA,CAAAA,WAAiC;AAE3D,MAAMa,kBAAkB,CAAC,EAAChB,SAAS,EAAE,GAAGC,OAA6C,GAC5E,WAAP,GACE,IAAC;QACC,WAAWG,GAAG,0EAA0EJ;QACvF,GAAGC,KAAK;;AAIfe,gBAAgB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\context-menu.js","sources":["webpack://@arolariu/components/./src/components/ui/context-menu.tsx"],"sourcesContent":["\r\n\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root;\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto h-4 w-4' />\r\n </ContextMenuPrimitive.SubTrigger>\r\n));\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\n \"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Portal>\r\n <ContextMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ContextMenuPrimitive.Portal>\r\n));\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <ContextMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.CheckboxItem>\r\n));\r\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Circle className='h-4 w-4 fill-current' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.RadioItem>\r\n));\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\r\n\r\nconst ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;AAQA,MAAMA,cAAcC;AAEpB,MAAMC,qBAAqBD;AAE3B,MAAME,mBAAmBF;AAEzB,MAAMG,oBAAoBH;AAE1B,MAAMI,iBAAiBJ;AAEvB,MAAMK,wBAAwBL;AAE9B,MAAMM,wBAAwB,WAAxBA,GAAwBC,WAK5B,CAAC,EAACC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACzC,KAACZ,YAA+B;QAC9B,KAAKY;QACL,WAAWC,GACT,8UACAJ,SAAS,QACTD;QAED,GAAGG,KAAK;;YACRD;0BACD,IAACI,cAAYA;gBAAC,WAAU;;;;AAG5BR,sBAAsB,WAAW,GAAGN,WAAAA,WAA2C;AAE/E,MAAMe,wBAAwB,WAAxBA,GAAwBR,WAG5B,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,YAA+B;QAC9B,KAAKY;QACL,WAAWC,GACT,2jBACAL;QAED,GAAGG,KAAK;;AAGbI,sBAAsB,WAAW,GAAGf,WAAAA,WAA2C;AAE/E,MAAMgB,qBAAqB,WAArBA,GAAqBT,WAGzB,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,QAA2B;kBAC1B,kBAACA,SAA4B;YAC3B,KAAKY;YACL,WAAWC,GACT,moBACAL;YAED,GAAGG,KAAK;;;AAIfK,mBAAmB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W,GAAGvB,MAAAA,WAAsC;AAErE,MAAMwB,uBAAuB,WAAvBA,GAAuBjB,WAG3B,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,WAA8B;QAC7B,KAAKY;QACL,WAAWC,GAAG,sDAAsDL;QACnE,GAAGG,KAAK;;AAGba,qBAAqB,WAAW,GAAGxB,UAAAA,WAA0C;AAE7E,MAAMyB,sBAAsB,CAAC,EAACjB,SAAS,EAAE,GAAGG,OAA6C,GAChF,WAAP,GACE,IAAC;QACC,WAAWE,GAAG,0EAA0EL;QACvF,GAAGG,KAAK;;AAIfc,oBAAoB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/context-menu.js","sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root;\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto h-4 w-4' />\r\n </ContextMenuPrimitive.SubTrigger>\r\n));\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\n \"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Portal>\r\n <ContextMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"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 border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ContextMenuPrimitive.Portal>\r\n));\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <ContextMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.CheckboxItem>\r\n));\r\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Circle className='h-4 w-4 fill-current' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.RadioItem>\r\n));\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\r\n\r\nconst ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;AAQA,MAAMA,cAAcC;AAEpB,MAAMC,qBAAqBD;AAE3B,MAAME,mBAAmBF;AAEzB,MAAMG,oBAAoBH;AAE1B,MAAMI,iBAAiBJ;AAEvB,MAAMK,wBAAwBL;AAE9B,MAAMM,wBAAwB,WAAxBA,GAAwBC,WAK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":["../../../src/components/ui/counting-number.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {type SpringOptions, type UseInViewOptions, useInView, useMotionValue, useSpring} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\ninterface CountingNumberProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n number: number;\r\n fromNumber?: number;\r\n padStart?: boolean;\r\n inView?: boolean;\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n inViewOnce?: boolean;\r\n decimalSeparator?: string;\r\n transition?: SpringOptions;\r\n decimalPlaces?: number;\r\n}\r\n\r\nconst CountingNumber = React.forwardRef<HTMLSpanElement, CountingNumberProps>(\r\n (\r\n {\r\n number,\r\n fromNumber = 0,\r\n padStart = false,\r\n inView = false,\r\n inViewMargin = \"0px\",\r\n inViewOnce = true,\r\n decimalSeparator = \".\",\r\n transition = {stiffness: 90, damping: 50},\r\n decimalPlaces = 0,\r\n className,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\r\n\r\n const numberStr = number.toString();\r\n const decimals = typeof decimalPlaces === \"number\" ? decimalPlaces : numberStr.includes(\".\") ? numberStr?.split(\".\")[1].length : 0;\r\n\r\n const motionVal = useMotionValue(fromNumber);\r\n const springVal = useSpring(motionVal, transition);\r\n const inViewResult = useInView(localRef, {\r\n once: inViewOnce,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n React.useEffect(() => {\r\n if (isInView) motionVal.set(number);\r\n }, [isInView, number, motionVal]);\r\n\r\n React.useEffect(() => {\r\n const unsubscribe = springVal.on(\"change\", (latest) => {\r\n if (localRef.current) {\r\n let formatted = decimals > 0 ? latest.toFixed(decimals) : Math.round(latest).toString();\r\n\r\n if (decimals > 0) {\r\n formatted = formatted.replace(\".\", decimalSeparator);\r\n }\r\n\r\n if (padStart) {\r\n const finalIntLength = Math.floor(Math.abs(number)).toString().length;\r\n const [intPart, fracPart] = formatted.split(decimalSeparator);\r\n const paddedInt = intPart.padStart(finalIntLength, \"0\");\r\n formatted = fracPart ? `${paddedInt}${decimalSeparator}${fracPart}` : paddedInt;\r\n }\r\n\r\n localRef.current.textContent = formatted;\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [springVal, decimals, padStart, number, decimalSeparator]);\r\n\r\n const finalIntLength = Math.floor(Math.abs(number)).toString().length;\r\n const suffix = decimals > 0 ? `${decimalSeparator}${\"0\".repeat(decimals)}` : \"\";\r\n const initialText = padStart ? `${\"0\".padStart(finalIntLength, \"0\")}${suffix}` : `0${suffix}`;\r\n\r\n return (\r\n <span\r\n ref={localRef}\r\n className={className}\r\n {...props}>\r\n {initialText}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nCountingNumber.displayName = \"CountingNumber\";\r\n\r\nexport {CountingNumber, type CountingNumberProps};\r\n"],"names":["CountingNumber","React","number","fromNumber","padStart","inView","inViewMargin","inViewOnce","decimalSeparator","transition","decimalPlaces","className","props","ref","localRef","numberStr","decimals","motionVal","useMotionValue","springVal","useSpring","inViewResult","useInView","isInView","unsubscribe","latest","formatted","Math","finalIntLength","intPart","fracPart","paddedInt","suffix","initialText"],"mappings":";;;;AAiBA,MAAMA,iBAAiB,WAAjBA,GAAiBC,WACrB,CACE,EACEC,MAAM,EACNC,aAAa,CAAC,EACdC,WAAW,KAAK,EAChBC,SAAS,KAAK,EACdC,eAAe,KAAK,EACpBC,aAAa,IAAI,EACjBC,mBAAmB,GAAG,EACtBC,aAAa;IAAC,WAAW;IAAI,SAAS;AAAE,CAAC,EACzCC,gBAAgB,CAAC,EACjBC,SAAS,EACT,GAAGC,OACJ,EACDC;IAEA,MAAMC,WAAWb,OAA8B;IAC/CA,oBAA0BY,KAAK,IAAMC,SAAS,OAAO;IAErD,MAAMC,YAAYb,OAAO,QAAQ;IACjC,MAAMc,WAAW,AAAyB,YAAzB,OAAON,gBAA6BA,gBAAgBK,UAAU,QAAQ,CA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G,CAAC,CAAC,EAAEA,QAAQ;IAE7F,OAAO,WAAP,GACE,IAAC;QACC,KAAKlB;QACL,WAAWH;QACV,GAAGC,KAAK;kBACRqB;;AAGP;AAGFjC,eAAe,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components
|
|
1
|
+
{"version":3,"file":"components/ui/dialog.js","sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\n \"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\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"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-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <DialogPrimitive.Close className='absolute top-4 right-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400'>\r\n <X className='h-4 w-4' />\r\n <span className='sr-only'>Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n));\r\nDialogContent.displayName = DialogPrimitive.Content.displayName;\r\n\r\nconst DialogHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\nconst DialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\r\n\r\nexport {\r\n Dialog,\r\n DialogClose,\r\n DialogContent,\r\n DialogDescription,\r\n DialogFooter,\r\n DialogHeader,\r\n DialogOverlay,\r\n DialogPortal,\r\n DialogTitle,\r\n DialogTrigger,\r\n};\r\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","cn","DialogContent","children","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;AAQA,MAAMA,SAASC;AAEf,MAAMC,gBAAgBD;AAEtB,MAAME,eAAeF;AAErB,MAAMG,cAAcH;AAEpB,MAAMI,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,SAAuB;QACtB,KAAKQ;QACL,WAAWC,GACT,0JACAH;QAED,GAAGC,KAAK;;AAGbH,cAAc,WAAW,GAAGJ,QAAAA,WAAmC;AAE/D,MAAMU,gBAAgB,WAAhBA,GAAgBL,WAGpB,CAAC,EAACC,SAAS,EAAEK,QAAQ,EAAE,GAAGJ,OAAM,EAAEC,MAAAA,WAAAA,GAClC,KAACN,cAAAA;;0BACC,IAACE,eAAAA,CAAAA;0BACD,KAACJ,SAAuB;gBACtB,KAAKQ;gBACL,WAAWC,GACT,yjBACAH;gBAED,GAAGC,KAAK;;oBACRI;kCACD,KAACX,OAAqB;wBAAC,WAAU;;0CAC/B,IAACY,GAACA;gCAAC,WAAU;;0CACb,IAAC;gCAAK,WAAU;0CAAU;;;;;;;;AAKlCF,cAAc,WAAW,GAAGV,QAAAA,WAAmC;AAE/D,MAAMa,eAAe,CAAC,EAACP,SAAS,EAAE,GAAGC,OAA4C,iBAC/E,IAAC;QACC,WAAWE,GAAG,sDAAsDH;QACnE,GAAGC,KAAK;;AAGbM,aAAa,WAAW,GAAG;AAE3B,MAAMC,eAAe,CAAC,EAACR,SAAS,EAAE,GAAGC,OAA4C,iBAC/E,IAAC;QACC,WAAWE,GAAG,iEAAiEH;QAC9E,GAAGC,KAAK;;AAGbO,aAAa,WAAW,GAAG;AAE3B,MAAMC,cAAc,WAAdA,GAAcV,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,OAAqB;QACpB,KAAKQ;QACL,WAAWC,GAAG,qDAAqDH;QAClE,GAAGC,KAAK;;AAGbQ,YAAY,WAAW,GAAGf,MAAAA,WAAiC;AAE3D,MAAMgB,oBAAoB,WAApBA,GAAoBX,WAGxB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,aAA2B;QAC1B,KAAKQ;QACL,WAAWC,GAAG,kDAAkDH;QAC/D,GAAGC,KAAK;;AAGbS,kBAAkB,WAAW,GAAGhB,YAAAA,WAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components
|
|
1
|
+
{"version":3,"file":"components/ui/dot-background.js","sources":["../../../src/components/ui/dot-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport {motion} from \"motion/react\";\r\nimport React, {useEffect, useId, useRef, useState} from \"react\";\r\n\r\n/**\r\n * DotBackground Component Props\r\n * @param width The horizontal spacing between dots\r\n * @param height The vertical spacing between dots\r\n * @param x The x-offset of the entire pattern\r\n * @param y The y-offset of the entire pattern\r\n * @param cx The x-offset of individual dots\r\n * @param cy The y-offset of individual dots\r\n * @param cr The radius of each dot\r\n * @param className Additional CSS classes to apply to the SVG container\r\n * @param glow Whether dots should have a glowing animation effect\r\n */\r\ninterface DotBackgroundProps extends React.SVGProps<SVGSVGElement> {\r\n width?: number;\r\n height?: number;\r\n x?: number;\r\n y?: number;\r\n cx?: number;\r\n cy?: number;\r\n cr?: number;\r\n className?: string;\r\n glow?: boolean;\r\n [key: string]: unknown;\r\n}\r\n\r\n/**\r\n * DotBackground Component\r\n * A React component that creates an animated or static dot pattern background using SVG.\r\n * The pattern automatically adjusts to fill its container and can optionally display glowing dots.\r\n * @see DotBackgroundProps for the props interface.\r\n * @example\r\n * // Basic usage\r\n * <DotBackground />\r\n *\r\n * // With glowing effect and custom spacing\r\n * <DotBackground\r\n * width={20}\r\n * height={20}\r\n * glow={true}\r\n * className=\"opacity-50\"\r\n * />\r\n *@summary Summary:\r\n * - The component is client-side only (\"use client\")\r\n * - Automatically responds to container size changes\r\n * - When glow is enabled, dots will animate with random delays and durations\r\n * - Uses Motion for animations\r\n * - Dots color can be controlled via the text color utility classes\r\n */\r\n\r\nexport function DotBackground({\r\n width = 16,\r\n height = 16,\r\n x = 0,\r\n y = 0,\r\n cx = 1,\r\n cy = 1,\r\n cr = 1,\r\n className,\r\n glow = false,\r\n ...props\r\n}: DotBackgroundProps) {\r\n const id = useId();\r\n const containerRef = useRef<SVGSVGElement>(null);\r\n const [dimensions, setDimensions] = useState({width: 0, height: 0});\r\n\r\n useEffect(() => {\r\n const updateDimensions = () => {\r\n if (containerRef.current) {\r\n const {width, height} = containerRef.current.getBoundingClientRect();\r\n setDimensions({width, height});\r\n }\r\n };\r\n\r\n updateDimensions();\r\n window.addEventListener(\"resize\", updateDimensions);\r\n return () => window.removeEventListener(\"resize\", updateDimensions);\r\n }, []);\r\n\r\n const dots = Array.from(\r\n {\r\n length: Math.ceil(dimensions.width / width) * Math.ceil(dimensions.height / height),\r\n },\r\n (_, i) => {\r\n const col = i % Math.ceil(dimensions.width / width);\r\n const row = Math.floor(i / Math.ceil(dimensions.width / width));\r\n return {\r\n x: col * width + cx,\r\n y: row * height + cy,\r\n delay: Math.random() * 5,\r\n duration: Math.random() * 3 + 2,\r\n };\r\n },\r\n );\r\n\r\n return (\r\n <svg\r\n ref={containerRef}\r\n aria-hidden='true'\r\n className={cn(\"pointer-events-none absolute inset-0 h-full w-full\", className)}\r\n {...props}>\r\n <defs>\r\n <radialGradient id={`${id}-gradient`}>\r\n <stop\r\n offset='0%'\r\n stopColor='currentColor'\r\n stopOpacity='1'\r\n />\r\n <stop\r\n offset='100%'\r\n stopColor='currentColor'\r\n stopOpacity='0'\r\n />\r\n </radialGradient>\r\n </defs>\r\n {dots.map((dot) => (\r\n <motion.circle\r\n key={`${dot.x}-${dot.y}`}\r\n cx={dot.x}\r\n cy={dot.y}\r\n r={cr}\r\n fill={glow ? `url(#${id}-gradient)` : \"currentColor\"}\r\n className='text-neutral-400/80'\r\n initial={glow ? {opacity: 0.4, scale: 1} : {}}\r\n animate={\r\n glow\r\n ? {\r\n opacity: [0.4, 1, 0.4],\r\n scale: [1, 1.5, 1],\r\n }\r\n : {}\r\n }\r\n transition={\r\n glow\r\n ? {\r\n duration: dot.duration,\r\n repeat: Infinity,\r\n repeatType: \"reverse\",\r\n delay: dot.delay,\r\n ease: \"easeInOut\",\r\n }\r\n : {}\r\n }\r\n />\r\n ))}\r\n </svg>\r\n );\r\n}\r\n"],"names":["DotBackground","width","height","x","y","cx","cy","cr","className","glow","props","id","useId","containerRef","useRef","dimensions","setDimensions","useState","useEffect","updateDimensions","window","dots","Array","Math","_","i","col","row","cn","dot","motion","Infinity"],"mappings":";;;;;AAuDO,SAASA,cAAc,EAC5BC,QAAQ,EAAE,EACVC,SAAS,EAAE,EACXC,IAAI,CAAC,EACLC,IAAI,CAAC,EACLC,KAAK,CAAC,EACNC,KAAK,CAAC,EACNC,KAAK,CAAC,EACNC,SAAS,EACTC,OAAO,KAAK,EACZ,GAAGC,OACgB;IACnB,MAAMC,KAAKC;IACX,MAAMC,eAAeC,OAA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ACT,IAAIA,IAAI,CAAC;oBACT,GAAGtB;oBACH,MAAME,OAAO,CAAC,KAAK,EAAEE,GAAG,UAAU,CAAC,GAAG;oBACtC,WAAU;oBACV,SAASF,OAAO;wBAAC,SAAS;wBAAK,OAAO;oBAAC,IAAI,CAAC;oBAC5C,SACEA,OACI;wBACE,SAAS;4BAAC;4BAAK;4BAAG;yBAAI;wBACtB,OAAO;4BAAC;4BAAG;4BAAK;yBAAE;oBACpB,IACA,CAAC;oBAEP,YACEA,OACI;wBACE,UAAUoB,IAAI,QAAQ;wBACtB,QAAQE;wBACR,YAAY;wBACZ,OAAOF,IAAI,KAAK;wBAChB,MAAM;oBACR,IACA,CAAC;mBAxBF,GAAGA,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,EAAE;;;AA8BlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components
|
|
1
|
+
{"version":3,"file":"components/ui/drawer.js","sources":["../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport {Drawer as DrawerPrimitive} from \"vaul\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Drawer = ({shouldScaleBackground = true, ...props}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\r\n <DrawerPrimitive.Root\r\n shouldScaleBackground={shouldScaleBackground}\r\n {...props}\r\n />\r\n);\r\nDrawer.displayName = \"Drawer\";\r\n\r\nconst DrawerTrigger = DrawerPrimitive.Trigger;\r\n\r\nconst DrawerPortal = DrawerPrimitive.Portal;\r\n\r\nconst DrawerClose = DrawerPrimitive.Close;\r\n\r\nconst DrawerOverlay = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\r\n\r\nconst DrawerContent = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DrawerPortal>\r\n <DrawerOverlay />\r\n <DrawerPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n <div className='mx-auto mt-4 h-2 w-[100px] rounded-full bg-neutral-100 dark:bg-neutral-800' />\r\n {children}\r\n </DrawerPrimitive.Content>\r\n </DrawerPortal>\r\n));\r\nDrawerContent.displayName = \"DrawerContent\";\r\n\r\nconst DrawerHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDrawerHeader.displayName = \"DrawerHeader\";\r\n\r\nconst DrawerFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\r\n {...props}\r\n />\r\n);\r\nDrawerFooter.displayName = \"DrawerFooter\";\r\n\r\nconst DrawerTitle = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\r\n\r\nconst DrawerDescription = React.forwardRef<\r\n React.ComponentRef<typeof DrawerPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DrawerPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\r\n\r\nexport {\r\n Drawer,\r\n DrawerClose,\r\n DrawerContent,\r\n DrawerDescription,\r\n DrawerFooter,\r\n DrawerHeader,\r\n DrawerOverlay,\r\n DrawerPortal,\r\n DrawerTitle,\r\n DrawerTrigger,\r\n};\r\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","cn","DrawerContent","children","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;AAOA,MAAMA,gBAAS,CAAC,EAACC,wBAAwB,IAAI,EAAE,GAAGC,OAAyD,iBACzG,IAACC,OAAAA,IAAoB;QACnB,uBAAuBF;QACtB,GAAGC,KAAK;;AAGbF,cAAO,WAAW,GAAG;AAErB,MAAMI,gBAAgBD,OAAAA,OAAuB;AAE7C,MAAME,eAAeF,OAAAA,MAAsB;AAE3C,MAAMG,cAAcH,OAAAA,KAAqB;AAEzC,MAAMI,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGP,OAAM,EAAEQ,MAAAA,WAAAA,GACxB,IAACP,OAAAA,OAAuB;QACtB,KAAKO;QACL,WAAWC,GAAG,kCAAkCF;QAC/C,GAAGP,KAAK;;AAGbK,cAAc,WAAW,GAAGJ,OAAAA,OAAAA,CAAAA,WAAmC;AAE/D,MAAMS,gBAAgB,WAAhBA,GAAgBJ,WAGpB,CAAC,EAACC,SAAS,EAAEI,QAAQ,EAAE,GAAGX,OAAM,EAAEQ,MAAAA,WAAAA,GAClC,KAACL,cAAAA;;0BACC,IAACE,eAAAA,CAAAA;0BACD,KAACJ,OAAAA,OAAuB;gBACtB,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