@surreal-ui/react 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.js +346 -365
  3. package/package.json +2 -2
  4. package/src/components/GlassmorphismAlert.tsx +4 -1
  5. package/src/components/GlassmorphismButton.tsx +1 -1
  6. package/src/components/GlassmorphismEmptyState.tsx +1 -1
  7. package/src/components/GlassmorphismInputGroup.tsx +1 -1
  8. package/src/components/GlassmorphismMenubar.tsx +2 -2
  9. package/src/components/GlassmorphismScrollArea.tsx +1 -1
  10. package/src/components/GlassmorphismTypography.tsx +1 -1
  11. package/src/components/MinimalistAccordion.tsx +9 -9
  12. package/src/components/MinimalistAlert.tsx +4 -1
  13. package/src/components/MinimalistAlertDialog.tsx +44 -43
  14. package/src/components/MinimalistAspectRatio.tsx +2 -2
  15. package/src/components/MinimalistAvatar.tsx +13 -13
  16. package/src/components/MinimalistBadge.tsx +7 -7
  17. package/src/components/MinimalistBreadcrumb.tsx +6 -2
  18. package/src/components/MinimalistButton.tsx +7 -7
  19. package/src/components/MinimalistButtonGroup.tsx +28 -27
  20. package/src/components/MinimalistCalendar.tsx +16 -13
  21. package/src/components/MinimalistCard.tsx +1 -1
  22. package/src/components/MinimalistCarousel.tsx +12 -12
  23. package/src/components/MinimalistChart.tsx +15 -15
  24. package/src/components/MinimalistCheckbox.tsx +4 -4
  25. package/src/components/MinimalistCodeBlock.tsx +16 -16
  26. package/src/components/MinimalistCollapsible.tsx +2 -2
  27. package/src/components/MinimalistCommand.tsx +21 -21
  28. package/src/components/MinimalistContextMenu.tsx +50 -42
  29. package/src/components/MinimalistDialog.tsx +12 -8
  30. package/src/components/MinimalistDrawer.tsx +10 -6
  31. package/src/components/MinimalistDropdownMenu.tsx +67 -67
  32. package/src/components/MinimalistEmpty.tsx +8 -8
  33. package/src/components/MinimalistEmptyState.tsx +1 -1
  34. package/src/components/MinimalistField.tsx +26 -26
  35. package/src/components/MinimalistForm.tsx +17 -15
  36. package/src/components/MinimalistHoverCard.tsx +2 -2
  37. package/src/components/MinimalistInput.tsx +3 -3
  38. package/src/components/MinimalistInputGroup.tsx +21 -21
  39. package/src/components/MinimalistInputOtp.tsx +9 -9
  40. package/src/components/MinimalistItem.tsx +18 -17
  41. package/src/components/MinimalistKbd.tsx +3 -3
  42. package/src/components/MinimalistLabel.tsx +2 -2
  43. package/src/components/MinimalistMenubar.tsx +14 -14
  44. package/src/components/MinimalistNativeSelect.tsx +3 -3
  45. package/src/components/MinimalistNavigationMenu.tsx +8 -8
  46. package/src/components/MinimalistPagination.tsx +9 -9
  47. package/src/components/MinimalistPopover.tsx +20 -19
  48. package/src/components/MinimalistProgress.tsx +2 -2
  49. package/src/components/MinimalistRadioGroup.tsx +3 -3
  50. package/src/components/MinimalistRangeCalendar.tsx +15 -15
  51. package/src/components/MinimalistResizable.tsx +2 -2
  52. package/src/components/MinimalistScrollArea.tsx +1 -1
  53. package/src/components/MinimalistSelect.tsx +28 -31
  54. package/src/components/MinimalistSeparator.tsx +5 -5
  55. package/src/components/MinimalistSheet.tsx +13 -13
  56. package/src/components/MinimalistSidebar.tsx +73 -72
  57. package/src/components/MinimalistSkeleton.tsx +1 -1
  58. package/src/components/MinimalistSlider.tsx +8 -8
  59. package/src/components/MinimalistSonner.tsx +4 -4
  60. package/src/components/MinimalistSpinner.tsx +3 -3
  61. package/src/components/MinimalistSwitch.tsx +5 -5
  62. package/src/components/MinimalistTabs.tsx +13 -8
  63. package/src/components/MinimalistTextarea.tsx +3 -3
  64. package/src/components/MinimalistToggle.tsx +8 -8
  65. package/src/components/MinimalistToggleGroup.tsx +18 -17
  66. package/src/components/MinimalistTooltip.tsx +7 -7
  67. package/src/components/MinimalistTypography.tsx +1 -1
  68. package/src/components/NeubrutalismCard.tsx +82 -1
  69. package/src/components/ShadcnAccordion.tsx +9 -9
  70. package/src/components/ShadcnAlertDialog.tsx +44 -43
  71. package/src/components/ShadcnAspectRatio.tsx +2 -2
  72. package/src/components/ShadcnAvatar.tsx +13 -13
  73. package/src/components/ShadcnBadge.tsx +7 -7
  74. package/src/components/ShadcnBreadcrumb.tsx +6 -2
  75. package/src/components/ShadcnButton.tsx +7 -7
  76. package/src/components/ShadcnButtonGroup.tsx +28 -27
  77. package/src/components/ShadcnCalendar.tsx +16 -13
  78. package/src/components/ShadcnCarousel.tsx +12 -12
  79. package/src/components/ShadcnChart.tsx +15 -15
  80. package/src/components/ShadcnCheckbox.tsx +4 -4
  81. package/src/components/ShadcnCodeBlock.tsx +16 -16
  82. package/src/components/ShadcnCollapsible.tsx +2 -2
  83. package/src/components/ShadcnCommand.tsx +21 -21
  84. package/src/components/ShadcnContextMenu.tsx +50 -42
  85. package/src/components/ShadcnDialog.tsx +12 -8
  86. package/src/components/ShadcnDrawer.tsx +10 -6
  87. package/src/components/ShadcnDropdownMenu.tsx +67 -67
  88. package/src/components/ShadcnEmpty.tsx +8 -8
  89. package/src/components/ShadcnField.tsx +26 -26
  90. package/src/components/ShadcnForm.tsx +17 -15
  91. package/src/components/ShadcnHoverCard.tsx +2 -2
  92. package/src/components/ShadcnInput.tsx +3 -3
  93. package/src/components/ShadcnInputGroup.tsx +21 -21
  94. package/src/components/ShadcnInputOtp.tsx +9 -9
  95. package/src/components/ShadcnItem.tsx +18 -17
  96. package/src/components/ShadcnKbd.tsx +3 -3
  97. package/src/components/ShadcnLabel.tsx +2 -2
  98. package/src/components/ShadcnMenubar.tsx +14 -14
  99. package/src/components/ShadcnNativeSelect.tsx +3 -3
  100. package/src/components/ShadcnNavigationMenu.tsx +8 -8
  101. package/src/components/ShadcnPagination.tsx +9 -9
  102. package/src/components/ShadcnPopover.tsx +20 -19
  103. package/src/components/ShadcnProgress.tsx +2 -2
  104. package/src/components/ShadcnRadioGroup.tsx +3 -3
  105. package/src/components/ShadcnRangeCalendar.tsx +15 -15
  106. package/src/components/ShadcnSelect.tsx +28 -31
  107. package/src/components/ShadcnSeparator.tsx +5 -5
  108. package/src/components/ShadcnSheet.tsx +13 -13
  109. package/src/components/ShadcnSidebar.tsx +73 -72
  110. package/src/components/ShadcnSkeleton.tsx +1 -1
  111. package/src/components/ShadcnSlider.tsx +8 -8
  112. package/src/components/ShadcnSonner.tsx +4 -4
  113. package/src/components/ShadcnSpinner.tsx +3 -3
  114. package/src/components/ShadcnSwitch.tsx +5 -5
  115. package/src/components/ShadcnTabs.tsx +13 -8
  116. package/src/components/ShadcnTextarea.tsx +3 -3
  117. package/src/components/ShadcnToggle.tsx +8 -8
  118. package/src/components/ShadcnToggleGroup.tsx +18 -17
  119. package/src/components/ShadcnTooltip.tsx +7 -7
