@codefast/ui 0.3.10 → 0.3.11-canary.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.
- package/CHANGELOG.md +19 -0
- package/README.md +277 -167
- package/dist/components/accordion.cjs +5 -5
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +5 -5
- package/dist/components/alert-dialog.cjs +9 -9
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +9 -9
- package/dist/components/alert.cjs +5 -5
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +5 -5
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/avatar.cjs +3 -3
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.cjs +7 -7
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +7 -7
- package/dist/components/breadcrumb.cjs +6 -8
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +6 -8
- package/dist/components/button-group.cjs +8 -8
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +8 -8
- package/dist/components/button.cjs +17 -17
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +17 -17
- package/dist/components/calendar.cjs +35 -35
- package/dist/components/calendar.d.ts +5 -5
- package/dist/components/calendar.js +35 -35
- package/dist/components/card.cjs +7 -7
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +7 -7
- package/dist/components/carousel.cjs +20 -20
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +20 -20
- package/dist/components/chart.cjs +42 -42
- package/dist/components/chart.d.ts +12 -11
- package/dist/components/chart.js +42 -42
- package/dist/components/checkbox-cards.cjs +2 -2
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +2 -2
- package/dist/components/checkbox-group.cjs +2 -2
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/command.cjs +10 -10
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +10 -10
- package/dist/components/context-menu.cjs +10 -10
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +10 -10
- package/dist/components/dialog.cjs +12 -12
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.cjs +9 -9
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +9 -9
- package/dist/components/dropdown-menu.cjs +10 -10
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +10 -10
- package/dist/components/empty.cjs +10 -10
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +10 -10
- package/dist/components/field.cjs +17 -17
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +17 -17
- package/dist/components/form.cjs +8 -8
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +8 -8
- package/dist/components/hover-card.cjs +3 -3
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +3 -3
- package/dist/components/input-group.cjs +20 -20
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +20 -20
- package/dist/components/input-number.cjs +7 -7
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +7 -7
- package/dist/components/input-otp.cjs +4 -4
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +4 -4
- package/dist/components/input-password.cjs +6 -6
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +6 -6
- package/dist/components/input-search.cjs +4 -4
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +4 -4
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.cjs +23 -23
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +23 -23
- package/dist/components/kbd.cjs +2 -2
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +2 -2
- package/dist/components/label.cjs +1 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.cjs +13 -13
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +13 -13
- package/dist/components/native-select.cjs +2 -2
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.cjs +10 -10
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +10 -10
- package/dist/components/pagination.cjs +6 -6
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +6 -6
- package/dist/components/popover.cjs +3 -3
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +3 -3
- package/dist/components/progress-circle.cjs +22 -22
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +22 -22
- package/dist/components/progress.cjs +2 -2
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-cards.cjs +3 -3
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +3 -3
- package/dist/components/radio-group.cjs +3 -3
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.cjs +1 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +1 -1
- package/dist/components/resizable.cjs +3 -3
- package/dist/components/resizable.d.ts +2 -2
- package/dist/components/resizable.js +3 -3
- package/dist/components/scroll-area.cjs +31 -31
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +31 -31
- package/dist/components/select.cjs +9 -9
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +9 -9
- package/dist/components/separator.cjs +9 -9
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +9 -9
- package/dist/components/sheet.cjs +17 -17
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +17 -17
- package/dist/components/sidebar.cjs +65 -65
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +65 -65
- package/dist/components/skeleton.cjs +1 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.cjs +4 -4
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +4 -4
- package/dist/components/sonner.cjs +4 -4
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +4 -4
- package/dist/components/spinner.cjs +5 -5
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +5 -5
- package/dist/components/switch.cjs +2 -2
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.cjs +8 -8
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +8 -8
- package/dist/components/tabs.cjs +4 -4
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.cjs +5 -5
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +5 -5
- package/dist/components/toggle.cjs +8 -8
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +8 -8
- package/dist/components/tooltip.cjs +2 -2
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +2 -2
- package/dist/css/preset.css +4 -4
- package/dist/css/style.css +3 -3
- package/dist/hooks/use-copy-to-clipboard.cjs +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-media-query.cjs +3 -3
- package/dist/hooks/use-media-query.js +3 -3
- package/dist/hooks/use-mutation-observer.d.ts +1 -1
- package/dist/hooks/use-pagination.cjs +1 -1
- package/dist/hooks/use-pagination.js +1 -1
- package/dist/index.d.ts +130 -130
- package/dist/primitives/checkbox-group.cjs +3 -3
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +3 -3
- package/dist/primitives/input-number.cjs +46 -46
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +46 -46
- package/dist/primitives/input.cjs +7 -7
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +7 -7
- package/dist/primitives/progress-circle.cjs +8 -8
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +8 -8
- package/package.json +38 -42
package/dist/components/chart.js
CHANGED
|
@@ -5,10 +5,10 @@ import { createContextScope } from "@radix-ui/react-context";
|
|
|
5
5
|
import { useId, useMemo } from "react";
|
|
6
6
|
import { Legend, ResponsiveContainer, Tooltip } from "recharts";
|
|
7
7
|
const THEMES = {
|
|
8
|
-
dark:
|
|
9
|
-
light:
|
|
8
|
+
dark: ".dark",
|
|
9
|
+
light: ""
|
|
10
10
|
};
|
|
11
|
-
const CHART_PROVIDER_NAME =
|
|
11
|
+
const CHART_PROVIDER_NAME = "ChartProvider";
|
|
12
12
|
const [createChartContext, createChartScope] = createContextScope(CHART_PROVIDER_NAME);
|
|
13
13
|
const [ChartContextProvider, useChartContext] = createChartContext(CHART_PROVIDER_NAME);
|
|
14
14
|
function ChartContainer({ __scopeChart, children, className, config, id, ...props }) {
|
|
@@ -18,7 +18,7 @@ function ChartContainer({ __scopeChart, children, className, config, id, ...prop
|
|
|
18
18
|
config: config,
|
|
19
19
|
scope: __scopeChart,
|
|
20
20
|
children: /*#__PURE__*/ jsxs("div", {
|
|
21
|
-
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
|
|
21
|
+
className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
|
|
22
22
|
"data-chart": chartId,
|
|
23
23
|
"data-slot": "chart",
|
|
24
24
|
...props,
|
|
@@ -44,22 +44,22 @@ function ChartStyle({ config, id }) {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
const ChartTooltip = Tooltip;
|
|
47
|
-
const CHART_TOOLTIP_CONTENT_NAME =
|
|
48
|
-
function ChartTooltipContent({ __scopeChart, active, className, color, formatter, hideIndicator = false, hideLabel = false, indicator =
|
|
47
|
+
const CHART_TOOLTIP_CONTENT_NAME = "ChartTooltipContent";
|
|
48
|
+
function ChartTooltipContent({ __scopeChart, active, className, color, formatter, hideIndicator = false, hideLabel = false, indicator = "dot", label, labelClassName, labelFormatter, labelKey, nameKey, payload = [] }) {
|
|
49
49
|
const { config } = useChartContext(CHART_TOOLTIP_CONTENT_NAME, __scopeChart);
|
|
50
50
|
const tooltipLabel = useMemo(()=>{
|
|
51
51
|
if (hideLabel || 0 === payload.length) return null;
|
|
52
52
|
const [item] = payload;
|
|
53
|
-
const key = safeToString(labelKey ?? item.dataKey ?? item.name ??
|
|
53
|
+
const key = safeToString(labelKey ?? item.dataKey ?? item.name ?? "value");
|
|
54
54
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
55
|
-
const value = labelKey ||
|
|
55
|
+
const value = labelKey || "string" != typeof label ? itemConfig?.label : label in config ? config[label].label ?? label : label;
|
|
56
56
|
if (labelFormatter) return /*#__PURE__*/ jsx("div", {
|
|
57
|
-
className: cn(
|
|
57
|
+
className: cn("font-medium", labelClassName),
|
|
58
58
|
children: labelFormatter(value, payload)
|
|
59
59
|
});
|
|
60
60
|
if (!value) return null;
|
|
61
61
|
return /*#__PURE__*/ jsx("div", {
|
|
62
|
-
className: cn(
|
|
62
|
+
className: cn("font-medium", labelClassName),
|
|
63
63
|
children: value
|
|
64
64
|
});
|
|
65
65
|
}, [
|
|
@@ -72,37 +72,37 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
|
|
|
72
72
|
labelKey
|
|
73
73
|
]);
|
|
74
74
|
if (!active || 0 === payload.length) return null;
|
|
75
|
-
const nestLabel = 1 === payload.length &&
|
|
75
|
+
const nestLabel = 1 === payload.length && "dot" !== indicator;
|
|
76
76
|
return /*#__PURE__*/ jsxs("div", {
|
|
77
|
-
className: cn(
|
|
77
|
+
className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
|
|
78
78
|
children: [
|
|
79
79
|
nestLabel ? null : tooltipLabel,
|
|
80
80
|
/*#__PURE__*/ jsx("div", {
|
|
81
81
|
className: "grid gap-1.5",
|
|
82
82
|
children: payload.map((item, index)=>{
|
|
83
|
-
const key = safeToString(nameKey ?? item.name ?? item.dataKey ??
|
|
83
|
+
const key = safeToString(nameKey ?? item.name ?? item.dataKey ?? "value");
|
|
84
84
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
85
|
-
const indicatorColor = color ?? (isRecord(item.payload) &&
|
|
85
|
+
const indicatorColor = color ?? (isRecord(item.payload) && "fill" in item.payload && "string" == typeof item.payload.fill ? item.payload.fill : void 0) ?? item.color;
|
|
86
86
|
return /*#__PURE__*/ jsx("div", {
|
|
87
|
-
className: cn(
|
|
87
|
+
className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5 [&>svg]:text-muted-foreground", "dot" === indicator && "items-center"),
|
|
88
88
|
children: formatter && void 0 !== item.value && item.name ? formatter(item.value, item.name, item, index, [
|
|
89
89
|
item
|
|
90
90
|
]) : /*#__PURE__*/ jsxs(Fragment, {
|
|
91
91
|
children: [
|
|
92
92
|
itemConfig?.icon ? /*#__PURE__*/ jsx(itemConfig.icon, {}) : !hideIndicator && /*#__PURE__*/ jsx("div", {
|
|
93
|
-
className: cn(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
className: cn("shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)", {
|
|
94
|
+
"h-2.5 w-2.5": "dot" === indicator,
|
|
95
|
+
"my-0.5": nestLabel && "dashed" === indicator,
|
|
96
|
+
"border-1.5 w-0 border-dashed bg-transparent": "dashed" === indicator,
|
|
97
|
+
"w-1": "line" === indicator
|
|
98
98
|
}),
|
|
99
99
|
style: {
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
"--color-bg": indicatorColor,
|
|
101
|
+
"--color-border": indicatorColor
|
|
102
102
|
}
|
|
103
103
|
}),
|
|
104
104
|
/*#__PURE__*/ jsxs("div", {
|
|
105
|
-
className: cn(
|
|
105
|
+
className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
|
|
106
106
|
children: [
|
|
107
107
|
/*#__PURE__*/ jsxs("div", {
|
|
108
108
|
className: "grid gap-1.5",
|
|
@@ -115,8 +115,8 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
|
|
|
115
115
|
]
|
|
116
116
|
}),
|
|
117
117
|
null != item.value && /*#__PURE__*/ jsx("span", {
|
|
118
|
-
className: "
|
|
119
|
-
children:
|
|
118
|
+
className: "font-mono font-medium text-foreground tabular-nums",
|
|
119
|
+
children: "number" == typeof item.value ? item.value.toLocaleString() : safeToString(item.value)
|
|
120
120
|
})
|
|
121
121
|
]
|
|
122
122
|
})
|
|
@@ -129,19 +129,19 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
const ChartLegend = Legend;
|
|
132
|
-
const CHART_LEGEND_CONTENT_NAME =
|
|
133
|
-
function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey, payload, verticalAlign =
|
|
132
|
+
const CHART_LEGEND_CONTENT_NAME = "ChartLegendContent";
|
|
133
|
+
function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey, payload, verticalAlign = "bottom" }) {
|
|
134
134
|
const { config } = useChartContext(CHART_LEGEND_CONTENT_NAME, __scopeChart);
|
|
135
135
|
if (!payload?.length) return null;
|
|
136
136
|
return /*#__PURE__*/ jsx("div", {
|
|
137
|
-
className: cn(
|
|
137
|
+
className: cn("flex items-center justify-center gap-4", "top" === verticalAlign ? "pb-3" : "pt-3", className),
|
|
138
138
|
children: payload.map((item)=>{
|
|
139
|
-
let key =
|
|
139
|
+
let key = "value";
|
|
140
140
|
if (nameKey) key = nameKey;
|
|
141
141
|
else if (null != item.dataKey) key = safeToString(item.dataKey);
|
|
142
142
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
143
143
|
return /*#__PURE__*/ jsxs("div", {
|
|
144
|
-
className: cn(
|
|
144
|
+
className: cn("flex items-center gap-1.5 [&>svg]:size-3 [&>svg]:text-muted-foreground"),
|
|
145
145
|
children: [
|
|
146
146
|
itemConfig?.icon && !hideIcon ? /*#__PURE__*/ jsx(itemConfig.icon, {}) : /*#__PURE__*/ jsx("div", {
|
|
147
147
|
className: "size-2 shrink-0 rounded-md",
|
|
@@ -151,27 +151,27 @@ function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey
|
|
|
151
151
|
}),
|
|
152
152
|
itemConfig?.label
|
|
153
153
|
]
|
|
154
|
-
}, nameKey ? safeToString(itemConfig?.color ??
|
|
154
|
+
}, nameKey ? safeToString(itemConfig?.color ?? "") : safeToString(item.value ?? ""));
|
|
155
155
|
})
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
function isRecord(value) {
|
|
159
|
-
return
|
|
159
|
+
return "object" == typeof value && null !== value;
|
|
160
160
|
}
|
|
161
161
|
function getStringValue(record, key) {
|
|
162
162
|
if (key in record) {
|
|
163
163
|
const value = record[key];
|
|
164
|
-
return
|
|
164
|
+
return "string" == typeof value ? value : void 0;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
function safeToString(value) {
|
|
168
|
-
if (
|
|
169
|
-
if (
|
|
170
|
-
if (null == value) return
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
return
|
|
168
|
+
if ("string" == typeof value) return value;
|
|
169
|
+
if ("number" == typeof value) return value.toString();
|
|
170
|
+
if (null == value) return "";
|
|
171
|
+
if ("boolean" == typeof value) return value.toString();
|
|
172
|
+
if ("bigint" == typeof value) return value.toString();
|
|
173
|
+
if ("symbol" == typeof value) return value.toString();
|
|
174
|
+
return "";
|
|
175
175
|
}
|
|
176
176
|
function getPayloadConfigFromPayload(config, payload, key) {
|
|
177
177
|
if (!isRecord(payload)) return;
|
|
@@ -190,10 +190,10 @@ function generateCssVariable(key, itemConfig, theme) {
|
|
|
190
190
|
return color ? ` --color-${key}: ${color};` : null;
|
|
191
191
|
}
|
|
192
192
|
function generateThemeStyles(theme, prefix, id, colorConfig) {
|
|
193
|
-
const cssVariables = colorConfig.map(([key, itemConfig])=>generateCssVariable(key, itemConfig, theme)).filter(Boolean).join(
|
|
193
|
+
const cssVariables = colorConfig.map(([key, itemConfig])=>generateCssVariable(key, itemConfig, theme)).filter(Boolean).join("\n");
|
|
194
194
|
return `${prefix} [data-chart=${id}] {\n${cssVariables}\n}`;
|
|
195
195
|
}
|
|
196
196
|
function generateChartStyles(id, colorConfig) {
|
|
197
|
-
return Object.entries(THEMES).map(([theme, prefix])=>generateThemeStyles(theme, prefix, id, colorConfig)).join(
|
|
197
|
+
return Object.entries(THEMES).map(([theme, prefix])=>generateThemeStyles(theme, prefix, id, colorConfig)).join("\n\n");
|
|
198
198
|
}
|
|
199
199
|
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, createChartScope };
|
|
@@ -41,11 +41,11 @@ function CheckboxCards(props) {
|
|
|
41
41
|
}
|
|
42
42
|
function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
|
|
43
43
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_label_cjs_namespaceObject.Label, {
|
|
44
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
44
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex items-start gap-3 rounded-lg border border-input p-3 transition hover:not-has-disabled:not-has-aria-checked:bg-secondary has-focus-visible:border-ring has-disabled:opacity-50 has-aria-checked:border-primary has-aria-checked:bg-primary/10", className),
|
|
45
45
|
"data-slot": "checkbox-card",
|
|
46
46
|
children: [
|
|
47
47
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.Item, {
|
|
48
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
48
|
+
className: (0, tailwind_variants_namespaceObject.cn)("peer flex size-4 shrink-0 rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40", checkboxClassName),
|
|
49
49
|
"data-slot": "checkbox-card-item",
|
|
50
50
|
...props,
|
|
51
51
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.CheckboxGroupIndicator, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as CheckboxGroupPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as CheckboxGroupPrimitive from "../primitives/checkbox-group";
|
|
3
3
|
type CheckboxCardsProps = ComponentProps<typeof CheckboxGroupPrimitive.Root>;
|
|
4
4
|
declare function CheckboxCards(props: CheckboxCardsProps): JSX.Element;
|
|
5
5
|
interface CheckboxCardsItemProps extends ComponentProps<typeof CheckboxGroupPrimitive.Item> {
|
|
@@ -12,11 +12,11 @@ function CheckboxCards(props) {
|
|
|
12
12
|
}
|
|
13
13
|
function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
|
|
14
14
|
return /*#__PURE__*/ jsxs(Label, {
|
|
15
|
-
className: cn(
|
|
15
|
+
className: cn("flex items-start gap-3 rounded-lg border border-input p-3 transition hover:not-has-disabled:not-has-aria-checked:bg-secondary has-focus-visible:border-ring has-disabled:opacity-50 has-aria-checked:border-primary has-aria-checked:bg-primary/10", className),
|
|
16
16
|
"data-slot": "checkbox-card",
|
|
17
17
|
children: [
|
|
18
18
|
/*#__PURE__*/ jsx(Item, {
|
|
19
|
-
className: cn(
|
|
19
|
+
className: cn("peer flex size-4 shrink-0 rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40", checkboxClassName),
|
|
20
20
|
"data-slot": "checkbox-card-item",
|
|
21
21
|
...props,
|
|
22
22
|
children: /*#__PURE__*/ jsx(CheckboxGroupIndicator, {
|
|
@@ -34,14 +34,14 @@ const external_lucide_react_namespaceObject = require("lucide-react");
|
|
|
34
34
|
const checkbox_group_cjs_namespaceObject = require("../primitives/checkbox-group.cjs");
|
|
35
35
|
function CheckboxGroup({ className, ...props }) {
|
|
36
36
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.Root, {
|
|
37
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
37
|
+
className: (0, tailwind_variants_namespaceObject.cn)("grid gap-2", className),
|
|
38
38
|
"data-slot": "checkbox-group",
|
|
39
39
|
...props
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
function CheckboxGroupItem({ className, ...props }) {
|
|
43
43
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.Item, {
|
|
44
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
44
|
+
className: (0, tailwind_variants_namespaceObject.cn)("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
|
|
45
45
|
"data-slot": "checkbox-group-item",
|
|
46
46
|
...props,
|
|
47
47
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.CheckboxGroupIndicator, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as CheckboxGroupPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as CheckboxGroupPrimitive from "../primitives/checkbox-group";
|
|
3
3
|
type CheckboxGroupProps = ComponentProps<typeof CheckboxGroupPrimitive.Root>;
|
|
4
4
|
declare function CheckboxGroup({ className, ...props }: CheckboxGroupProps): JSX.Element;
|
|
5
5
|
type CheckboxGroupItemProps = ComponentProps<typeof CheckboxGroupPrimitive.Item>;
|
|
@@ -5,14 +5,14 @@ import { CheckIcon } from "lucide-react";
|
|
|
5
5
|
import { CheckboxGroupIndicator, Item, Root } from "../primitives/checkbox-group.js";
|
|
6
6
|
function CheckboxGroup({ className, ...props }) {
|
|
7
7
|
return /*#__PURE__*/ jsx(Root, {
|
|
8
|
-
className: cn(
|
|
8
|
+
className: cn("grid gap-2", className),
|
|
9
9
|
"data-slot": "checkbox-group",
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function CheckboxGroupItem({ className, ...props }) {
|
|
14
14
|
return /*#__PURE__*/ jsx(Item, {
|
|
15
|
-
className: cn(
|
|
15
|
+
className: cn("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
|
|
16
16
|
"data-slot": "checkbox-group-item",
|
|
17
17
|
...props,
|
|
18
18
|
children: /*#__PURE__*/ jsx(CheckboxGroupIndicator, {
|
|
@@ -33,7 +33,7 @@ const react_checkbox_namespaceObject = require("@radix-ui/react-checkbox");
|
|
|
33
33
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
34
34
|
function Checkbox({ className, ...props }) {
|
|
35
35
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Root, {
|
|
36
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
36
|
+
className: (0, tailwind_variants_namespaceObject.cn)("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary aria-checked:focus-visible:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:aria-checked:focus-visible:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
|
|
37
37
|
"data-slot": "checkbox",
|
|
38
38
|
...props,
|
|
39
39
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as CheckboxPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
3
|
type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root>;
|
|
4
4
|
declare function Checkbox({ className, ...props }: CheckboxProps): JSX.Element;
|
|
5
5
|
export { Checkbox };
|
|
@@ -5,7 +5,7 @@ import { Indicator, Root } from "@radix-ui/react-checkbox";
|
|
|
5
5
|
import { CheckIcon } from "lucide-react";
|
|
6
6
|
function Checkbox({ className, ...props }) {
|
|
7
7
|
return /*#__PURE__*/ jsx(Root, {
|
|
8
|
-
className: cn(
|
|
8
|
+
className: cn("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary aria-checked:focus-visible:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:aria-checked:focus-visible:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
|
|
9
9
|
"data-slot": "checkbox",
|
|
10
10
|
...props,
|
|
11
11
|
children: /*#__PURE__*/ jsx(Indicator, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as CollapsiblePrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
3
3
|
type CollapsibleProps = ComponentProps<typeof CollapsiblePrimitive.Root>;
|
|
4
4
|
declare function Collapsible({ ...props }: CollapsibleProps): JSX.Element;
|
|
5
5
|
type CollapsibleTriggerProps = ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>;
|
|
@@ -44,7 +44,7 @@ const external_lucide_react_namespaceObject = require("lucide-react");
|
|
|
44
44
|
const external_dialog_cjs_namespaceObject = require("./dialog.cjs");
|
|
45
45
|
function Command({ className, ...props }) {
|
|
46
46
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command, {
|
|
47
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
47
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col overflow-hidden rounded-[inherit] bg-popover text-popover-foreground outline-hidden", className),
|
|
48
48
|
"data-slot": "command",
|
|
49
49
|
...props
|
|
50
50
|
});
|
|
@@ -68,7 +68,7 @@ function CommandDialog({ children, ...props }) {
|
|
|
68
68
|
]
|
|
69
69
|
}),
|
|
70
70
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Command, {
|
|
71
|
-
className: "[&_[cmdk-group-heading]]:
|
|
71
|
+
className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12",
|
|
72
72
|
children: children
|
|
73
73
|
})
|
|
74
74
|
]
|
|
@@ -85,7 +85,7 @@ function CommandInput({ className, ...props }) {
|
|
|
85
85
|
className: "size-4 shrink-0 opacity-50"
|
|
86
86
|
}),
|
|
87
87
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Input, {
|
|
88
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
88
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex h-10 w-full text-base outline-hidden placeholder:text-muted-foreground disabled:opacity-50 md:text-sm", className),
|
|
89
89
|
"data-slot": "command-input",
|
|
90
90
|
...props
|
|
91
91
|
})
|
|
@@ -94,49 +94,49 @@ function CommandInput({ className, ...props }) {
|
|
|
94
94
|
}
|
|
95
95
|
function CommandList({ className, ...props }) {
|
|
96
96
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.List, {
|
|
97
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
97
|
+
className: (0, tailwind_variants_namespaceObject.cn)("max-h-75 overflow-x-hidden overflow-y-auto", className),
|
|
98
98
|
"data-slot": "command-list",
|
|
99
99
|
...props
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
function CommandEmpty({ className, ...props }) {
|
|
103
103
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Empty, {
|
|
104
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
104
|
+
className: (0, tailwind_variants_namespaceObject.cn)("py-6 text-center text-sm", className),
|
|
105
105
|
"data-slot": "command-empty",
|
|
106
106
|
...props
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
function CommandGroup({ className, ...props }) {
|
|
110
110
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Group, {
|
|
111
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
111
|
+
className: (0, tailwind_variants_namespaceObject.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className),
|
|
112
112
|
"data-slot": "command-group",
|
|
113
113
|
...props
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
function CommandSeparator({ className, ...props }) {
|
|
117
117
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Separator, {
|
|
118
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
118
|
+
className: (0, tailwind_variants_namespaceObject.cn)("-mx-1 h-px bg-border", className),
|
|
119
119
|
"data-slot": "command-separator",
|
|
120
120
|
...props
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
function CommandItem({ className, ...props }) {
|
|
124
124
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Item, {
|
|
125
|
-
className: (0, tailwind_variants_namespaceObject.cn)("
|
|
125
|
+
className: (0, tailwind_variants_namespaceObject.cn)("group/command-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className),
|
|
126
126
|
"data-slot": "command-item",
|
|
127
127
|
...props
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
function CommandLoading({ className, ...props }) {
|
|
131
131
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Loading, {
|
|
132
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
132
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex justify-center p-2", className),
|
|
133
133
|
"data-slot": "command-loading",
|
|
134
134
|
...props
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
function CommandShortcut({ className, ...props }) {
|
|
138
138
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
139
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
139
|
+
className: (0, tailwind_variants_namespaceObject.cn)("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
140
140
|
"data-slot": "command-shortcut",
|
|
141
141
|
...props
|
|
142
142
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import { Command as CommandPrimitive } from
|
|
3
|
-
import { Dialog } from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
+
import { Dialog } from "./dialog";
|
|
4
4
|
type CommandProps = ComponentProps<typeof CommandPrimitive>;
|
|
5
5
|
declare function Command({ className, ...props }: CommandProps): JSX.Element;
|
|
6
6
|
type CommandDialogProps = ComponentProps<typeof Dialog>;
|
|
@@ -19,7 +19,7 @@ type CommandItemProps = ComponentProps<typeof CommandPrimitive.Item>;
|
|
|
19
19
|
declare function CommandItem({ className, ...props }: CommandItemProps): JSX.Element;
|
|
20
20
|
type CommandLoadingProps = ComponentProps<typeof CommandPrimitive.Loading>;
|
|
21
21
|
declare function CommandLoading({ className, ...props }: CommandLoadingProps): JSX.Element;
|
|
22
|
-
type CommandShortcutProps = ComponentProps<
|
|
22
|
+
type CommandShortcutProps = ComponentProps<"span">;
|
|
23
23
|
declare function CommandShortcut({ className, ...props }: CommandShortcutProps): JSX.Element;
|
|
24
24
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, };
|
|
25
25
|
export type { CommandDialogProps, CommandEmptyProps, CommandGroupProps, CommandInputProps, CommandItemProps, CommandListProps, CommandLoadingProps, CommandProps, CommandSeparatorProps, CommandShortcutProps, };
|
|
@@ -7,7 +7,7 @@ import { SearchIcon } from "lucide-react";
|
|
|
7
7
|
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./dialog.js";
|
|
8
8
|
function command_Command({ className, ...props }) {
|
|
9
9
|
return /*#__PURE__*/ jsx(Command, {
|
|
10
|
-
className: cn(
|
|
10
|
+
className: cn("flex flex-col overflow-hidden rounded-[inherit] bg-popover text-popover-foreground outline-hidden", className),
|
|
11
11
|
"data-slot": "command",
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
@@ -31,7 +31,7 @@ function CommandDialog({ children, ...props }) {
|
|
|
31
31
|
]
|
|
32
32
|
}),
|
|
33
33
|
/*#__PURE__*/ jsx(command_Command, {
|
|
34
|
-
className: "[&_[cmdk-group-heading]]:
|
|
34
|
+
className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12",
|
|
35
35
|
children: children
|
|
36
36
|
})
|
|
37
37
|
]
|
|
@@ -48,7 +48,7 @@ function CommandInput({ className, ...props }) {
|
|
|
48
48
|
className: "size-4 shrink-0 opacity-50"
|
|
49
49
|
}),
|
|
50
50
|
/*#__PURE__*/ jsx(Command.Input, {
|
|
51
|
-
className: cn(
|
|
51
|
+
className: cn("flex h-10 w-full text-base outline-hidden placeholder:text-muted-foreground disabled:opacity-50 md:text-sm", className),
|
|
52
52
|
"data-slot": "command-input",
|
|
53
53
|
...props
|
|
54
54
|
})
|
|
@@ -57,49 +57,49 @@ function CommandInput({ className, ...props }) {
|
|
|
57
57
|
}
|
|
58
58
|
function CommandList({ className, ...props }) {
|
|
59
59
|
return /*#__PURE__*/ jsx(Command.List, {
|
|
60
|
-
className: cn(
|
|
60
|
+
className: cn("max-h-75 overflow-x-hidden overflow-y-auto", className),
|
|
61
61
|
"data-slot": "command-list",
|
|
62
62
|
...props
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function CommandEmpty({ className, ...props }) {
|
|
66
66
|
return /*#__PURE__*/ jsx(Command.Empty, {
|
|
67
|
-
className: cn(
|
|
67
|
+
className: cn("py-6 text-center text-sm", className),
|
|
68
68
|
"data-slot": "command-empty",
|
|
69
69
|
...props
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
function CommandGroup({ className, ...props }) {
|
|
73
73
|
return /*#__PURE__*/ jsx(Command.Group, {
|
|
74
|
-
className: cn(
|
|
74
|
+
className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className),
|
|
75
75
|
"data-slot": "command-group",
|
|
76
76
|
...props
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
function CommandSeparator({ className, ...props }) {
|
|
80
80
|
return /*#__PURE__*/ jsx(Command.Separator, {
|
|
81
|
-
className: cn(
|
|
81
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
82
82
|
"data-slot": "command-separator",
|
|
83
83
|
...props
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
function CommandItem({ className, ...props }) {
|
|
87
87
|
return /*#__PURE__*/ jsx(Command.Item, {
|
|
88
|
-
className: cn("
|
|
88
|
+
className: cn("group/command-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className),
|
|
89
89
|
"data-slot": "command-item",
|
|
90
90
|
...props
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
function CommandLoading({ className, ...props }) {
|
|
94
94
|
return /*#__PURE__*/ jsx(Command.Loading, {
|
|
95
|
-
className: cn(
|
|
95
|
+
className: cn("flex justify-center p-2", className),
|
|
96
96
|
"data-slot": "command-loading",
|
|
97
97
|
...props
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
function CommandShortcut({ className, ...props }) {
|
|
101
101
|
return /*#__PURE__*/ jsx("span", {
|
|
102
|
-
className: cn(
|
|
102
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
103
103
|
"data-slot": "command-shortcut",
|
|
104
104
|
...props
|
|
105
105
|
});
|