@syscore/ui-library 1.1.13 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/ui/accordion.tsx +6 -9
- package/client/components/ui/alert-dialog.tsx +6 -19
- package/client/components/ui/alert.tsx +5 -6
- package/client/components/ui/avatar.tsx +3 -9
- package/client/components/ui/badge.tsx +5 -8
- package/client/components/ui/breadcrumb.tsx +7 -16
- package/client/components/ui/button.tsx +17 -45
- package/client/components/ui/calendar.tsx +24 -28
- package/client/components/ui/card.tsx +6 -9
- package/client/components/ui/carousel.tsx +14 -14
- package/client/components/ui/chart.tsx +25 -28
- package/client/components/ui/checkbox.tsx +3 -8
- package/client/components/ui/code-badge.tsx +1 -4
- package/client/components/ui/command.tsx +12 -48
- package/client/components/ui/context-menu.tsx +17 -32
- package/client/components/ui/dialog.tsx +9 -18
- package/client/components/ui/drawer.tsx +7 -13
- package/client/components/ui/dropdown-menu.tsx +17 -29
- package/client/components/ui/form.tsx +4 -4
- package/client/components/ui/hover-card.tsx +1 -4
- package/client/components/ui/input-otp.tsx +7 -10
- package/client/components/ui/input.tsx +4 -23
- package/client/components/ui/label.tsx +1 -3
- package/client/components/ui/menubar.tsx +19 -40
- package/client/components/ui/navigation-menu.tsx +10 -27
- package/client/components/ui/navigation.tsx +193 -331
- package/client/components/ui/pagination.tsx +8 -8
- package/client/components/ui/popover.tsx +1 -4
- package/client/components/ui/progress.tsx +2 -5
- package/client/components/ui/radio-group.tsx +4 -7
- package/client/components/ui/resizable.tsx +4 -10
- package/client/components/ui/scroll-area.tsx +5 -8
- package/client/components/ui/search.tsx +7 -10
- package/client/components/ui/select.tsx +11 -36
- package/client/components/ui/separator.tsx +2 -2
- package/client/components/ui/sheet.tsx +12 -23
- package/client/components/ui/sidebar.tsx +55 -82
- package/client/components/ui/skeleton.tsx +1 -1
- package/client/components/ui/slider.tsx +4 -7
- package/client/components/ui/sonner.tsx +5 -8
- package/client/components/ui/switch.tsx +2 -9
- package/client/components/ui/table.tsx +9 -18
- package/client/components/ui/tabs.tsx +19 -28
- package/client/components/ui/tag.tsx +6 -66
- package/client/components/ui/textarea.tsx +1 -4
- package/client/components/ui/toast.tsx +9 -19
- package/client/components/ui/toaster.tsx +1 -1
- package/client/components/ui/toggle-group.tsx +4 -4
- package/client/components/ui/toggle.tsx +13 -13
- package/client/components/ui/tooltip.tsx +12 -15
- package/client/global.css +5419 -1054
- package/client/storybook.css +1164 -0
- package/dist/index.cjs.js +1 -0
- package/dist/{ui/index.d.ts → index.d.ts} +0 -1
- package/dist/index.es.js +4552 -0
- package/dist/ui-library.css +1 -0
- package/package.json +9 -12
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
- package/client/ui/WELLDashboard/index.tsx +0 -317
- package/dist/ui/index.cjs.js +0 -1
- package/dist/ui/index.es.js +0 -5502
- package/tailwind.preset.ts +0 -151
- /package/dist/{ui/favicon.ico → favicon.ico} +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.otf +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.ttf +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff2 +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-black.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bold.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-italic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-light.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-medium.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-regular.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thin.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
- /package/dist/{ui/placeholder.svg → placeholder.svg} +0 -0
- /package/dist/{ui/robots.txt → robots.txt} +0 -0
|
@@ -147,7 +147,7 @@ const SidebarProvider = React.forwardRef<
|
|
|
147
147
|
} as React.CSSProperties
|
|
148
148
|
}
|
|
149
149
|
className={cn(
|
|
150
|
-
"
|
|
150
|
+
"sidebar-wrapper",
|
|
151
151
|
className,
|
|
152
152
|
)}
|
|
153
153
|
ref={ref}
|
|
@@ -187,7 +187,7 @@ const Sidebar = React.forwardRef<
|
|
|
187
187
|
return (
|
|
188
188
|
<div
|
|
189
189
|
className={cn(
|
|
190
|
-
"
|
|
190
|
+
"sidebar",
|
|
191
191
|
className,
|
|
192
192
|
)}
|
|
193
193
|
ref={ref}
|
|
@@ -204,7 +204,7 @@ const Sidebar = React.forwardRef<
|
|
|
204
204
|
<SheetContent
|
|
205
205
|
data-sidebar="sidebar"
|
|
206
206
|
data-mobile="true"
|
|
207
|
-
className="
|
|
207
|
+
className="sidebar"
|
|
208
208
|
style={
|
|
209
209
|
{
|
|
210
210
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
|
@@ -212,7 +212,7 @@ const Sidebar = React.forwardRef<
|
|
|
212
212
|
}
|
|
213
213
|
side={side}
|
|
214
214
|
>
|
|
215
|
-
<div className="
|
|
215
|
+
<div className="sidebar-mobile-content">{children}</div>
|
|
216
216
|
</SheetContent>
|
|
217
217
|
</Sheet>
|
|
218
218
|
);
|
|
@@ -221,40 +221,28 @@ const Sidebar = React.forwardRef<
|
|
|
221
221
|
return (
|
|
222
222
|
<div
|
|
223
223
|
ref={ref}
|
|
224
|
-
className="
|
|
224
|
+
className="sidebar-base peer"
|
|
225
225
|
data-state={state}
|
|
226
226
|
data-collapsible={state === "collapsed" ? collapsible : ""}
|
|
227
227
|
data-variant={variant}
|
|
228
228
|
data-side={side}
|
|
229
229
|
>
|
|
230
230
|
{/* This is what handles the sidebar gap on desktop */}
|
|
231
|
+
<div className="sidebar-base" />
|
|
231
232
|
<div
|
|
232
233
|
className={cn(
|
|
233
|
-
"
|
|
234
|
-
"group-data-[collapsible=offcanvas]:w-0",
|
|
235
|
-
"group-data-[side=right]:rotate-180",
|
|
236
|
-
variant === "floating" || variant === "inset"
|
|
237
|
-
? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"
|
|
238
|
-
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon)",
|
|
239
|
-
)}
|
|
240
|
-
/>
|
|
241
|
-
<div
|
|
242
|
-
className={cn(
|
|
243
|
-
"duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",
|
|
244
|
-
side === "left"
|
|
245
|
-
? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
|
|
246
|
-
: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
247
|
-
// Adjust the padding for floating and inset variants.
|
|
248
|
-
variant === "floating" || variant === "inset"
|
|
249
|
-
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
250
|
-
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
234
|
+
"sidebar-container",
|
|
251
235
|
className,
|
|
252
236
|
)}
|
|
237
|
+
data-side={side}
|
|
238
|
+
data-collapsible={state === "collapsed" ? collapsible : ""}
|
|
239
|
+
data-variant={variant}
|
|
253
240
|
{...props}
|
|
254
241
|
>
|
|
255
242
|
<div
|
|
256
243
|
data-sidebar="sidebar"
|
|
257
|
-
className="
|
|
244
|
+
className="sidebar-inner"
|
|
245
|
+
data-variant={variant}
|
|
258
246
|
>
|
|
259
247
|
{children}
|
|
260
248
|
</div>
|
|
@@ -277,7 +265,7 @@ const SidebarTrigger = React.forwardRef<
|
|
|
277
265
|
data-sidebar="trigger"
|
|
278
266
|
variant="general-tertiary"
|
|
279
267
|
size="icon"
|
|
280
|
-
className={cn("
|
|
268
|
+
className={cn("sidebar-trigger", className)}
|
|
281
269
|
onClick={(event) => {
|
|
282
270
|
onClick?.(event);
|
|
283
271
|
toggleSidebar();
|
|
@@ -306,14 +294,12 @@ const SidebarRail = React.forwardRef<
|
|
|
306
294
|
onClick={toggleSidebar}
|
|
307
295
|
title="Toggle Sidebar"
|
|
308
296
|
className={cn(
|
|
309
|
-
"
|
|
310
|
-
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
311
|
-
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
312
|
-
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
|
|
313
|
-
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
314
|
-
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
297
|
+
"sidebar-rail",
|
|
315
298
|
className,
|
|
316
299
|
)}
|
|
300
|
+
data-side={side}
|
|
301
|
+
data-state={state}
|
|
302
|
+
data-collapsible={collapsible}
|
|
317
303
|
{...props}
|
|
318
304
|
/>
|
|
319
305
|
);
|
|
@@ -328,10 +314,11 @@ const SidebarInset = React.forwardRef<
|
|
|
328
314
|
<main
|
|
329
315
|
ref={ref}
|
|
330
316
|
className={cn(
|
|
331
|
-
"
|
|
332
|
-
"peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",
|
|
317
|
+
"sidebar-inset",
|
|
333
318
|
className,
|
|
334
319
|
)}
|
|
320
|
+
data-variant={variant}
|
|
321
|
+
data-state={state}
|
|
335
322
|
{...props}
|
|
336
323
|
/>
|
|
337
324
|
);
|
|
@@ -347,7 +334,7 @@ const SidebarInput = React.forwardRef<
|
|
|
347
334
|
ref={ref}
|
|
348
335
|
data-sidebar="input"
|
|
349
336
|
className={cn(
|
|
350
|
-
"
|
|
337
|
+
"sidebar-input",
|
|
351
338
|
className,
|
|
352
339
|
)}
|
|
353
340
|
{...props}
|
|
@@ -364,7 +351,7 @@ const SidebarHeader = React.forwardRef<
|
|
|
364
351
|
<div
|
|
365
352
|
ref={ref}
|
|
366
353
|
data-sidebar="header"
|
|
367
|
-
className={cn("
|
|
354
|
+
className={cn("sidebar-header", className)}
|
|
368
355
|
{...props}
|
|
369
356
|
/>
|
|
370
357
|
);
|
|
@@ -379,7 +366,7 @@ const SidebarFooter = React.forwardRef<
|
|
|
379
366
|
<div
|
|
380
367
|
ref={ref}
|
|
381
368
|
data-sidebar="footer"
|
|
382
|
-
className={cn("
|
|
369
|
+
className={cn("sidebar-footer", className)}
|
|
383
370
|
{...props}
|
|
384
371
|
/>
|
|
385
372
|
);
|
|
@@ -394,7 +381,7 @@ const SidebarSeparator = React.forwardRef<
|
|
|
394
381
|
<Separator
|
|
395
382
|
ref={ref}
|
|
396
383
|
data-sidebar="separator"
|
|
397
|
-
className={cn("
|
|
384
|
+
className={cn("sidebar-separator", className)}
|
|
398
385
|
{...props}
|
|
399
386
|
/>
|
|
400
387
|
);
|
|
@@ -410,7 +397,7 @@ const SidebarContent = React.forwardRef<
|
|
|
410
397
|
ref={ref}
|
|
411
398
|
data-sidebar="content"
|
|
412
399
|
className={cn(
|
|
413
|
-
"
|
|
400
|
+
"sidebar-content",
|
|
414
401
|
className,
|
|
415
402
|
)}
|
|
416
403
|
{...props}
|
|
@@ -427,7 +414,7 @@ const SidebarGroup = React.forwardRef<
|
|
|
427
414
|
<div
|
|
428
415
|
ref={ref}
|
|
429
416
|
data-sidebar="group"
|
|
430
|
-
className={cn("
|
|
417
|
+
className={cn("sidebar-group", className)}
|
|
431
418
|
{...props}
|
|
432
419
|
/>
|
|
433
420
|
);
|
|
@@ -445,8 +432,7 @@ const SidebarGroupLabel = React.forwardRef<
|
|
|
445
432
|
ref={ref}
|
|
446
433
|
data-sidebar="group-label"
|
|
447
434
|
className={cn(
|
|
448
|
-
"
|
|
449
|
-
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
435
|
+
"sidebar-group-label",
|
|
450
436
|
className,
|
|
451
437
|
)}
|
|
452
438
|
{...props}
|
|
@@ -466,10 +452,7 @@ const SidebarGroupAction = React.forwardRef<
|
|
|
466
452
|
ref={ref}
|
|
467
453
|
data-sidebar="group-action"
|
|
468
454
|
className={cn(
|
|
469
|
-
"
|
|
470
|
-
// Increases the hit area of the button on mobile.
|
|
471
|
-
"after:absolute after:-inset-2 md:after:hidden",
|
|
472
|
-
"group-data-[collapsible=icon]:hidden",
|
|
455
|
+
"sidebar-group-action",
|
|
473
456
|
className,
|
|
474
457
|
)}
|
|
475
458
|
{...props}
|
|
@@ -485,7 +468,7 @@ const SidebarGroupContent = React.forwardRef<
|
|
|
485
468
|
<div
|
|
486
469
|
ref={ref}
|
|
487
470
|
data-sidebar="group-content"
|
|
488
|
-
className={cn("
|
|
471
|
+
className={cn("sidebar-group-content", className)}
|
|
489
472
|
{...props}
|
|
490
473
|
/>
|
|
491
474
|
));
|
|
@@ -498,7 +481,7 @@ const SidebarMenu = React.forwardRef<
|
|
|
498
481
|
<ul
|
|
499
482
|
ref={ref}
|
|
500
483
|
data-sidebar="menu"
|
|
501
|
-
className={cn("
|
|
484
|
+
className={cn("sidebar-menu", className)}
|
|
502
485
|
{...props}
|
|
503
486
|
/>
|
|
504
487
|
));
|
|
@@ -511,25 +494,24 @@ const SidebarMenuItem = React.forwardRef<
|
|
|
511
494
|
<li
|
|
512
495
|
ref={ref}
|
|
513
496
|
data-sidebar="menu-item"
|
|
514
|
-
className={cn("
|
|
497
|
+
className={cn("sidebar-menu-item", className)}
|
|
515
498
|
{...props}
|
|
516
499
|
/>
|
|
517
500
|
));
|
|
518
501
|
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
519
502
|
|
|
520
503
|
const sidebarMenuButtonVariants = cva(
|
|
521
|
-
"
|
|
504
|
+
"sidebar-menu-button",
|
|
522
505
|
{
|
|
523
506
|
variants: {
|
|
524
507
|
variant: {
|
|
525
|
-
default: "
|
|
526
|
-
outline:
|
|
527
|
-
"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
|
|
508
|
+
default: "sidebar-menu-button--default",
|
|
509
|
+
outline: "sidebar-menu-button--outline",
|
|
528
510
|
},
|
|
529
511
|
size: {
|
|
530
|
-
default: "
|
|
531
|
-
sm: "
|
|
532
|
-
lg: "
|
|
512
|
+
default: "sidebar-menu-button--size-default",
|
|
513
|
+
sm: "sidebar-menu-button--size-sm",
|
|
514
|
+
lg: "sidebar-menu-button--size-lg",
|
|
533
515
|
},
|
|
534
516
|
},
|
|
535
517
|
defaultVariants: {
|
|
@@ -606,23 +588,18 @@ const SidebarMenuAction = React.forwardRef<
|
|
|
606
588
|
}
|
|
607
589
|
>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
608
590
|
const Comp = asChild ? Slot : "button";
|
|
591
|
+
const { state } = useSidebar();
|
|
609
592
|
|
|
610
593
|
return (
|
|
611
594
|
<Comp
|
|
612
595
|
ref={ref}
|
|
613
596
|
data-sidebar="menu-action"
|
|
614
597
|
className={cn(
|
|
615
|
-
"
|
|
616
|
-
|
|
617
|
-
"after:absolute after:-inset-2 md:after:hidden",
|
|
618
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
619
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
620
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
621
|
-
"group-data-[collapsible=icon]:hidden",
|
|
622
|
-
showOnHover &&
|
|
623
|
-
"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
598
|
+
"sidebar-menu-action",
|
|
599
|
+
showOnHover && "sidebar-menu-action--show-on-hover",
|
|
624
600
|
className,
|
|
625
601
|
)}
|
|
602
|
+
data-show-on-hover={showOnHover}
|
|
626
603
|
{...props}
|
|
627
604
|
/>
|
|
628
605
|
);
|
|
@@ -631,20 +608,18 @@ SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
|
631
608
|
|
|
632
609
|
const SidebarMenuBadge = React.forwardRef<
|
|
633
610
|
HTMLDivElement,
|
|
634
|
-
React.ComponentProps<"div">
|
|
635
|
-
|
|
611
|
+
React.ComponentProps<"div"> & {
|
|
612
|
+
size?: "sm" | "default" | "lg";
|
|
613
|
+
}
|
|
614
|
+
>(({ className, size, ...props }, ref) => (
|
|
636
615
|
<div
|
|
637
616
|
ref={ref}
|
|
638
617
|
data-sidebar="menu-badge"
|
|
639
618
|
className={cn(
|
|
640
|
-
"
|
|
641
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
642
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
643
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
644
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
645
|
-
"group-data-[collapsible=icon]:hidden",
|
|
619
|
+
"sidebar-menu-badge",
|
|
646
620
|
className,
|
|
647
621
|
)}
|
|
622
|
+
data-size={size}
|
|
648
623
|
{...props}
|
|
649
624
|
/>
|
|
650
625
|
));
|
|
@@ -665,17 +640,17 @@ const SidebarMenuSkeleton = React.forwardRef<
|
|
|
665
640
|
<div
|
|
666
641
|
ref={ref}
|
|
667
642
|
data-sidebar="menu-skeleton"
|
|
668
|
-
className={cn("
|
|
643
|
+
className={cn("sidebar-menu-skeleton", className)}
|
|
669
644
|
{...props}
|
|
670
645
|
>
|
|
671
646
|
{showIcon && (
|
|
672
647
|
<Skeleton
|
|
673
|
-
className="
|
|
648
|
+
className="sidebar-menu-skeleton-icon"
|
|
674
649
|
data-sidebar="menu-skeleton-icon"
|
|
675
650
|
/>
|
|
676
651
|
)}
|
|
677
652
|
<Skeleton
|
|
678
|
-
className="
|
|
653
|
+
className="sidebar-menu-skeleton-text"
|
|
679
654
|
data-sidebar="menu-skeleton-text"
|
|
680
655
|
style={
|
|
681
656
|
{
|
|
@@ -696,8 +671,7 @@ const SidebarMenuSub = React.forwardRef<
|
|
|
696
671
|
ref={ref}
|
|
697
672
|
data-sidebar="menu-sub"
|
|
698
673
|
className={cn(
|
|
699
|
-
"
|
|
700
|
-
"group-data-[collapsible=icon]:hidden",
|
|
674
|
+
"sidebar-menu-sub",
|
|
701
675
|
className,
|
|
702
676
|
)}
|
|
703
677
|
{...props}
|
|
@@ -728,13 +702,12 @@ const SidebarMenuSubButton = React.forwardRef<
|
|
|
728
702
|
data-size={size}
|
|
729
703
|
data-active={isActive}
|
|
730
704
|
className={cn(
|
|
731
|
-
"
|
|
732
|
-
"
|
|
733
|
-
size === "
|
|
734
|
-
size === "md" && "text-sm",
|
|
735
|
-
"group-data-[collapsible=icon]:hidden",
|
|
705
|
+
"sidebar-menu-sub-button",
|
|
706
|
+
size === "sm" && "sidebar-menu-sub-button--size-sm",
|
|
707
|
+
size === "md" && "sidebar-menu-sub-button--size-md",
|
|
736
708
|
className,
|
|
737
709
|
)}
|
|
710
|
+
data-size={size}
|
|
738
711
|
{...props}
|
|
739
712
|
/>
|
|
740
713
|
);
|
|
@@ -9,16 +9,13 @@ const Slider = React.forwardRef<
|
|
|
9
9
|
>(({ className, ...props }, ref) => (
|
|
10
10
|
<SliderPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
|
-
className={cn(
|
|
13
|
-
"relative flex w-full touch-none select-none items-center",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
12
|
+
className={cn("slider", className)}
|
|
16
13
|
{...props}
|
|
17
14
|
>
|
|
18
|
-
<SliderPrimitive.Track className="
|
|
19
|
-
<SliderPrimitive.Range className="
|
|
15
|
+
<SliderPrimitive.Track className="slider-track">
|
|
16
|
+
<SliderPrimitive.Range className="slider-range" />
|
|
20
17
|
</SliderPrimitive.Track>
|
|
21
|
-
<SliderPrimitive.Thumb className="
|
|
18
|
+
<SliderPrimitive.Thumb className="slider-thumb" />
|
|
22
19
|
</SliderPrimitive.Root>
|
|
23
20
|
));
|
|
24
21
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
@@ -9,16 +9,13 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|
|
9
9
|
return (
|
|
10
10
|
<Sonner
|
|
11
11
|
theme={theme as ToasterProps["theme"]}
|
|
12
|
-
className="toaster
|
|
12
|
+
className="toaster"
|
|
13
13
|
toastOptions={{
|
|
14
14
|
classNames: {
|
|
15
|
-
toast:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
20
|
-
cancelButton:
|
|
21
|
-
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
15
|
+
toast: "toast",
|
|
16
|
+
description: "toast-description",
|
|
17
|
+
actionButton: "toast-action",
|
|
18
|
+
cancelButton: "toast-cancel",
|
|
22
19
|
},
|
|
23
20
|
}}
|
|
24
21
|
{...props}
|
|
@@ -8,18 +8,11 @@ const Switch = React.forwardRef<
|
|
|
8
8
|
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
9
9
|
>(({ className, ...props }, ref) => (
|
|
10
10
|
<SwitchPrimitives.Root
|
|
11
|
-
className={cn(
|
|
12
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
13
|
-
className,
|
|
14
|
-
)}
|
|
11
|
+
className={cn("switch", className)}
|
|
15
12
|
{...props}
|
|
16
13
|
ref={ref}
|
|
17
14
|
>
|
|
18
|
-
<SwitchPrimitives.Thumb
|
|
19
|
-
className={cn(
|
|
20
|
-
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
21
|
-
)}
|
|
22
|
-
/>
|
|
15
|
+
<SwitchPrimitives.Thumb className="switch-thumb" />
|
|
23
16
|
</SwitchPrimitives.Root>
|
|
24
17
|
));
|
|
25
18
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
@@ -6,10 +6,10 @@ const Table = React.forwardRef<
|
|
|
6
6
|
HTMLTableElement,
|
|
7
7
|
React.HTMLAttributes<HTMLTableElement>
|
|
8
8
|
>(({ className, ...props }, ref) => (
|
|
9
|
-
<div className="
|
|
9
|
+
<div className="table-wrapper">
|
|
10
10
|
<table
|
|
11
11
|
ref={ref}
|
|
12
|
-
className={cn("
|
|
12
|
+
className={cn("table", className)}
|
|
13
13
|
{...props}
|
|
14
14
|
/>
|
|
15
15
|
</div>
|
|
@@ -20,7 +20,7 @@ const TableHeader = React.forwardRef<
|
|
|
20
20
|
HTMLTableSectionElement,
|
|
21
21
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
22
22
|
>(({ className, ...props }, ref) => (
|
|
23
|
-
<thead ref={ref} className={cn("
|
|
23
|
+
<thead ref={ref} className={cn("table-header", className)} {...props} />
|
|
24
24
|
));
|
|
25
25
|
TableHeader.displayName = "TableHeader";
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ const TableBody = React.forwardRef<
|
|
|
30
30
|
>(({ className, ...props }, ref) => (
|
|
31
31
|
<tbody
|
|
32
32
|
ref={ref}
|
|
33
|
-
className={cn("
|
|
33
|
+
className={cn("table-body", className)}
|
|
34
34
|
{...props}
|
|
35
35
|
/>
|
|
36
36
|
));
|
|
@@ -42,10 +42,7 @@ const TableFooter = React.forwardRef<
|
|
|
42
42
|
>(({ className, ...props }, ref) => (
|
|
43
43
|
<tfoot
|
|
44
44
|
ref={ref}
|
|
45
|
-
className={cn(
|
|
46
|
-
"border-t bg-muted/50 font-medium last:[&>tr]:border-b-0",
|
|
47
|
-
className,
|
|
48
|
-
)}
|
|
45
|
+
className={cn("table-footer", className)}
|
|
49
46
|
{...props}
|
|
50
47
|
/>
|
|
51
48
|
));
|
|
@@ -57,10 +54,7 @@ const TableRow = React.forwardRef<
|
|
|
57
54
|
>(({ className, ...props }, ref) => (
|
|
58
55
|
<tr
|
|
59
56
|
ref={ref}
|
|
60
|
-
className={cn(
|
|
61
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
62
|
-
className,
|
|
63
|
-
)}
|
|
57
|
+
className={cn("table-row", className)}
|
|
64
58
|
{...props}
|
|
65
59
|
/>
|
|
66
60
|
));
|
|
@@ -72,10 +66,7 @@ const TableHead = React.forwardRef<
|
|
|
72
66
|
>(({ className, ...props }, ref) => (
|
|
73
67
|
<th
|
|
74
68
|
ref={ref}
|
|
75
|
-
className={cn(
|
|
76
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
77
|
-
className,
|
|
78
|
-
)}
|
|
69
|
+
className={cn("table-head", className)}
|
|
79
70
|
{...props}
|
|
80
71
|
/>
|
|
81
72
|
));
|
|
@@ -87,7 +78,7 @@ const TableCell = React.forwardRef<
|
|
|
87
78
|
>(({ className, ...props }, ref) => (
|
|
88
79
|
<td
|
|
89
80
|
ref={ref}
|
|
90
|
-
className={cn("
|
|
81
|
+
className={cn("table-cell", className)}
|
|
91
82
|
{...props}
|
|
92
83
|
/>
|
|
93
84
|
));
|
|
@@ -99,7 +90,7 @@ const TableCaption = React.forwardRef<
|
|
|
99
90
|
>(({ className, ...props }, ref) => (
|
|
100
91
|
<caption
|
|
101
92
|
ref={ref}
|
|
102
|
-
className={cn("
|
|
93
|
+
className={cn("table-caption", className)}
|
|
103
94
|
{...props}
|
|
104
95
|
/>
|
|
105
96
|
));
|
|
@@ -73,7 +73,7 @@ const Tabs = ({
|
|
|
73
73
|
return (
|
|
74
74
|
<nav
|
|
75
75
|
ref={navRef}
|
|
76
|
-
className="
|
|
76
|
+
className="tabs-nav"
|
|
77
77
|
onPointerLeave={() => setHoveredTabIndex(null)}
|
|
78
78
|
>
|
|
79
79
|
{tabs.map((item, i) => {
|
|
@@ -82,7 +82,7 @@ const Tabs = ({
|
|
|
82
82
|
return (
|
|
83
83
|
<button
|
|
84
84
|
key={item.value}
|
|
85
|
-
className="
|
|
85
|
+
className="tabs-nav-button"
|
|
86
86
|
onPointerEnter={() => setHoveredTabIndex(i)}
|
|
87
87
|
onFocus={() => setHoveredTabIndex(i)}
|
|
88
88
|
onClick={() => setSelectedTab([i, i > selectedTabIndex ? 1 : -1])}
|
|
@@ -91,13 +91,13 @@ const Tabs = ({
|
|
|
91
91
|
ref={(el) => {
|
|
92
92
|
buttonRefs[i] = el as HTMLButtonElement;
|
|
93
93
|
}}
|
|
94
|
-
className={cn("
|
|
95
|
-
"
|
|
96
|
-
"
|
|
94
|
+
className={cn("tabs-nav-button-text", {
|
|
95
|
+
"tabs-nav-button-text--inactive": !isActive,
|
|
96
|
+
"tabs-nav-button-text--active": isActive,
|
|
97
97
|
})}
|
|
98
98
|
>
|
|
99
99
|
<small
|
|
100
|
-
className={item.value === "danger-zone" ? "
|
|
100
|
+
className={item.value === "danger-zone" ? "tabs-nav-button-text--danger" : ""}
|
|
101
101
|
>
|
|
102
102
|
{item.label}
|
|
103
103
|
</small>
|
|
@@ -136,12 +136,12 @@ const Tabs = ({
|
|
|
136
136
|
<AnimatePresence>
|
|
137
137
|
{selectedRect && navRect && (
|
|
138
138
|
<motion.div
|
|
139
|
-
className={
|
|
140
|
-
selectedTabIndex ===
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
139
|
+
className={cn("tabs-nav-indicator", {
|
|
140
|
+
"tabs-nav-indicator--danger": selectedTabIndex ===
|
|
141
|
+
tabs.findIndex(({ value }) => value === "danger-zone"),
|
|
142
|
+
"tabs-nav-indicator--default": selectedTabIndex !==
|
|
143
|
+
tabs.findIndex(({ value }) => value === "danger-zone"),
|
|
144
|
+
})}
|
|
145
145
|
initial={false}
|
|
146
146
|
animate={{
|
|
147
147
|
width: selectedRect.width,
|
|
@@ -153,7 +153,7 @@ const Tabs = ({
|
|
|
153
153
|
)}
|
|
154
154
|
</AnimatePresence>
|
|
155
155
|
|
|
156
|
-
<div className="
|
|
156
|
+
<div className="tabs-nav-underline" />
|
|
157
157
|
</nav>
|
|
158
158
|
);
|
|
159
159
|
};
|
|
@@ -174,8 +174,8 @@ export function AnimatedTabs({ tabs }: AnimatedTabsProps) {
|
|
|
174
174
|
const framer = useTabs(hookProps);
|
|
175
175
|
|
|
176
176
|
return (
|
|
177
|
-
<div className="
|
|
178
|
-
<div className="
|
|
177
|
+
<div className="tabs-container">
|
|
178
|
+
<div className="tabs-container-inner">
|
|
179
179
|
<Tabs {...framer.tabProps} />
|
|
180
180
|
</div>
|
|
181
181
|
<AnimatePresence mode="wait">
|
|
@@ -192,7 +192,7 @@ const TabsRoot = React.forwardRef<
|
|
|
192
192
|
>(({ className, ...props }, ref) => (
|
|
193
193
|
<TabsPrimitive.Root
|
|
194
194
|
ref={ref}
|
|
195
|
-
className={cn("
|
|
195
|
+
className={cn("tabs", className)}
|
|
196
196
|
{...props}
|
|
197
197
|
/>
|
|
198
198
|
));
|
|
@@ -204,10 +204,7 @@ const TabsList = React.forwardRef<
|
|
|
204
204
|
>(({ className, ...props }, ref) => (
|
|
205
205
|
<TabsPrimitive.List
|
|
206
206
|
ref={ref}
|
|
207
|
-
className={cn(
|
|
208
|
-
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
209
|
-
className,
|
|
210
|
-
)}
|
|
207
|
+
className={cn("tabs-list", className)}
|
|
211
208
|
{...props}
|
|
212
209
|
/>
|
|
213
210
|
));
|
|
@@ -219,10 +216,7 @@ const TabsTrigger = React.forwardRef<
|
|
|
219
216
|
>(({ className, ...props }, ref) => (
|
|
220
217
|
<TabsPrimitive.Trigger
|
|
221
218
|
ref={ref}
|
|
222
|
-
className={cn(
|
|
223
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
224
|
-
className,
|
|
225
|
-
)}
|
|
219
|
+
className={cn("tabs-trigger", className)}
|
|
226
220
|
{...props}
|
|
227
221
|
/>
|
|
228
222
|
));
|
|
@@ -234,10 +228,7 @@ const TabsContent = React.forwardRef<
|
|
|
234
228
|
>(({ className, ...props }, ref) => (
|
|
235
229
|
<TabsPrimitive.Content
|
|
236
230
|
ref={ref}
|
|
237
|
-
className={cn(
|
|
238
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
239
|
-
className,
|
|
240
|
-
)}
|
|
231
|
+
className={cn("tabs-content", className)}
|
|
241
232
|
{...props}
|
|
242
233
|
/>
|
|
243
234
|
));
|