@@ -59,7 +59,7 @@ export function SidebarProvider({
59
59
  }
60
60
  document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
61
61
  },
62
- [setOpenProp, open],
62
+ [setOpenProp, open]
63
63
  );
64
64
 
65
65
  React.useEffect(() => {
@@ -96,9 +96,9 @@ export function SidebarProvider({
96
96
  isMobile,
97
97
  openMobile,
98
98
  setOpenMobile,
99
- toggleSidebar,
99
+ toggleSidebar
100
100
  }),
101
- [state, open, setOpen, isMobile, openMobile, toggleSidebar],
101
+ [state, open, setOpen, isMobile, openMobile, toggleSidebar]
102
102
  );
103
103
 
104
104
  return (
@@ -109,12 +109,12 @@ export function SidebarProvider({
109
109
  {
110
110
  '--sidebar-width': SIDEBAR_WIDTH,
111
111
  '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
112
- ...style,
112
+ ...style
113
113
  } as React.CSSProperties
114
114
  }
115
115
  className={cn(
116
116
  'group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',
117
- className,
117
+ className
118
118
  )}
119
119
  {...props}
120
120
  >
@@ -140,7 +140,7 @@ export const ShadcnSidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
140
140
  children,
141
141
  ...props
142
142
  },
143
- ref,
143
+ ref
144
144
  ) => {
145
145
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
146
146
 
@@ -150,7 +150,7 @@ export const ShadcnSidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
150
150
  ref={ref}
151
151
  className={cn(
152
152
  'flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground border-r border-sidebar-border',
153
- className,
153
+ className
154
154
  )}
155
155
  {...props}
156
156
  >
@@ -183,7 +183,7 @@ export const ShadcnSidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
183
183
  : openMobile
184
184
  ? 'right-0 translate-x-0'
185
185
  : 'right-0 translate-x-full',
186
- className,
186
+ className
187
187
  )}
