@the12company/ui 0.1.5 → 0.1.7

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.d.ts CHANGED
@@ -199,6 +199,7 @@ type AuthBrandProps = React$1.HTMLAttributes<HTMLElement> & {
199
199
  logo: React$1.ReactNode;
200
200
  title: React$1.ReactNode;
201
201
  description?: React$1.ReactNode;
202
+ shadow?: boolean;
202
203
  };
203
204
  /**
204
205
  * Centered product brand block above the auth card.
@@ -208,6 +209,7 @@ declare const AuthBrand: React$1.ForwardRefExoticComponent<React$1.HTMLAttribute
208
209
  logo: React$1.ReactNode;
209
210
  title: React$1.ReactNode;
210
211
  description?: React$1.ReactNode;
212
+ shadow?: boolean;
211
213
  } & React$1.RefAttributes<HTMLElement>>;
212
214
 
213
215
  /**
package/dist/index.js CHANGED
@@ -1540,7 +1540,7 @@ var AuthBanner = React11.forwardRef(
1540
1540
  );
1541
1541
  AuthBanner.displayName = "AuthBanner";
1542
1542
  var AuthBrand = React11.forwardRef(
1543
- ({ className, logo, title, description, ...props }, ref) => {
1543
+ ({ className, logo, title, description, shadow = true, ...props }, ref) => {
1544
1544
  return /* @__PURE__ */ jsxs(
1545
1545
  "header",
1546
1546
  {
@@ -1551,7 +1551,16 @@ var AuthBrand = React11.forwardRef(
1551
1551
  ),
1552
1552
  ...props,
1553
1553
  children: [
1554
- /* @__PURE__ */ jsx("div", { className: "mb-5 flex h-16 w-16 items-center justify-center rounded-2xl shadow-lg shadow-primary/30 ring-4 ring-primary/10 transition-all duration-500 hover:-translate-y-0.5 hover:shadow-xl hover:shadow-primary/30", children: logo }),
1554
+ /* @__PURE__ */ jsx(
1555
+ "div",
1556
+ {
1557
+ className: cn(
1558
+ "mb-5 flex h-16 w-16 items-center justify-center rounded-2xl transition-all duration-500 hover:-translate-y-0.5",
1559
+ shadow && "shadow-lg shadow-primary/30 ring-4 ring-primary/10 hover:shadow-xl hover:shadow-primary/30"
1560
+ ),
1561
+ children: logo
1562
+ }
1563
+ ),
1555
1564
  /* @__PURE__ */ jsx("h1", { className: "text-balance text-2xl font-bold tracking-tight text-foreground sm:text-[1.75rem]", children: title }),
1556
1565
  description ? /* @__PURE__ */ jsx("p", { className: "mt-1 max-w-sm text-pretty text-sm font-normal leading-relaxed text-foreground opacity-80", children: description }) : null
1557
1566
  ]
@@ -1655,7 +1664,13 @@ var AuthShell = React11.forwardRef(
1655
1664
  children: background
1656
1665
  }
1657
1666
  ) : null,
1658
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 z-[1]", "aria-hidden": true }),
1667
+ /* @__PURE__ */ jsx(
1668
+ "div",
1669
+ {
1670
+ className: "pointer-events-none absolute inset-0 z-[1]",
1671
+ "aria-hidden": true
1672
+ }
1673
+ ),
1659
1674
  /* @__PURE__ */ jsx("div", { className: "relative z-10 w-full max-w-[440px]", children })
1660
1675
  ]
1661
1676
  }
