@campxdev/react-blueprint 3.0.0-alpha.9 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as RechartsPrimitive from "recharts";
1
+ import * as React from 'react';
2
+ import * as RechartsPrimitive from 'recharts';
3
3
  declare const THEMES: {
4
4
  readonly light: "";
5
5
  readonly dark: ".dark";
@@ -16,25 +16,25 @@ export type ChartConfig = {
16
16
  theme: Record<keyof typeof THEMES, string>;
17
17
  });
18
18
  };
19
- declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
19
+ declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<'div'> & {
20
20
  config: ChartConfig;
21
- children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
21
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
22
22
  }): import("react/jsx-runtime").JSX.Element;
23
23
  declare const ChartStyle: ({ id, config }: {
24
24
  id: string;
25
25
  config: ChartConfig;
26
26
  }) => import("react/jsx-runtime").JSX.Element;
27
27
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
- declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
28
+ declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<'div'> & {
29
29
  hideLabel?: boolean;
30
30
  hideIndicator?: boolean;
31
- indicator?: "line" | "dot" | "dashed";
31
+ indicator?: 'line' | 'dot' | 'dashed';
32
32
  nameKey?: string;
33
33
  labelKey?: string;
34
34
  }): import("react/jsx-runtime").JSX.Element;
35
35
  declare const ChartLegend: typeof RechartsPrimitive.Legend;
36
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
36
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {
37
37
  hideIcon?: boolean;
38
38
  nameKey?: string;
39
39
  }): import("react/jsx-runtime").JSX.Element;
40
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
40
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, };
@@ -9,7 +9,7 @@ declare function CommandDialog({ title, description, children, className, showCl
9
9
  showCloseButton?: boolean;
10
10
  }): import("react/jsx-runtime").JSX.Element;
11
11
  declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