188
188
  style={{ '--sidebar-width': SIDEBAR_WIDTH_MOBILE } as React.CSSProperties}
189
189
  {...props}
@@ -212,7 +212,7 @@ export const ShadcnSidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
212
212
  'group-data-[side=right]:rotate-180',
213
213
  variant === 'floating' || variant === 'inset'
214
214
  ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+theme(spacing.4))]'
215
- : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',
215
+ : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'
216
216
  )}
217
217
  />
218
218
  <div
@@ -225,7 +225,7 @@ export const ShadcnSidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
225
225
  variant === 'floating' || variant === 'inset'
226
226
  ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+theme(spacing.4)+2px)]'
227
227
  : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s border-sidebar-border',
228
- className,
228
+ className
229
229
  )}
230
230
  {...props}
231
231
  >
@@ -239,35 +239,36 @@ export const ShadcnSidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
239
239
  </div>
240
240
  </div>
241
241
  );
242
- },
242
+ }
243
243
  );
244
244
  Sidebar.displayName = 'Sidebar';
245
245
 
246
- export const ShadcnSidebarTrigger = React.forwardRef<HTMLButtonElement, React.ComponentProps<'button'>>(
247
- ({ className, onClick, ...props }, ref) => {
248
- const { toggleSidebar } = useSidebar();
249
- return (
250
- <button
251
- ref={ref}
252
- type="button"
253
- data-sidebar="trigger"
254
- data-slot="sidebar-trigger"
255
- className={cn(
256
- 'inline-flex items-center justify-center size-8 rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground text-sidebar-foreground transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-sidebar-ring',
257
- className,
258
- )}
259
- onClick={(e) => {
260
- onClick?.(e);
261
- toggleSidebar();
262
- }}
263
- {...props}
264
- >
265
- <PanelLeft className="size-4" />
266
- <span className="sr-only">Toggle Sidebar</span>
267
- </button>
268
- );
269
- },
270
- );
246
+ export const ShadcnSidebarTrigger = React.forwardRef<
247
+ HTMLButtonElement,
248
+ React.ComponentProps<'button'>
249
+ >(({ className, onClick, ...props }, ref) => {
250
+ const { toggleSidebar } = useSidebar();
251
+ return (
252
+ <button
253
+ ref={ref}
254
+ type="button"
255
+ data-sidebar="trigger"
256
+ data-slot="sidebar-trigger"
257
+ className={cn(
258
+ 'inline-flex items-center justify-center size-8 rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground text-sidebar-foreground transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-sidebar-ring',
259
+ className
260
+ )}
261
+ onClick={(e) => {
262
+ onClick?.(e);
263
+ toggleSidebar();
264
+ }}
265
+ {...props}
266
+ >
267
+ <PanelLeft className="size-4" />
268
+ <span className="sr-only">Toggle Sidebar</span>
269
+ </button>
270
+ );
271
+ });
271
272
  SidebarTrigger.displayName = 'SidebarTrigger';
