@nuvia/components 1.1.2 → 1.2.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/dist/index.js CHANGED
@@ -1141,7 +1141,7 @@ var CommandItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PUR
1141
1141
  {
1142
1142
  ref,
1143
1143
  className: cn(
1144
- "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none dark:data-[selected=true]:bg-secondary/25 data-[selected=true]:bg-secondary/50 data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1144
+ "relative flex cursor-default gap-2 select-none items-center rounded-md px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary/25 data-[selected=true]:bg-secondary/50 data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1145
1145
  className
1146
1146
  ),
1147
1147
  ...props
@@ -2943,7 +2943,7 @@ function Skeleton({
2943
2943
  return /* @__PURE__ */ jsx(
2944
2944
  "div",
2945
2945
  {
2946
- className: cn("animate-pulse rounded-md bg-secondary dark:bg-secondary/25", className),
2946
+ className: cn("animate-pulse rounded-xl bg-primary/10 ", className),
2947
2947
  ...props
2948
2948
  }
2949
2949
  );
@@ -3028,7 +3028,15 @@ var SidebarProvider = React36.forwardRef(
3028
3028
  setOpenMobile,
3029
3029
  toggleSidebar
3030
3030
  }),
3031
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
3031
+ [
3032
+ state,
3033
+ open,
3034
+ setOpen,
3035
+ isMobile,
3036
+ openMobile,
3037
+ setOpenMobile,
3038
+ toggleSidebar
3039
+ ]
3032
3040
  );
3033
3041
  return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
3034
3042
  "div",
@@ -3289,7 +3297,7 @@ var SidebarGroupLabel = React36.forwardRef(({ className, asChild = false, ...pro
3289
3297
  ref,
3290
3298
  "data-sidebar": "group-label",
3291
3299
  className: cn(
3292
- "duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
3300
+ "duration-200 flex h-8 shrink-0 items-center rounded-xl px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
3293
3301
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
3294
3302
  className
3295
3303
  ),
@@ -3306,7 +3314,7 @@ var SidebarGroupAction = React36.forwardRef(({ className, asChild = false, ...pr
3306
3314
  ref,
3307
3315
  "data-sidebar": "group-action",
3308
3316
  className: cn(
3309
- "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
3317
+ "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-xl p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform bg-primary/10 hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
3310
3318
  // Increases the hit area of the button on mobile.
3311
3319
  "after:absolute after:-inset-2 after:md:hidden",
3312
3320
  "group-data-[collapsible=icon]:hidden",
@@ -3421,7 +3429,7 @@ var SidebarMenuAction = React36.forwardRef(({ className, asChild = false, showOn
3421
3429
  ref,
3422
3430
  "data-sidebar": "menu-action",
3423
3431
  className: cn(
3424
- "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
3432
+ "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-xl p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
3425
3433
  // Increases the hit area of the button on mobile.
3426
3434
  "after:absolute after:-inset-2 after:md:hidden",
3427
3435
  "peer-data-[size=sm]/menu-button:top-1",
@@ -3442,7 +3450,7 @@ var SidebarMenuBadge = React36.forwardRef(({ className, ...props }, ref) => /* @
3442
3450
  ref,
3443
3451
  "data-sidebar": "menu-badge",
3444
3452
  className: cn(
3445
- "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
3453
+ "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
3446
3454
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
3447
3455
  "peer-data-[size=sm]/menu-button:top-1",
3448
3456
  "peer-data-[size=default]/menu-button:top-1.5",
@@ -3463,13 +3471,13 @@ var SidebarMenuSkeleton = React36.forwardRef(({ className, showIcon = false, ...
3463
3471
  {
3464
3472
  ref,
3465
3473
  "data-sidebar": "menu-skeleton",
3466
- className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
3474
+ className: cn("rounded-xl h-8 flex gap-2 px-2 items-center", className),
3467
3475
  ...props,
3468
3476
  children: [
3469
3477
  showIcon && /* @__PURE__ */ jsx(
3470
3478
  Skeleton,
3471
3479
  {
3472
- className: "size-4 rounded-md",
3480
+ className: "size-4 rounded-xl",
3473
3481
  "data-sidebar": "menu-skeleton-icon"
3474
3482
  }
3475
3483
  ),
@@ -3514,7 +3522,7 @@ var SidebarMenuSubButton = React36.forwardRef(({ asChild = false, size = "md", i
3514
3522
  "data-size": size,
3515
3523
  "data-active": isActive,
3516
3524
  className: cn(
3517
- "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
3525
+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-xl px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
3518
3526
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
3519
3527
  size === "sm" && "text-xs",
3520
3528
  size === "md" && "text-sm",
@@ -3573,12 +3581,19 @@ var Toaster = ({ ...props }) => {
3573
3581
  }
3574
3582
  );
3575
3583
  };
3576
- var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName }) => {
3584
+ var Spinner = ({
3585
+ className,
3586
+ size = 24,
3587
+ strokeWidth = 80,
3588
+ text,
3589
+ textClassName
3590
+ }) => {
3577
3591
  const gradientId = useId();
3578
3592
  const patternId = useId();
3579
3593
  return /* @__PURE__ */ jsxs(
3580
- "span",
3594
+ "output",
3581
3595
  {
3596
+ "aria-label": "Carregando",
3582
3597
  className: `${className} flex justify-center items-center rounded-full aspect-square relative`,
3583
3598
  style: {
3584
3599
  width: size,
@@ -3602,12 +3617,12 @@ var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName })
3602
3617
  /* @__PURE__ */ jsxs(
3603
3618
  "svg",
3604
3619
  {
3620
+ "aria-hidden": "true",
3605
3621
  xmlns: "http://www.w3.org/2000/svg",
3606
3622
  version: "1.1",
3607
3623
  width: "100%",
3608
3624
  height: "100%",
3609
3625
  viewBox: "0 0 600 600",
3610
- role: "progressbar",
3611
3626
  className: "m-auto flex justify-center items-center",
3612
3627
  children: [
3613
3628
  /* @__PURE__ */ jsxs("defs", { children: [
@@ -3621,12 +3636,46 @@ var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName })
3621
3636
  transform-origin: 300px 300px;
3622
3637
  }
3623
3638
  ` }),
3624
- /* @__PURE__ */ jsxs("linearGradient", { id: `Gradient${gradientId}`, gradientTransform: "rotate(90)", children: [
3625
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: `hsl(var(--color-lilas-400))` }),
3626
- /* @__PURE__ */ jsx("stop", { offset: "75%", stopColor: `hsl(var(--color-indigo-400)/0.5)` }),
3627
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: `hsl(var(--color-madrugada-400)/0)` })
3628
- ] }),
3629
- /* @__PURE__ */ jsx("pattern", { id: `Pattern${patternId}`, x: "0", y: "0", width: "600", height: "600", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("g", { transform: "rotate(0, 300, 300)", children: /* @__PURE__ */ jsx("rect", { shapeRendering: "crispEdges", x: "0", y: "0", width: "300", height: "600", fill: `url(#Gradient${gradientId})` }) }) })
3639
+ /* @__PURE__ */ jsxs(
3640
+ "linearGradient",
3641
+ {
3642
+ id: `Gradient${gradientId}`,
3643
+ gradientTransform: "rotate(90)",
3644
+ children: [
3645
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "hsl(var(--color-lilas-400))" }),
3646
+ /* @__PURE__ */ jsx("stop", { offset: "75%", stopColor: "hsl(var(--color-indigo-400)/0.5)" }),
3647
+ /* @__PURE__ */ jsx(
3648
+ "stop",
3649
+ {
3650
+ offset: "100%",
3651
+ stopColor: "hsl(var(--color-madrugada-400)/0)"
3652
+ }
3653
+ )
3654
+ ]
3655
+ }
3656
+ ),
3657
+ /* @__PURE__ */ jsx(
3658
+ "pattern",
3659
+ {
3660
+ id: `Pattern${patternId}`,
3661
+ x: "0",
3662
+ y: "0",
3663
+ width: "600",
3664
+ height: "600",
3665
+ patternUnits: "userSpaceOnUse",
3666
+ children: /* @__PURE__ */ jsx("g", { transform: "rotate(0, 300, 300)", children: /* @__PURE__ */ jsx(
3667
+ "rect",
3668
+ {
3669
+ shapeRendering: "crispEdges",
3670
+ x: "0",
3671
+ y: "0",
3672
+ width: "300",
3673
+ height: "600",
3674
+ fill: `url(#Gradient${gradientId})`
3675
+ }
3676
+ ) })
3677
+ }
3678
+ )
3630
3679
  ] }),
3631
3680
  /* @__PURE__ */ jsx(
3632
3681
  "path",
@@ -3812,7 +3861,7 @@ var Textarea = React36.forwardRef(({ className, ...props }, ref) => {
3812
3861
  "textarea",
3813
3862
  {
3814
3863
  className: cn(
3815
- "flex min-h-[60px] w-full rounded-xl border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
3864
+ "flex min-h-[60px] w-full rounded-xl border border-input bg-background px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
3816
3865
  className
3817
3866
  ),
3818
3867
  ref,