12
- declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandList({ className, onWheel, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
13
13
  declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
14
14
  declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
15
15
  declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1288,7 +1288,7 @@ interface CardProps extends Omit<React$1.ComponentProps<typeof Card$1>, 'title'
1288
1288
  declare const Card: React$1.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1289
1289
 
1290
1290
  declare const badgeVariants: (props?: ({
1291
- variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
1291
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
1292
1292
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1293
1293
  declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
1294
1294
  asChild?: boolean;
@@ -2076,7 +2076,7 @@ type TooltipProps = {
2076
2076
  declare const Tooltip: ({ children, title, placement, open, defaultOpen, onOpenChange, delayDuration, }: TooltipProps) => react_jsx_runtime.JSX.Element;
2077
2077
 
2078
2078
  declare const buttonVariants: (props?: ({
2079
- variant?: "input" | "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
2079
+ variant?: "input" | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
2080
2080
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
2081
2081
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
2082
2082
 
package/dist/styles.css CHANGED
@@ -1669,6 +1669,9 @@
1669
1669
  .pt-4 {
1670
1670
  padding-top: calc(var(--spacing) * 4);
1671
1671
  }
1672
+ .pr-0 {
1673
+ padding-right: calc(var(--spacing) * 0);
1674
+ }
1672
1675
  .pr-1 {
1673
1676
  padding-right: calc(var(--spacing) * 1);
1674
1677
  }
@@ -1987,10 +1990,6 @@
1987
1990
  --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1988
1991
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1989
1992
  }
1990
- .shadow-sm {
1991
- --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1992
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1993
- }
1994
1993
  .shadow-xl {
1995
1994
  --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1996
1995
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "3.0.0-alpha.9",
3
+ "version": "3.0.0",
4
4
  "description": "React UI component library for CampX applications",
5
5
  "author": "CampX",
6
6
  "license": "MIT",
@@ -73,11 +73,11 @@ const TableActionHeader = ({
73
73
 
74
74
  {/* Tablet & Desktop: Icon + Text */}
75
75
  <Button
76
- variant="default"
76
+ variant="link"
77
77
  size="sm"
78
78
  onClick={open}
79
79
  startIcon={<Plus />}
80
- className="hidden md:flex"
80
+ className="hidden hover:no-underline md:flex"
81
81
  >
82
82
  Add View
83
83
  </Button>
@@ -47,7 +47,7 @@ export const LabelWrapper = ({
47
47
  {typeof label === 'string' ? (
48
48
  <Label htmlFor={name}>
49
49
  {label}
50
- {required && <span className="text-destructive ml-1">*</span>}
50
+ {required && <span className="text-destructive">*</span>}
51
51
  </Label>
52
52
  ) : (
53
53
  label
@@ -106,7 +106,7 @@ const Dialog = ({
106
106
  showCloseButton={showCloseButton}
107
107
  >
108
108
  {title && (
109
- <DialogHeader className="pl-4 py-4 border-b">
109
+ <DialogHeader className="p-4 pr-0 border-b">
110
110
  <ShadcnDialogTitle>{title}</ShadcnDialogTitle>
111
111
  </DialogHeader>
112
112
  )}
@@ -135,7 +135,7 @@ export const DialogButton = ({
135
135
  showCloseButton={showCloseButton}
136
136
  >
137
137
  {title && (
138
- <DialogHeader className="pl-4 pt-4 border-b">
138
+ <DialogHeader className="p-4 pr-0 border-b">
139
139
  <ShadcnDialogTitle>{title}</ShadcnDialogTitle>
140
140
  </DialogHeader>
141
141
  )}
@@ -1,35 +1,35 @@
1
- import * as React from "react"
2
- import * as RechartsPrimitive from "recharts"
1
+ import * as React from 'react';
2
+ import * as RechartsPrimitive from 'recharts';
3
3
 
4
- import { cn } from "@/lib/utils"
4
+ import { cn } from '@/lib/utils';
5
5
 
6
6
  // Format: { THEME_NAME: CSS_SELECTOR }
7
- const THEMES = { light: "", dark: ".dark" } as const
7
+ const THEMES = { light: '', dark: '.dark' } as const;
8
8
 
9
9
  export type ChartConfig = {
10
10
  [k in string]: {
11
- label?: React.ReactNode
12
- icon?: React.ComponentType
11
+ label?: React.ReactNode;
12
+ icon?: React.ComponentType;
13
13
  } & (
14
14
  | { color?: string; theme?: never }
15
15
  | { color?: never; theme: Record<keyof typeof THEMES, string> }
16
- )
17
- }
16
+ );
17
+ };
18
18
 
19
19
  type ChartContextProps = {
20
- config: ChartConfig
21
- }
20
+ config: ChartConfig;
21
+ };
22
22
 
23
- const ChartContext = React.createContext<ChartContextProps | null>(null)
23
+ const ChartContext = React.createContext<ChartContextProps | null>(null);
24
24
 
25
25
  function useChart() {
26
- const context = React.useContext(ChartContext)
26
+ const context = React.useContext(ChartContext);
27
27
 
28
28
  if (!context) {
29
- throw new Error("useChart must be used within a <ChartContainer />")
29
+ throw new Error('useChart must be used within a <ChartContainer />');
30
30
  }
31
31
 
32
- return context
32
+ return context;
33
33
  }
34
34
 
35
35
  function ChartContainer({
@@ -38,14 +38,14 @@ function ChartContainer({
38
38
  children,
39
39
  config,
40
40
  ...props
41
- }: React.ComponentProps<"div"> & {
42
- config: ChartConfig
41
+ }: React.ComponentProps<'div'> & {
42
+ config: ChartConfig;
43
43
  children: React.ComponentProps<
44
44
  typeof RechartsPrimitive.ResponsiveContainer
45
- >["children"]
45
+ >['children'];
46
46
  }) {
47
- const uniqueId = React.useId()
48
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`
47
+ const uniqueId = React.useId();
48
+ const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;
49
49
 
50
50
  return (
51
51
  <ChartContext.Provider value={{ config }}>
@@ -54,7 +54,7 @@ function ChartContainer({
54
54
  data-chart={chartId}
55
55
  className={cn(
56
56
  "[&_.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",
57
- className
57
+ className,
58
58
  )}
59
59
  {...props}
60
60
  >
@@ -64,16 +64,16 @@ function ChartContainer({
64
64
  </RechartsPrimitive.ResponsiveContainer>
65
65
  </div>
66
66
  </ChartContext.Provider>
67
- )
67
+ );
68
68
  }
69
69
 
70
70
  const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
71
71
  const colorConfig = Object.entries(config).filter(
72
- ([, config]) => config.theme || config.color
73
- )
72
+ ([, config]) => config.theme || config.color,
73
+ );
74
74
 
75
75
  if (!colorConfig.length) {
76
- return null
76
+ return null;
77
77
  }
78
78
 
79
79
  return (
@@ -87,26 +87,26 @@ ${colorConfig
87
87
  .map(([key, itemConfig]) => {
88
88
  const color =
89
89
  itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
90
- itemConfig.color
91
- return color ? ` --color-${key}: ${color};` : null
90
+ itemConfig.color;
91
+ return color ? ` --color-${key}: ${color};` : null;
92
92
  })
93
- .join("\n")}
93
+ .join('\n')}
94
94
  }
95
- `
95
+ `,
96
96
  )
97
- .join("\n"),
97
+ .join('\n'),
98
98
  }}
99
99
  />
100
- )
101
- }
100
+ );
101
+ };
102
102
 
103
- const ChartTooltip = RechartsPrimitive.Tooltip
103
+ const ChartTooltip = RechartsPrimitive.Tooltip;
104
104
 
105
105
  function ChartTooltipContent({
106
106
  active,
107
107
  payload,
108
108
  className,
109
- indicator = "dot",
109
+ indicator = 'dot',
110
110
  hideLabel = false,
111
111
  hideIndicator = false,
112
112
  label,
@@ -117,41 +117,41 @@ function ChartTooltipContent({
117
117
  nameKey,
118
118
  labelKey,
119
119
  }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
120
- React.ComponentProps<"div"> & {
121
- hideLabel?: boolean
122
- hideIndicator?: boolean
123
- indicator?: "line" | "dot" | "dashed"
124
- nameKey?: string
125
- labelKey?: string
120
+ React.ComponentProps<'div'> & {
121
+ hideLabel?: boolean;
122
+ hideIndicator?: boolean;
123
+ indicator?: 'line' | 'dot' | 'dashed';
124
+ nameKey?: string;
125
+ labelKey?: string;
126
126
  }) {
127
- const { config } = useChart()
127
+ const { config } = useChart();
128
128
 
129
129
  const tooltipLabel = React.useMemo(() => {
130
130
  if (hideLabel || !payload?.length) {
131
- return null
131
+ return null;
132
132
  }
133
133
 
134
- const [item] = payload
135
- const key = `${labelKey || item?.dataKey || item?.name || "value"}`
136
- const itemConfig = getPayloadConfigFromPayload(config, item, key)
134
+ const [item] = payload;
135
+ const key = `${item?.name || labelKey || item?.dataKey || 'value'}`;
136
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
137
137
  const value =
138
- !labelKey && typeof label === "string"
138
+ !labelKey && typeof label === 'string'
139
139
  ? config[label as keyof typeof config]?.label || label
140
- : itemConfig?.label
140
+ : itemConfig?.label;
141
141
 
142
142
  if (labelFormatter) {
143
143
  return (
144
- <div className={cn("font-medium", labelClassName)}>
144
+ <div className={cn('font-medium', labelClassName)}>
145
145
  {labelFormatter(value, payload)}
146
146
  </div>
147
- )
147
+ );
148
148
  }
149
149
 
150
150
  if (!value) {
151
- return null
151
+ return null;
152
152
  }
153
153
 
154
- return <div className={cn("font-medium", labelClassName)}>{value}</div>
154
+ return <div className={cn('font-medium', labelClassName)}>{value}</div>;
155
155
  }, [
156
156
  label,
157
157
  labelFormatter,
@@ -160,36 +160,36 @@ function ChartTooltipContent({
160
160
  labelClassName,
161
161
  config,
162
162
  labelKey,
163
- ])
163
+ ]);
164
164
 
165
165
  if (!active || !payload?.length) {
166
- return null
166
+ return null;
167
167
  }
168
168
 
169
- const nestLabel = payload.length === 1 && indicator !== "dot"
169
+ const nestLabel = payload.length === 1 && indicator !== 'dot';
170
170
 
171
171
  return (
172
172
  <div
173
173
  className={cn(
174
- "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",
175
- className
174
+ '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',
175
+ className,
176
176
  )}
177
177
  >
178
178
  {!nestLabel ? tooltipLabel : null}
179
179
  <div className="grid gap-1.5">
180
180
  {payload
181
- .filter((item) => item.type !== "none")
181
+ .filter((item) => item.type !== 'none')
182
182
  .map((item, index) => {
183
- const key = `${nameKey || item.name || item.dataKey || "value"}`
184
- const itemConfig = getPayloadConfigFromPayload(config, item, key)
185
- const indicatorColor = color || item.payload.fill || item.color
183
+ const key = `${nameKey || item.name || item.dataKey || 'value'}`;
184
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
185
+ const indicatorColor = color || item.payload.fill || item.color;
186
186
 
187
187
  return (
188
188
  <div
189
189
  key={item.dataKey}
190
190
  className={cn(
191
- "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
192
- indicator === "dot" && "items-center"
191
+ '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',
192
+ indicator === 'dot' && 'items-center',
193
193
  )}
194
194
  >
195
195
  {formatter && item?.value !== undefined && item.name ? (
@@ -202,19 +202,19 @@ function ChartTooltipContent({
202
202
  !hideIndicator && (
203
203
  <div
204
204
  className={cn(
205
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
205
+ 'shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)',
206
206
  {
207
- "h-2.5 w-2.5": indicator === "dot",
208
- "w-1": indicator === "line",
209
- "w-0 border-[1.5px] border-dashed bg-transparent":
210
- indicator === "dashed",
211
- "my-0.5": nestLabel && indicator === "dashed",
212
- }
207
+ 'h-2.5 w-2.5': indicator === 'dot',
208
+ 'w-1': indicator === 'line',
209
+ 'w-0 border-[1.5px] border-dashed bg-transparent':
210
+ indicator === 'dashed',
211
+ 'my-0.5': nestLabel && indicator === 'dashed',
212
+ },
213
213
  )}
214
214
  style={
215
215
  {
216
- "--color-bg": indicatorColor,
217
- "--color-border": indicatorColor,
216
+ '--color-bg': indicatorColor,
217
+ '--color-border': indicatorColor,
218
218
  } as React.CSSProperties
219
219
  }
220
220
  />
@@ -222,8 +222,8 @@ function ChartTooltipContent({
222
222
  )}
223
223
  <div
224
224
  className={cn(
225
- "flex flex-1 justify-between leading-none",
226
- nestLabel ? "items-end" : "items-center"
225
+ 'flex flex-1 justify-between leading-none',
226
+ nestLabel ? 'items-end' : 'items-center',
227
227
  )}
228
228
  >
229
229
  <div className="grid gap-1.5">
@@ -241,51 +241,51 @@ function ChartTooltipContent({
241
241
  </>
242
242
  )}
243
243
  </div>
244
- )
244
+ );
245
245
  })}
246
246
  </div>
247
247
  </div>
248
- )
248
+ );
249
249
  }
250
250
 
251
- const ChartLegend = RechartsPrimitive.Legend
251
+ const ChartLegend = RechartsPrimitive.Legend;
252
252
 
253
253
  function ChartLegendContent({
254
254
  className,
255
255
  hideIcon = false,
256
256
  payload,
257
- verticalAlign = "bottom",
257
+ verticalAlign = 'bottom',
258
258
  nameKey,
259
- }: React.ComponentProps<"div"> &
260
- Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
261
- hideIcon?: boolean
262
- nameKey?: string
259
+ }: React.ComponentProps<'div'> &
260
+ Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {
261
+ hideIcon?: boolean;
262
+ nameKey?: string;
263
263
  }) {
264
- const { config } = useChart()
264
+ const { config } = useChart();
265
265
 
266
266
  if (!payload?.length) {
267
- return null
267
+ return null;
268
268
  }
269
269
 
270
270
  return (
271
271
  <div
272
272
  className={cn(
273
- "flex flex-wrap items-center justify-center gap-4",
274
- verticalAlign === "top" ? "pb-3" : "pt-3",
275
- className
273
+ 'flex flex-wrap items-center justify-center gap-4',
274
+ verticalAlign === 'top' ? 'pb-3' : 'pt-3',
275
+ className,
276
276
  )}
277
277
  >
278
278
  {payload
279
- .filter((item) => item.type !== "none")
279
+ .filter((item) => item.type !== 'none')
280
280
  .map((item) => {
281
- const key = `${nameKey || item.dataKey || "value"}`
282
- const itemConfig = getPayloadConfigFromPayload(config, item, key)
281
+ const key = `${nameKey || item.dataKey || 'value'}`;
282
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
283
283
 
284
284
  return (
285
285
  <div
286
286
  key={item.value}
287
287
  className={cn(
288
- "[&>svg]:text-muted-foreground flex items-center gap-1.5 whitespace-nowrap [&>svg]:h-3 [&>svg]:w-3"
288
+ '[&>svg]:text-muted-foreground flex items-center gap-1.5 whitespace-nowrap [&>svg]:h-3 [&>svg]:w-3',
289
289
  )}
290
290
  >
291
291
  {itemConfig?.icon && !hideIcon ? (
@@ -300,56 +300,56 @@ function ChartLegendContent({
300
300
  )}
301
301
  {itemConfig?.label}
302
302
  </div>
303
- )
303
+ );
304
304
  })}
305
305
  </div>
306
- )
306
+ );
307
307
  }
308
308
 
309
309
  // Helper to extract item config from a payload.
310
310
  function getPayloadConfigFromPayload(
311
311
  config: ChartConfig,
312
312
  payload: unknown,
313
- key: string
313
+ key: string,
314
314
  ) {
315
- if (typeof payload !== "object" || payload === null) {
316
- return undefined
315
+ if (typeof payload !== 'object' || payload === null) {
316
+ return undefined;
317
317
  }
318
318
 
319
319
  const payloadPayload =
320
- "payload" in payload &&
321
- typeof payload.payload === "object" &&
320
+ 'payload' in payload &&
321
+ typeof payload.payload === 'object' &&
322
322
  payload.payload !== null
323
323
  ? payload.payload
324
- : undefined
324
+ : undefined;
325
325
 
326
- let configLabelKey: string = key
326
+ let configLabelKey: string = key;
327
327
 
328
328
  if (
329
329
  key in payload &&
330
- typeof payload[key as keyof typeof payload] === "string"
330
+ typeof payload[key as keyof typeof payload] === 'string'
331
331
  ) {
332
- configLabelKey = payload[key as keyof typeof payload] as string
332
+ configLabelKey = payload[key as keyof typeof payload] as string;
333
333
  } else if (
334
334
  payloadPayload &&
335
335
  key in payloadPayload &&
336
- typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
336
+ typeof payloadPayload[key as keyof typeof payloadPayload] === 'string'
337
337
  ) {
338
338
  configLabelKey = payloadPayload[
339
339
  key as keyof typeof payloadPayload
340
- ] as string
340
+ ] as string;
341
341
  }
342
342
 
343
343
  return configLabelKey in config
344
344
  ? config[configLabelKey]
345
- : config[key as keyof typeof config]
345
+ : config[key as keyof typeof config];
346
346
  }
347
347
 
348
348
  export {
349
349
  ChartContainer,
350
- ChartTooltip,
351
- ChartTooltipContent,
352
350
  ChartLegend,
353
351
  ChartLegendContent,
354
352
  ChartStyle,
355
- }
353
+ ChartTooltip,
354
+ ChartTooltipContent,
355
+ };
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<'div'>) {
7
7
  <div
8
8
  data-slot="card"
9
9
  className={cn(
10
- 'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
10
+ 'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 ',
11
11
  className,
12
12
  )}
13
13
  {...props}
@@ -82,11 +82,16 @@ function CommandInput({
82
82
 
83
83
  function CommandList({
84
84
  className,
85
+ onWheel,
85
86
  ...props
86
87
  }: React.ComponentProps<typeof CommandPrimitive.List>) {
87
88
  return (
88
89
  <CommandPrimitive.List
89
90
  data-slot="command-list"
91
+ onWheel={(e) => {
92
+ e.stopPropagation();
93
+ onWheel?.(e);
94
+ }}
90
95
  className={cn(
91
96
  'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',
92
97
  className,
@@ -11,7 +11,7 @@ function Label({
11
11
  <LabelPrimitive.Root
12
12
  data-slot="label"
13
13
  className={cn(
14
- 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
14
+ 'flex items-center text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
15
15
  className,
16
16
  )}
17
17
  {...props}