272
273
 
273
274
  export const SidebarRail = React.forwardRef<HTMLButtonElement, React.ComponentProps<'button'>>(
@@ -287,12 +288,12 @@ export const SidebarRail = React.forwardRef<HTMLButtonElement, React.ComponentPr
287
288
  title="Toggle Sidebar"
288
289
  className={cn(
289
290
  'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=right][data-collapsible=offcanvas]_&]:-left-2',
290
- className,
291
+ className
291
292
  )}
292
293
  {...props}
293
294
  />
294
295
  );
295
- },
296
+ }
296
297
  );
297
298
  SidebarRail.displayName = 'SidebarRail';
298
299
 
@@ -303,11 +304,11 @@ export const SidebarInset = React.forwardRef<HTMLElement, React.ComponentProps<'
303
304
  data-slot="sidebar-inset"
304
305
  className={cn(
305
306
  'bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col',
306
- className,
307
+ className
307
308
  )}
308
309
  {...props}
309
310
  />
310
- ),
311
+ )
311
312
  );
312
313
  SidebarInset.displayName = 'SidebarInset';
313
314
 
@@ -319,11 +320,11 @@ export const ShadcnSidebarInput = React.forwardRef<HTMLInputElement, React.Compo
319
320
  data-sidebar="input"
320
321
  className={cn(
321
322
  'h-8 w-full bg-background border border-input rounded-md px-3 text-sm shadow-none focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',
322
- className,
323
+ className
323
324
  )}
324
325
  {...props}
325
326
  />
326
- ),
327
+ )
327
328
  );
328
329
  SidebarInput.displayName = 'SidebarInput';
329
330
 
@@ -336,7 +337,7 @@ export const ShadcnSidebarHeader = React.forwardRef<HTMLDivElement, React.Compon
336
337
  className={cn('gap-2 p-2 flex flex-col', className)}
337
338
  {...props}
338
339
  />
339
- ),
340
+ )
340
341
  );
341
342
  SidebarHeader.displayName = 'SidebarHeader';
342
343
 
@@ -349,7 +350,7 @@ export const ShadcnSidebarFooter = React.forwardRef<HTMLDivElement, React.Compon
349
350
  className={cn('gap-2 p-2 flex flex-col', className)}
350
351
  {...props}
351
352
  />
352
- ),
353
+ )
353
354
  );
354
355
  SidebarFooter.displayName = 'SidebarFooter';
355
356
 
@@ -363,7 +364,7 @@ export const ShadcnSidebarSeparator = React.forwardRef<HTMLDivElement, React.Com
363
364
  className={cn('mx-2 bg-sidebar-border h-px w-auto', className)}
364
365
  {...props}
365
366
  />
366
- ),
367
+ )
367
368
  );
368
369
  SidebarSeparator.displayName = 'SidebarSeparator';
369
370
 
@@ -375,11 +376,11 @@ export const ShadcnSidebarContent = React.forwardRef<HTMLDivElement, React.Compo
375
376
  data-sidebar="content"
376
377
  className={cn(
377
378
  'no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden',
378
- className,
379
+ className
379
380
  )}
380
381
  {...props}
381
382
  />
382
- ),
383
+ )
383
384
  );
384
385
  SidebarContent.displayName = 'SidebarContent';
385
386
 
@@ -392,7 +393,7 @@ export const ShadcnSidebarGroup = React.forwardRef<HTMLDivElement, React.Compone
392
393
  className={cn('p-2 relative flex w-full min-w-0 flex-col', className)}
393
394
  {...props}
394
395
  />
395
- ),
396
+ )
396
397
  );
397
398
  SidebarGroup.displayName = 'SidebarGroup';