@@ -1731,7 +1746,7 @@ var PasswordInput = React11.forwardRef(
1731
1746
  {
1732
1747
  type: "button",
1733
1748
  tabIndex: -1,
1734
- className: "absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer",
1749
+ className: "absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",
1735
1750
  "aria-label": visible ? "Ocultar senha" : "Mostrar senha",
1736
1751
  onClick: () => setVisible((v) => !v),
1737
1752
  children: visible ? /* @__PURE__ */ jsx(EyeOff, { className: toggleIconClass, "aria-hidden": true, size: 18 }) : /* @__PURE__ */ jsx(Eye, { className: toggleIconClass, "aria-hidden": true, size: 18 })
@@ -2900,6 +2915,7 @@ var Dropdown = React11.forwardRef(function Dropdown2({ open, isFiltered = false,
2900
2915
  "h-9 translate-y-0 justify-between gap-1 px-2 font-normal text-sm transition-all duration-300",
2901
2916
  "border-border/80 shadow-[0_2px_6px_hsl(var(--foreground)/0.08)] dark:shadow-[0_2px_5px_-1px_rgba(0,0,0,0.55)]",
2902
2917
  "hover:translate-y-0 hover:border-border hover:shadow-[0_4px_10px_hsl(var(--foreground)/0.12)] dark:hover:shadow-[0_3px_8px_-2px_rgba(0,0,0,0.65)]",
2918
+ "focus-visible:ring-0 focus-visible:ring-offset-0",
2903
2919
  isFiltered ? "border-primary/45 bg-primary/[0.07] font-medium shadow-sm ring-1 ring-inset ring-primary/15 hover:bg-primary/[0.07] hover:border-primary hover:text-foreground dark:shadow-[0_1px_4px_-1px_rgba(0,0,0,0.5)] dark:hover:shadow-[0_2px_6px_-2px_rgba(0,0,0,0.55)]" : "hover:bg-background hover:text-foreground hover:border-primary/55",
2904
2920
  open && (isFiltered ? "border-primary text-foreground shadow-sm ring-1 ring-inset ring-primary/15 dark:shadow-[0_2px_5px_-1px_rgba(0,0,0,0.55)]" : "border-primary/55 bg-background text-foreground shadow-md dark:shadow-[0_2px_10px_-3px_rgba(0,0,0,0.6)]"),
2905
2921
  className
@@ -2919,7 +2935,7 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
2919
2935
  {
2920
2936
  ref,
2921
2937
  className: cn(
2922
- "flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[state=open]:bg-accent/80 focus:bg-accent/80",
2938
+ "flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[state=open]:bg-accent/80 focus:bg-accent/80 focus-visible:outline-none",
2923
2939
  inset && "pl-8",
2924
2940
  className
2925
2941
  ),
@@ -2936,20 +2952,24 @@ var DropdownMenuSubContent = React11.forwardRef(({ className, ...props }, ref) =
2936
2952
  {
2937
2953
  ref,
2938
2954
  className: cn(
2939
- "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_30px_hsl(var(--foreground)/0.14)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2955
+ "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_30px_hsl(var(--foreground)/0.14)] outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2940
2956
  className
2941
2957
  ),
2942
2958
  ...props
2943
2959
  }
2944
2960
  ));
2945
2961
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2946
- var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2962
+ var DropdownMenuContent = React11.forwardRef(({ className, sideOffset = 4, onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2947
2963
  DropdownMenuPrimitive.Content,
2948
2964
  {
2949
2965
  ref,
2950
2966
  sideOffset,
2967
+ onCloseAutoFocus: (event) => {
2968
+ event.preventDefault();
2969
+ onCloseAutoFocus?.(event);
2970
+ },
2951
2971
  className: cn(
2952
- "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_15px_hsl(var(--foreground)/0.05)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2972
+ "z-50 min-w-[8rem] overflow-hidden rounded-lg border border-border/80 bg-popover p-1 text-popover-foreground shadow-[0_10px_15px_hsl(var(--foreground)/0.05)] outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2953
2973
  className
2954
2974
  ),
2955
2975
  ...props
@@ -2961,7 +2981,7 @@ var DropdownMenuItem = React11.forwardRef(({ className, inset, ...props }, ref)
2961
2981
  {
2962
2982
  ref,
2963
2983
  className: cn(
2964
- "relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground",
2984
+ "relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground focus-visible:outline-none",
2965
2985
  inset && "pl-8",
2966
2986
  className
2967
2987
  ),
@@ -2974,7 +2994,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, checke
2974
2994
  {
2975
2995
  ref,
2976
2996
  className: cn(
2977
- "relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground",
2997
+ "relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground focus-visible:outline-none",
2978
2998
  className
2979
2999
  ),
2980
3000
  checked,
@@ -2991,12 +3011,12 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, ...props
2991
3011
  {
2992
3012
  ref,
2993
3013
  className: cn(
2994
- "relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground",
3014
+ "relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent/80 focus:text-accent-foreground focus-visible:outline-none",
2995
3015
  className
2996
3016
  ),
2997
3017
  ...props,
2998
3018
  children: [
2999
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
3019
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
3000
3020
  children
3001
3021
  ]
3002
3022
  }