@nuvia/components 1.1.1 → 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.cjs CHANGED
@@ -1192,7 +1192,7 @@ var CommandItem = React36__namespace.forwardRef(({ className, ...props }, ref) =
1192
1192
  {
1193
1193
  ref,
1194
1194
  className: cn(
1195
- "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",
1195
+ "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",
1196
1196
  className
1197
1197
  ),
1198
1198
  ...props
@@ -2994,7 +2994,7 @@ function Skeleton({
2994
2994
  return /* @__PURE__ */ jsxRuntime.jsx(
2995
2995
  "div",
2996
2996
  {
2997
- className: cn("animate-pulse rounded-md bg-secondary dark:bg-secondary/25", className),
2997
+ className: cn("animate-pulse rounded-xl bg-primary/10 ", className),
2998
2998
  ...props
2999
2999
  }
3000
3000
  );
@@ -3079,7 +3079,15 @@ var SidebarProvider = React36__namespace.forwardRef(
3079
3079
  setOpenMobile,
3080
3080
  toggleSidebar
3081
3081
  }),
3082
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
3082
+ [
3083
+ state,
3084
+ open,
3085
+ setOpen,
3086
+ isMobile,
3087
+ openMobile,
3088
+ setOpenMobile,
3089
+ toggleSidebar
3090
+ ]
3083
3091
  );
3084
3092
  return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
3085
3093
  "div",
@@ -3340,7 +3348,7 @@ var SidebarGroupLabel = React36__namespace.forwardRef(({ className, asChild = fa
3340
3348
  ref,
3341
3349
  "data-sidebar": "group-label",
3342
3350
  className: cn(
3343
- "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",
3351
+ "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",
3344
3352
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
3345
3353
  className
3346
3354
  ),
@@ -3357,7 +3365,7 @@ var SidebarGroupAction = React36__namespace.forwardRef(({ className, asChild = f
3357
3365
  ref,
3358
3366
  "data-sidebar": "group-action",
3359
3367
  className: cn(
3360
- "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",
3368
+ "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",
3361
3369
  // Increases the hit area of the button on mobile.
3362
3370
  "after:absolute after:-inset-2 after:md:hidden",
3363
3371
  "group-data-[collapsible=icon]:hidden",
@@ -3472,7 +3480,7 @@ var SidebarMenuAction = React36__namespace.forwardRef(({ className, asChild = fa
3472
3480
  ref,
3473
3481
  "data-sidebar": "menu-action",
3474
3482
  className: cn(
3475
- "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",
3483
+ "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",
3476
3484
  // Increases the hit area of the button on mobile.
3477
3485
  "after:absolute after:-inset-2 after:md:hidden",
3478
3486
  "peer-data-[size=sm]/menu-button:top-1",
@@ -3493,7 +3501,7 @@ var SidebarMenuBadge = React36__namespace.forwardRef(({ className, ...props }, r
3493
3501
  ref,
3494
3502
  "data-sidebar": "menu-badge",
3495
3503
  className: cn(
3496
- "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",
3504
+ "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",
3497
3505
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
3498
3506
  "peer-data-[size=sm]/menu-button:top-1",
3499
3507
  "peer-data-[size=default]/menu-button:top-1.5",
@@ -3514,13 +3522,13 @@ var SidebarMenuSkeleton = React36__namespace.forwardRef(({ className, showIcon =
3514
3522
  {
3515
3523
  ref,
3516
3524
  "data-sidebar": "menu-skeleton",
3517
- className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
3525
+ className: cn("rounded-xl h-8 flex gap-2 px-2 items-center", className),
3518
3526
  ...props,
3519
3527
  children: [
3520
3528
  showIcon && /* @__PURE__ */ jsxRuntime.jsx(
3521
3529
  Skeleton,
3522
3530
  {
3523
- className: "size-4 rounded-md",
3531
+ className: "size-4 rounded-xl",
3524
3532
  "data-sidebar": "menu-skeleton-icon"
3525
3533
  }
3526
3534
  ),
@@ -3565,7 +3573,7 @@ var SidebarMenuSubButton = React36__namespace.forwardRef(({ asChild = false, siz
3565
3573
  "data-size": size,
3566
3574
  "data-active": isActive,
3567
3575
  className: cn(
3568
- "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",
3576
+ "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",
3569
3577
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
3570
3578
  size === "sm" && "text-xs",
3571
3579
  size === "md" && "text-sm",
@@ -3624,12 +3632,19 @@ var Toaster = ({ ...props }) => {
3624
3632
  }
3625
3633
  );
3626
3634
  };
3627
- var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName }) => {
3635
+ var Spinner = ({
3636
+ className,
3637
+ size = 24,
3638
+ strokeWidth = 80,
3639
+ text,
3640
+ textClassName
3641
+ }) => {
3628
3642
  const gradientId = React36.useId();
3629
3643
  const patternId = React36.useId();
3630
3644
  return /* @__PURE__ */ jsxRuntime.jsxs(
3631
- "span",
3645
+ "output",
3632
3646
  {
3647
+ "aria-label": "Carregando",
3633
3648
  className: `${className} flex justify-center items-center rounded-full aspect-square relative`,
3634
3649
  style: {
3635
3650
  width: size,
@@ -3653,12 +3668,12 @@ var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName })
3653
3668
  /* @__PURE__ */ jsxRuntime.jsxs(
3654
3669
  "svg",
3655
3670
  {
3671
+ "aria-hidden": "true",
3656
3672
  xmlns: "http://www.w3.org/2000/svg",
3657
3673
  version: "1.1",
3658
3674
  width: "100%",
3659
3675
  height: "100%",
3660
3676
  viewBox: "0 0 600 600",
3661
- role: "progressbar",
3662
3677
  className: "m-auto flex justify-center items-center",
3663
3678
  children: [
3664
3679
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
@@ -3672,12 +3687,46 @@ var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName })
3672
3687
  transform-origin: 300px 300px;
3673
3688
  }
3674
3689
  ` }),
3675
- /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: `Gradient${gradientId}`, gradientTransform: "rotate(90)", children: [
3676
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: `hsl(var(--color-lilas-400))` }),
3677
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "75%", stopColor: `hsl(var(--color-indigo-400)/0.5)` }),
3678
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: `hsl(var(--color-madrugada-400)/0)` })
3679
- ] }),
3680
- /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: `Pattern${patternId}`, x: "0", y: "0", width: "600", height: "600", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: "rotate(0, 300, 300)", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { shapeRendering: "crispEdges", x: "0", y: "0", width: "300", height: "600", fill: `url(#Gradient${gradientId})` }) }) })
3690
+ /* @__PURE__ */ jsxRuntime.jsxs(
3691
+ "linearGradient",
3692
+ {
3693
+ id: `Gradient${gradientId}`,
3694
+ gradientTransform: "rotate(90)",
3695
+ children: [
3696
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "hsl(var(--color-lilas-400))" }),
3697
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "75%", stopColor: "hsl(var(--color-indigo-400)/0.5)" }),
3698
+ /* @__PURE__ */ jsxRuntime.jsx(
3699
+ "stop",
3700
+ {
3701
+ offset: "100%",
3702
+ stopColor: "hsl(var(--color-madrugada-400)/0)"
3703
+ }
3704
+ )
3705
+ ]
3706
+ }
3707
+ ),
3708
+ /* @__PURE__ */ jsxRuntime.jsx(
3709
+ "pattern",
3710
+ {
3711
+ id: `Pattern${patternId}`,
3712
+ x: "0",
3713
+ y: "0",
3714
+ width: "600",
3715
+ height: "600",
3716
+ patternUnits: "userSpaceOnUse",
3717
+ children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: "rotate(0, 300, 300)", children: /* @__PURE__ */ jsxRuntime.jsx(
3718
+ "rect",
3719
+ {
3720
+ shapeRendering: "crispEdges",
3721
+ x: "0",
3722
+ y: "0",
3723
+ width: "300",
3724
+ height: "600",
3725
+ fill: `url(#Gradient${gradientId})`
3726
+ }
3727
+ ) })
3728
+ }
3729
+ )
3681
3730
  ] }),
3682
3731
  /* @__PURE__ */ jsxRuntime.jsx(
3683
3732
  "path",
@@ -3863,7 +3912,7 @@ var Textarea = React36__namespace.forwardRef(({ className, ...props }, ref) => {
3863
3912
  "textarea",
3864
3913
  {
3865
3914
  className: cn(
3866
- "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",
3915
+ "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",
3867
3916
  className
3868
3917
  ),
3869
3918
  ref,