398
399
 
@@ -404,11 +405,11 @@ export const SidebarGroupLabel = React.forwardRef<HTMLDivElement, React.Componen
404
405
  data-sidebar="group-label"
405
406
  className={cn(
406
407
  'h-8 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 flex shrink-0 items-center outline-hidden [&>svg]:size-4 [&>svg]:shrink-0',
407
- className,
408
+ className
408
409
  )}
409
410
  {...props}
410
411
  />
411
- ),
412
+ )
412
413
  );
413
414
  SidebarGroupLabel.displayName = 'SidebarGroupLabel';
414
415
 
@@ -423,7 +424,7 @@ export const SidebarGroupAction = React.forwardRef<
423
424
  data-sidebar="group-action"
424
425
  className={cn(
425
426
  'absolute top-3.5 right-3 w-5 rounded-md p-0 text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0',
426
- className,
427
+ className
427
428
  )}
428
429
  {...props}
429
430
  />
@@ -439,7 +440,7 @@ export const SidebarGroupContent = React.forwardRef<HTMLDivElement, React.Compon
439
440
  className={cn('text-sm w-full', className)}
440
441
  {...props}
441
442
  />
442
- ),
443
+ )
443
444
  );
444
445
  SidebarGroupContent.displayName = 'SidebarGroupContent';
445
446
 
@@ -452,7 +453,7 @@ export const SidebarMenu = React.forwardRef<HTMLUListElement, React.ComponentPro
452
453
  className={cn('gap-0 flex w-full min-w-0 flex-col list-none p-0 m-0', className)}
453
454
  {...props}
454
455
  />
455
- ),
456
+ )
456
457
  );
457
458
  SidebarMenu.displayName = 'SidebarMenu';
458
459
 
@@ -465,7 +466,7 @@ export const SidebarMenuItem = React.forwardRef<HTMLLIElement, React.ComponentPr
465
466
  className={cn('group/menu-item relative list-none', className)}
466
467
  {...props}
467
468
  />
468
- ),
469
+ )
469
470
  );
470
471
  SidebarMenuItem.displayName = 'SidebarMenuItem';
471
472
 
@@ -476,19 +477,19 @@ export const sidebarMenuButtonVariants = cva(
476
477
  variant: {
477
478
  default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
478
479
  outline:
479
- 'bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]',
480
+ 'bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]'
480
481
  },
481
482
  size: {
482
483
  default: 'h-8 text-sm',
483
484
  sm: 'h-7 text-xs',
484
- lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',
485
- },
485
+ lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!'
486
+ }
486
487
  },
487
488
  defaultVariants: {
488
489
  variant: 'default',
489
- size: 'default',
490
- },
491
- },
490
+ size: 'default'
491
+ }
492
+ }
492
493
  );
493
494
 
494
495
  export interface SidebarMenuButtonProps
@@ -500,7 +501,7 @@ export interface SidebarMenuButtonProps
500
501
  export const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(
501
502
  (
502
503
  { className, variant = 'default', size = 'default', isActive = false, tooltip, ...props },
503
- ref,
504
+ ref
504
505
  ) => {
505
506
  return (
506
507
  <button
@@ -515,7 +516,7 @@ export const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenu
515
516
  {...props}
516
517
  />
517
518
  );
518
- },
519
+ }
519
520
  );
520
521
  SidebarMenuButton.displayName = 'SidebarMenuButton';
521
522
 
@@ -534,11 +535,11 @@ export const SidebarMenuAction = React.forwardRef<HTMLButtonElement, SidebarMenu
534
535
  'absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0',
535
536
  showOnHover &&
536
537
  'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground md:opacity-0 data-open:opacity-100',
537
- className,
538
+ className
538
539
  )}
539
540
  {...props}
540
541
  />
541
- ),
542
+ )
542
543
  );
543
544
  SidebarMenuAction.displayName = 'SidebarMenuAction';
544
545
 
@@ -550,11 +551,11 @@ export const SidebarMenuBadge = React.forwardRef<HTMLDivElement, React.Component
550
551
  data-sidebar="menu-badge"
551
552
  className={cn(
552
553
  'pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden',
553
- className,
554
+ className
554
555
  )}
555
556
  {...props}
556
557
  />
557
- ),
558
+ )
558
559
  );
559
560
  SidebarMenuBadge.displayName = 'SidebarMenuBadge';
560
561
 
@@ -566,11 +567,11 @@ export const SidebarMenuSub = React.forwardRef<HTMLUListElement, React.Component
566
567
  data-sidebar="menu-sub"
567
568
  className={cn(
568
569
  'mx-3.5 translate-x-px gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col list-none',
569
- className,
570
+ className
570
571
  )}
571
572
  {...props}
572
573
  />
573
- ),
574
+ )
574
575
  );
575
576
  SidebarMenuSub.displayName = 'SidebarMenuSub';
576
577
 
@@ -583,7 +584,7 @@ export const SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.Componen
583
584
  className={cn('group/menu-sub-item relative list-none', className)}
584
585
  {...props}
585
586
  />
586
- ),
587
+ )
587
588
  );
588
589
  SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
589
590
 
@@ -602,11 +603,11 @@ export const SidebarMenuSubButton = React.forwardRef<HTMLAnchorElement, SidebarM
602
603
  data-active={isActive}
603
604
  className={cn(
604
605
  'h-7 gap-2 rounded-md px-2 text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:text-sidebar-accent-foreground flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0 no-underline',
605
- className,
606
+ className
606
607
  )}
607
608
  {...props}
608
609
  />
609
- ),
610
+ )
610
611
  );
611
612
  SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
612
613
 
@@ -628,7 +629,7 @@ export const SidebarMenuSkeleton = React.forwardRef<HTMLDivElement, SidebarMenuS
628
629
  )}
629
630
  <div className="h-4 w-3/4 rounded-md bg-sidebar-accent" data-sidebar="menu-skeleton-text" />
630
631
  </div>
631
- ),
632
+ )
632
633
  );
633
634
  SidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';
634
635
 
@@ -13,4 +13,4 @@ export function ShadcnSkeleton({ className, ...props }: SkeletonProps) {
13
13
  );
14
14
  }
15
15
 
16
- export default MinimalistSkeleton;
16
+ export default MinimalistSkeleton;
@@ -28,10 +28,10 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
28
28
  onValueCommit,
29
29
  ...props
30
30
  },
31
- ref,
31
+ ref
32
32
  ) => {
33
33
  const [internalValues, setInternalValues] = React.useState<number[]>(
34
- controlledValue ?? defaultValue,
34
+ controlledValue ?? defaultValue
35
35
  );
36
36
  const [activeIndex, setActiveIndex] = React.useState<number | null>(null);
37
37
  const trackRef = React.useRef<HTMLSpanElement | null>(null);
@@ -46,7 +46,7 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
46
46
  (val: number) => {
47
47
  return Math.max(0, Math.min(100, ((val - min) / (max - min)) * 100));
48
48
  },
49
- [min, max],
49
+ [min, max]
50
50
  );
51
51
 
52
52
  const getValueFromPointer = React.useCallback(
@@ -64,7 +64,7 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
64
64
  const steppedVal = Math.round(rawVal / step) * step;
65
65
  return Math.max(min, Math.min(max, steppedVal));
66
66
  },
67
- [min, max, step, orientation],
67
+ [min, max, step, orientation]
68
68
  );
69
69
 
70
70
  const updateValue = React.useCallback(
@@ -80,7 +80,7 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
80
80
  return next;
81
81
  });
82
82
  },
83
- [onValueChange],
83
+ [onValueChange]
84
84
  );
85
85
 
86
86
  const handlePointerDown = (e: React.PointerEvent<HTMLDivElement>) => {
@@ -158,7 +158,7 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
158
158
  'relative flex w-full touch-none select-none items-center',
159
159
  orientation === 'vertical' ? 'h-full min-h-40 w-auto flex-col' : 'h-auto w-full flex-row',
160
160
  disabled && 'opacity-50 pointer-events-none',
161
- className,
161
+ className
162
162
  )}
163
163
  onPointerDown={handlePointerDown}
164
164
  onPointerMove={handlePointerMove}
@@ -171,7 +171,7 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
171
171
  data-orientation={orientation}
172
172
  className={cn(
173
173
  'relative grow overflow-hidden rounded-full bg-muted',
174
- orientation === 'horizontal' ? 'h-1.5 w-full' : 'h-full w-1.5',
174
+ orientation === 'horizontal' ? 'h-1.5 w-full' : 'h-full w-1.5'
175
175
  )}
176
176
  >
177
177
  <span
@@ -206,7 +206,7 @@ export const ShadcnSlider = React.forwardRef<HTMLDivElement, SliderProps>(
206
206
  })}
207
207
  </div>
208
208
  );
209
- },
209
+ }
210
210
  );
211
211
  Slider.displayName = 'Slider';
212
212
 
@@ -12,7 +12,7 @@ export function Toaster({ ...props }: ToasterComponentProps) {
12
12
  {
13
13
  '--normal-bg': 'var(--color-popover)',
14
14
  '--normal-text': 'var(--color-popover-foreground)',
15
- '--normal-border': 'var(--color-border)',
15
+ '--normal-border': 'var(--color-border)'
16
16
  } as React.CSSProperties
17
17
  }
18
18
  icons={{
@@ -20,7 +20,7 @@ export function Toaster({ ...props }: ToasterComponentProps) {
20
20
  success: <CircleCheck className="size-4" />,
21
21
  error: <OctagonX className="size-4" />,
22
22
  info: <Info className="size-4" />,
23
- warning: <TriangleAlert className="size-4" />,
23
+ warning: <TriangleAlert className="size-4" />
24
24
  }}
25
25
  toastOptions={{
26
26
  classNames: {
@@ -28,8 +28,8 @@ export function Toaster({ ...props }: ToasterComponentProps) {
28
28
  'group toast group-[.toaster]:bg-popover group-[.toaster]:text-popover-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
29
29
  description: 'group-[.toast]:text-muted-foreground',
30
30
  actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
31
- cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
32
- },
31
+ cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground'
32
+ }
33
33
  }}
34
34
  {...props}
35
35
  />
@@ -19,7 +19,7 @@ export const ShadcnSpinner = React.forwardRef<SVGSVGElement, SpinnerProps>(
19
19
  strokeWidth,
20
20
  ...props
21
21
  },
22
- ref,
22
+ ref
23
23
  ) => {
24
24
  return (
25
25
  <Loader2
@@ -32,8 +32,8 @@ export const ShadcnSpinner = React.forwardRef<SVGSVGElement, SpinnerProps>(
32
32
  {...props}
33
33
  />
34
34
  );
35
- },
35
+ }
36
36
  );
37
37
 
38
38
  Spinner.displayName = 'Spinner';
39
- export default MinimalistSpinner;
39
+ export default MinimalistSpinner;
@@ -24,7 +24,7 @@ export const ShadcnSwitch = React.forwardRef<HTMLButtonElement, SwitchProps>(
24
24
  onKeyDown,
25
25
  ...props
26
26
  },
27
- ref,
27
+ ref
28
28
  ) => {
29
29
  const [uncontrolledChecked, setUncontrolledChecked] = React.useState(defaultChecked);
30
30
  const isControlled = controlledChecked !== undefined;
@@ -69,7 +69,7 @@ export const ShadcnSwitch = React.forwardRef<HTMLButtonElement, SwitchProps>(
69
69
  onKeyDown={handleKeyDown}
70
70
  className={cn(
71
71
  'peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-colors outline-none cursor-pointer select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80',
72
- className,
72
+ className
73
73
  )}
74
74
  {...props}
75
75
  >
@@ -80,13 +80,13 @@ export const ShadcnSwitch = React.forwardRef<HTMLButtonElement, SwitchProps>(
80
80
  'pointer-events-none block rounded-full bg-background ring-0 transition-transform dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground',
81
81
  size === 'sm'
82
82
  ? 'size-3 data-[state=checked]:translate-x-[10px] data-[state=unchecked]:translate-x-0'
83
- : 'size-4 data-[state=checked]:translate-x-[14px] data-[state=unchecked]:translate-x-0',
83
+ : 'size-4 data-[state=checked]:translate-x-[14px] data-[state=unchecked]:translate-x-0'
84
84
  )}
85
85
  />
86
86
  </button>
87
87
  );
88
- },
88
+ }
89
89
  );
90
90
 
91
91
  Switch.displayName = 'Switch';
92
- export default MinimalistSwitch;
92
+ export default MinimalistSwitch;
@@ -7,13 +7,13 @@ export const tabsListVariants = cva(
7
7
  variants: {
8
8
  variant: {
9
9
  default: 'cn-tabs-list-variant-default bg-muted',
10
- line: 'cn-tabs-list-variant-line gap-1 bg-transparent',
11
- },
10
+ line: 'cn-tabs-list-variant-line gap-1 bg-transparent'
11
+ }
12
12
  },
13
13
  defaultVariants: {
14
- variant: 'default',
15
- },
16
- },
14
+ variant: 'default'
15
+ }
16
+ }
17
17
  );
18
18
 
19
19
  export type TabsListVariant = VariantProps<typeof tabsListVariants>['variant'];
@@ -61,7 +61,7 @@ export function ShadcnTabs({
61
61
  }
62
62
  onValueChange?.(val);
63
63
  },
64
- [isControlled, onValueChange],
64
+ [isControlled, onValueChange]
65
65
  );
66
66
 
67
67
  return (
@@ -81,7 +81,12 @@ export function ShadcnTabs({
81
81
  export interface ShadcnTabsListProps
82
82
  extends React.ComponentProps<'div'>, VariantProps<typeof tabsListVariants> {}
83
83
 
84
- export function ShadcnTabsList({ className, variant = 'default', children, ...props }: TabsListProps) {
84
+ export function ShadcnTabsList({
85
+ className,
86
+ variant = 'default',
87
+ children,
88
+ ...props
89
+ }: TabsListProps) {
85
90
  return (
86
91
  <div
87
92
  data-slot="tabs-list"
@@ -123,7 +128,7 @@ export function ShadcnTabsTrigger({
123
128
  'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent',
124
129
  'data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs dark:data-[state=active]:border-border/50 dark:data-[state=active]:bg-background dark:data-[state=active]:text-foreground',
125
130
  'after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100',
126
- className,
131
+ className
127
132
  )}
128
133
  {...props}
129
134
  >
@@ -11,14 +11,14 @@ export const ShadcnTextarea = React.forwardRef<HTMLTextAreaElement, TextareaProp
11
11
  data-slot={dataSlot}
12
12
  className={cn(
13
13
  'rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
14
- className,
14
+ className
15
15
  )}
16
16
  {...props}
17
17
  />
18
18
  );
19
- },
19
+ }
20
20
  );
21
21
 
22
22
  Textarea.displayName = 'Textarea';
23
23
 
24
- export default MinimalistTextarea;
24
+ export default MinimalistTextarea;
@@ -7,20 +7,20 @@ export const shadcnToggleVariants = cva(
7
7
  variants: {
8
8
  variant: {
9
9
  default: 'bg-transparent',
10
- outline: 'border border-input bg-transparent hover:bg-muted',
10
+ outline: 'border border-input bg-transparent hover:bg-muted'
11
11
  },
12
12
  size: {
13
13
  default:
14
14
  'h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
15
15
  sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
16
- lg: 'h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
17
- },
16
+ lg: 'h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2'
17
+ }
18
18
  },
19
19
  defaultVariants: {
20
20
  variant: 'default',
21
- size: 'default',
22
- },
23
- },
21
+ size: 'default'
22
+ }
23
+ }
24
24
  );
25
25
 
26
26
  export interface ShadcnToggleProps
@@ -42,7 +42,7 @@ export const ShadcnToggle = React.forwardRef<HTMLButtonElement, ToggleProps>(
42
42
  onClick,
43
43
  ...props
44
44
  },
45
- ref,
45
+ ref
46
46
  ) => {
47
47
  const [uncontrolledPressed, setUncontrolledPressed] = React.useState(defaultPressed);
48
48
  const isPressed = controlledPressed !== undefined ? controlledPressed : uncontrolledPressed;
@@ -67,7 +67,7 @@ export const ShadcnToggle = React.forwardRef<HTMLButtonElement, ToggleProps>(
67
67
  {...props}
68
68
  />
69
69
  );
70
- },
70
+ }
71
71
  );
72
72
  Toggle.displayName = 'Toggle';
73
73