@navservice/usuario 1.26.0 → 1.28.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.
@@ -1 +1,2 @@
1
1
  export declare const AuthAtivarDesativarAuthenticator: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare function AuthAtivarDesativarAuthenticatorButton(): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export { AuthAtivarDesativarAuthenticator } from "./AuthAtivarDesativarAuthenticator";
1
+ export { AuthAtivarDesativarAuthenticator, AuthAtivarDesativarAuthenticatorButton } from "./AuthAtivarDesativarAuthenticator";
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from "react";
2
+ type DrawerFullScreenProps = {
3
+ title?: ReactNode;
4
+ children?: ReactNode;
5
+ onClose?: () => void;
6
+ };
7
+ export type TypeDrawerFullScreenRef = {
8
+ abrir: () => void;
9
+ fechar: () => void;
10
+ };
11
+ export declare const DrawerFullScreen: import("react").ForwardRefExoticComponent<DrawerFullScreenProps & import("react").RefAttributes<TypeDrawerFullScreenRef>>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { DrawerFullScreen, TypeDrawerFullScreenRef } from "./DraweFullScreen";
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from "react";
2
+ type DrawerPadraoProps = {
3
+ title?: ReactNode;
4
+ children?: ReactNode;
5
+ onClose?: () => void;
6
+ };
7
+ export type TypeDrawerPadraoRef = {
8
+ abrir: () => void;
9
+ fechar: () => void;
10
+ };
11
+ export declare const DrawerPadrao: import("react").ForwardRefExoticComponent<DrawerPadraoProps & import("react").RefAttributes<TypeDrawerPadraoRef>>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { TypeDrawerPadraoRef, DrawerPadrao } from "./DrawerPadrao";
@@ -1,17 +1,14 @@
1
1
  import t from "../../../shared/types";
2
2
  interface TypesConfigEnv {
3
- SET_PUBLIC_BASE_URL_BACKEND_USUARIO: string;
4
3
  SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0: string;
5
4
  SET_APP: t.Controller.Usuario.UsuarioAuth["app"];
6
5
  SET_USUARIO_TIPO: t.Controller.Usuario.UsuarioAuth["usuario_tipo"];
7
6
  }
8
7
  declare class config_env {
9
- private static SET_PUBLIC_BASE_URL_BACKEND_USUARIO;
10
8
  private static SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
11
9
  private static SET_APP;
12
10
  private static SET_USUARIO_TIPO;
13
11
  static init(config: TypesConfigEnv): void;
14
- static get PUBLIC_BASE_URL_BACKEND_PRINCIPAL(): string;
15
12
  static get PUBLIC_GOOGLE_CLIENT_ID_AUTH0(): string;
16
13
  static get PUBLIC_APP(): t.Controller.Usuario.UsuarioAuth["app"];
17
14
  static get PUBLIC_USUARIO_TIPO(): t.Controller.Usuario.UsuarioAuth["usuario_tipo"];
@@ -1,12 +1,14 @@
1
1
  export { default as config_env_usuario } from "./config_env";
2
2
  export { default as contexto_usuario } from "./contexto/contexto_usuario";
3
3
  export { default as contexto_layout } from "./contexto/contexto_layout";
4
- export { AuthAtivarDesativarAuthenticator } from "./componentes/auth/AuthAtivarDesativarAuthenticator";
5
- export { AuthGoogle } from "./componentes/auth/AuthGoogle";
4
+ export { AuthAtivarDesativarAuthenticatorButton } from "./componentes/auth/AuthAtivarDesativarAuthenticator";
6
5
  export { EsqueciMinhaSenha } from "./componentes/auth/EsqueciMinhaSenha";
6
+ export { AuthGoogle } from "./componentes/auth/AuthGoogle";
7
7
  export { AuthLogin } from "./componentes/auth/AuthLogin";
8
8
  export { AuthRegister } from "./componentes/auth/AuthRegister";
9
9
  export { VerificarAuthenticator } from "./componentes/auth/VerificarAuthenticator";
10
+ export { DrawerFullScreen, TypeDrawerFullScreenRef } from "./componentes/drawer/DraweFullScreen";
11
+ export { DrawerPadrao, TypeDrawerPadraoRef } from "./componentes/drawer/DrawerPadrao";
10
12
  export { Layout } from "./componentes/layout";
11
13
  export { LayoutPublic } from "./componentes/layoutPublic";
12
14
  export { default as TypesUsuario } from "../../shared/types";
package/build/es/index.js CHANGED
@@ -2,11 +2,11 @@
2
2
  import { create as external_zustand_create } from "zustand";
3
3
  import { immer } from "zustand/middleware/immer";
4
4
  import v4 from "zod/v4";
5
- import react, { createElement, forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
5
+ import react, { createElement, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { QRCodeSVG } from "qrcode.react";
8
- import { GoogleLogin, GoogleOAuthProvider } from "@react-oauth/google";
9
8
  import { Outlet, useLocation, useNavigate, useSearchParams } from "react-router-dom";
9
+ import { GoogleLogin, GoogleOAuthProvider } from "@react-oauth/google";
10
10
  import { $ZodError, parse, parseAsync } from "zod/v4/core";
11
11
  var __webpack_require__ = {};
12
12
  (()=>{
@@ -39,20 +39,25 @@ __webpack_require__.d(common_utils_namespaceObject, {
39
39
  navigator: ()=>_navigator,
40
40
  origin: ()=>utils_origin
41
41
  });
42
+ var DrawerPadrao_namespaceObject = {};
43
+ __webpack_require__.r(DrawerPadrao_namespaceObject);
44
+ __webpack_require__.d(DrawerPadrao_namespaceObject, {
45
+ z: ()=>DrawerPadrao
46
+ });
47
+ var DraweFullScreen_namespaceObject = {};
48
+ __webpack_require__.r(DraweFullScreen_namespaceObject);
49
+ __webpack_require__.d(DraweFullScreen_namespaceObject, {
50
+ L: ()=>DrawerFullScreen
51
+ });
42
52
  class config_env {
43
- static SET_PUBLIC_BASE_URL_BACKEND_USUARIO;
44
53
  static SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
45
54
  static SET_APP;
46
55
  static SET_USUARIO_TIPO;
47
56
  static init(config) {
48
- config_env.SET_PUBLIC_BASE_URL_BACKEND_USUARIO = config.SET_PUBLIC_BASE_URL_BACKEND_USUARIO;
49
57
  config_env.SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0 = config.SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
50
58
  config_env.SET_APP = config.SET_APP;
51
59
  config_env.SET_USUARIO_TIPO = config.SET_USUARIO_TIPO;
52
60
  }
53
- static get PUBLIC_BASE_URL_BACKEND_PRINCIPAL() {
54
- return this.SET_PUBLIC_BASE_URL_BACKEND_USUARIO;
55
- }
56
61
  static get PUBLIC_GOOGLE_CLIENT_ID_AUTH0() {
57
62
  return this.SET_PUBLIC_GOOGLE_CLIENT_ID_AUTH0;
58
63
  }
@@ -3727,6 +3732,150 @@ const Copy = createLucideIcon("copy", copy_iconNode);
3727
3732
  ]
3728
3733
  ];
3729
3734
  const CircleCheck = createLucideIcon("circle-check", circle_check_iconNode);
3735
+ /**
3736
+ * @license lucide-react v0.544.0 - ISC
3737
+ *
3738
+ * This source code is licensed under the ISC license.
3739
+ * See the LICENSE file in the root directory of this source tree.
3740
+ */ const chevron_right_iconNode = [
3741
+ [
3742
+ "path",
3743
+ {
3744
+ d: "m9 18 6-6-6-6",
3745
+ key: "mthhwq"
3746
+ }
3747
+ ]
3748
+ ];
3749
+ const ChevronRight = createLucideIcon("chevron-right", chevron_right_iconNode);
3750
+ /**
3751
+ * @license lucide-react v0.544.0 - ISC
3752
+ *
3753
+ * This source code is licensed under the ISC license.
3754
+ * See the LICENSE file in the root directory of this source tree.
3755
+ */ const house_iconNode = [
3756
+ [
3757
+ "path",
3758
+ {
3759
+ d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
3760
+ key: "5wwlr5"
3761
+ }
3762
+ ],
3763
+ [
3764
+ "path",
3765
+ {
3766
+ d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
3767
+ key: "r6nss1"
3768
+ }
3769
+ ]
3770
+ ];
3771
+ const House = createLucideIcon("house", house_iconNode);
3772
+ /**
3773
+ * @license lucide-react v0.544.0 - ISC
3774
+ *
3775
+ * This source code is licensed under the ISC license.
3776
+ * See the LICENSE file in the root directory of this source tree.
3777
+ */ const x_iconNode = [
3778
+ [
3779
+ "path",
3780
+ {
3781
+ d: "M18 6 6 18",
3782
+ key: "1bl5f8"
3783
+ }
3784
+ ],
3785
+ [
3786
+ "path",
3787
+ {
3788
+ d: "m6 6 12 12",
3789
+ key: "d8bk6v"
3790
+ }
3791
+ ]
3792
+ ];
3793
+ const X = createLucideIcon("x", x_iconNode);
3794
+ const DrawerPadrao = /*#__PURE__*/ forwardRef(({ title, children, onClose }, ref)=>{
3795
+ const [open, setOpen] = useState(false);
3796
+ const closeBtnRef = useRef(null);
3797
+ useImperativeHandle(ref, ()=>({
3798
+ abrir: ()=>{
3799
+ setOpen(true);
3800
+ },
3801
+ fechar: ()=>{
3802
+ setOpen(false);
3803
+ onClose?.();
3804
+ }
3805
+ }));
3806
+ useEffect(()=>{
3807
+ if (!open) return;
3808
+ const onKey = (e)=>"Escape" === e.key && ref?.current?.fechar();
3809
+ window.addEventListener("keydown", onKey);
3810
+ return ()=>window.removeEventListener("keydown", onKey);
3811
+ }, [
3812
+ open,
3813
+ ref
3814
+ ]);
3815
+ useEffect(()=>{
3816
+ const prev = document.documentElement.style.overflow;
3817
+ if (open) document.documentElement.style.overflow = "hidden";
3818
+ return ()=>{
3819
+ document.documentElement.style.overflow = prev;
3820
+ };
3821
+ }, [
3822
+ open
3823
+ ]);
3824
+ useEffect(()=>{
3825
+ if (open) setTimeout(()=>closeBtnRef.current?.focus(), 0);
3826
+ }, [
3827
+ open
3828
+ ]);
3829
+ return /*#__PURE__*/ jsxs("div", {
3830
+ role: "dialog",
3831
+ "aria-modal": "true",
3832
+ className: `fixed inset-0 z-50 transition-opacity duration-300 ${open ? "opacity-100" : "opacity-0 pointer-events-none"}`,
3833
+ children: [
3834
+ /*#__PURE__*/ jsx("div", {
3835
+ className: "absolute inset-0 bg-black/20 backdrop-blur-[1px]",
3836
+ onClick: ()=>ref?.current?.fechar()
3837
+ }),
3838
+ /*#__PURE__*/ jsxs("aside", {
3839
+ className: `absolute right-0 top-0 h-full w-full md:max-w-[720px] bg-white shadow-2xl border-l border-gray-200
3840
+ transform transition-transform duration-400
3841
+ ${open ? "translate-x-0" : "translate-x-full"}`,
3842
+ onClick: (e)=>e.stopPropagation(),
3843
+ children: [
3844
+ /*#__PURE__*/ jsxs("div", {
3845
+ className: "flex items-center justify-between p-3.5 border-b border-gray-200",
3846
+ children: [
3847
+ title ?? /*#__PURE__*/ jsxs("div", {
3848
+ className: "flex items-center gap-3",
3849
+ children: [
3850
+ /*#__PURE__*/ jsx(House, {
3851
+ className: "h-6 w-6 text-gray-800"
3852
+ }),
3853
+ /*#__PURE__*/ jsx("h1", {
3854
+ className: "text-xl font-bold text-gray-900",
3855
+ children: title
3856
+ })
3857
+ ]
3858
+ }),
3859
+ /*#__PURE__*/ jsx("button", {
3860
+ ref: closeBtnRef,
3861
+ onClick: ()=>ref?.current?.fechar(),
3862
+ className: "inline-flex items-center gap-2 cursor-pointer rounded-full border border-gray-200 bg-white px-2 py-2 text-sm text-gray-700 hover:bg-gray-50",
3863
+ "aria-label": "Fechar",
3864
+ children: /*#__PURE__*/ jsx(X, {
3865
+ className: "h-4 w-4 text-red-600"
3866
+ })
3867
+ })
3868
+ ]
3869
+ }),
3870
+ /*#__PURE__*/ jsx("div", {
3871
+ className: "h-[calc(100%-64px)] overflow-auto",
3872
+ children: children
3873
+ })
3874
+ ]
3875
+ })
3876
+ ]
3877
+ });
3878
+ });
3730
3879
  const AuthAtivarDesativarAuthenticator = ()=>{
3731
3880
  const [senha, setSenha] = useState("");
3732
3881
  const [mostrarSenhaStep, setMostrarSenhaStep] = useState(false);
@@ -3770,7 +3919,7 @@ const AuthAtivarDesativarAuthenticator = ()=>{
3770
3919
  });
3771
3920
  await buscar_authenticator();
3772
3921
  }
3773
- const handleConfirmarSenha = async ()=>{
3922
+ async function handleConfirmarSenha() {
3774
3923
  if (!senha || senha.length < 6) return void setErro("A senha deve ter pelo menos 6 caracteres");
3775
3924
  setCarregando(true);
3776
3925
  setErro("");
@@ -3802,8 +3951,8 @@ const AuthAtivarDesativarAuthenticator = ()=>{
3802
3951
  } finally{
3803
3952
  setCarregando(false);
3804
3953
  }
3805
- };
3806
- const handleAtivar = async ()=>{
3954
+ }
3955
+ async function handleAtivar() {
3807
3956
  if (!codigoOtp) return void setErro("Digite o código OTP do app autenticador");
3808
3957
  setCarregando(true);
3809
3958
  setErro("");
@@ -3829,7 +3978,7 @@ const AuthAtivarDesativarAuthenticator = ()=>{
3829
3978
  await buscar_authenticator();
3830
3979
  setCarregando(false);
3831
3980
  }
3832
- };
3981
+ }
3833
3982
  return /*#__PURE__*/ jsx("div", {
3834
3983
  className: "max-w-xl mx-auto px-4 py-8",
3835
3984
  children: /*#__PURE__*/ jsxs("div", {
@@ -4004,36 +4153,47 @@ const AuthAtivarDesativarAuthenticator = ()=>{
4004
4153
  })
4005
4154
  });
4006
4155
  };
4007
- function AuthGoogle({ mode }) {
4008
- async function handleSubmitAuthGoogle(auth) {
4009
- if (!auth?.credential) return;
4010
- await contexto_contexto_usuario.api.login_register_google({
4011
- data: {
4012
- usuario: {
4013
- auth_google_credential: auth?.credential,
4014
- app: src_config_env.PUBLIC_APP,
4015
- usuario_tipo: src_config_env.PUBLIC_USUARIO_TIPO
4016
- }
4017
- }
4018
- });
4156
+ function AuthAtivarDesativarAuthenticatorButton() {
4157
+ const drawerRef = useRef(null);
4158
+ function abrirDrawer() {
4159
+ drawerRef.current?.abrir();
4019
4160
  }
4020
- return /*#__PURE__*/ jsx(Fragment, {
4021
- children: /*#__PURE__*/ jsx(GoogleOAuthProvider, {
4022
- clientId: src_config_env.PUBLIC_GOOGLE_CLIENT_ID_AUTH0,
4023
- children: /*#__PURE__*/ jsx(GoogleLogin, {
4024
- type: "standard",
4025
- size: "large",
4026
- theme: "outline",
4027
- text: mode,
4028
- onSuccess: (auth)=>{
4029
- handleSubmitAuthGoogle(auth);
4030
- },
4031
- onError: ()=>{
4032
- console.log("Login Failed");
4033
- },
4034
- useOneTap: true
4161
+ return /*#__PURE__*/ jsxs(Fragment, {
4162
+ children: [
4163
+ /*#__PURE__*/ jsxs("div", {
4164
+ className: "px-4 py-3 space-y-2",
4165
+ children: [
4166
+ /*#__PURE__*/ jsxs("div", {
4167
+ className: "flex items-center gap-2 text-sm font-medium text-zinc-900 dark:text-zinc-100",
4168
+ children: [
4169
+ /*#__PURE__*/ jsx(Shield, {
4170
+ size: 18,
4171
+ className: "text-zinc-500"
4172
+ }),
4173
+ "Seguran\xe7a"
4174
+ ]
4175
+ }),
4176
+ /*#__PURE__*/ jsxs("button", {
4177
+ type: "button",
4178
+ onClick: abrirDrawer,
4179
+ className: "w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition",
4180
+ children: [
4181
+ /*#__PURE__*/ jsx("span", {
4182
+ children: "Autentica\xe7\xe3o em duas etapas"
4183
+ }),
4184
+ /*#__PURE__*/ jsx(ChevronRight, {
4185
+ size: 14,
4186
+ className: "text-zinc-400"
4187
+ })
4188
+ ]
4189
+ })
4190
+ ]
4191
+ }),
4192
+ /*#__PURE__*/ jsx(DrawerPadrao, {
4193
+ ref: drawerRef,
4194
+ children: /*#__PURE__*/ jsx(AuthAtivarDesativarAuthenticator, {})
4035
4195
  })
4036
- })
4196
+ ]
4037
4197
  });
4038
4198
  }
4039
4199
  const TEMPO_COOLDOWN = 60;
@@ -4307,6 +4467,38 @@ function EsqueciMinhaSenha({ email: emailProp }) {
4307
4467
  })
4308
4468
  });
4309
4469
  }
4470
+ function AuthGoogle({ mode }) {
4471
+ async function handleSubmitAuthGoogle(auth) {
4472
+ if (!auth?.credential) return;
4473
+ await contexto_contexto_usuario.api.login_register_google({
4474
+ data: {
4475
+ usuario: {
4476
+ auth_google_credential: auth?.credential,
4477
+ app: src_config_env.PUBLIC_APP,
4478
+ usuario_tipo: src_config_env.PUBLIC_USUARIO_TIPO
4479
+ }
4480
+ }
4481
+ });
4482
+ }
4483
+ return /*#__PURE__*/ jsx(Fragment, {
4484
+ children: /*#__PURE__*/ jsx(GoogleOAuthProvider, {
4485
+ clientId: src_config_env.PUBLIC_GOOGLE_CLIENT_ID_AUTH0,
4486
+ children: /*#__PURE__*/ jsx(GoogleLogin, {
4487
+ type: "standard",
4488
+ size: "large",
4489
+ theme: "outline",
4490
+ text: mode,
4491
+ onSuccess: (auth)=>{
4492
+ handleSubmitAuthGoogle(auth);
4493
+ },
4494
+ onError: ()=>{
4495
+ console.log("Login Failed");
4496
+ },
4497
+ useOneTap: true
4498
+ })
4499
+ })
4500
+ });
4501
+ }
4310
4502
  var isCheckBoxInput = (element)=>'checkbox' === element.type;
4311
4503
  var isDateObject = (value1)=>value1 instanceof Date;
4312
4504
  var isNullOrUndefined = (value1)=>null == value1;
@@ -6466,6 +6658,102 @@ const VerificarAuthenticator = ()=>{
6466
6658
  })
6467
6659
  });
6468
6660
  };
6661
+ /**
6662
+ * @license lucide-react v0.544.0 - ISC
6663
+ *
6664
+ * This source code is licensed under the ISC license.
6665
+ * See the LICENSE file in the root directory of this source tree.
6666
+ */ const chevron_left_iconNode = [
6667
+ [
6668
+ "path",
6669
+ {
6670
+ d: "m15 18-6-6 6-6",
6671
+ key: "1wnfg3"
6672
+ }
6673
+ ]
6674
+ ];
6675
+ const ChevronLeft = createLucideIcon("chevron-left", chevron_left_iconNode);
6676
+ const DrawerFullScreen = /*#__PURE__*/ forwardRef(({ title, children, onClose }, ref)=>{
6677
+ const [open, setOpen] = useState(false);
6678
+ const closeBtnRef = useRef(null);
6679
+ const scrollRef = useRef(null);
6680
+ useImperativeHandle(ref, ()=>({
6681
+ abrir: ()=>{
6682
+ setOpen(true);
6683
+ },
6684
+ fechar: ()=>{
6685
+ setOpen(false);
6686
+ onClose?.();
6687
+ }
6688
+ }));
6689
+ useEffect(()=>{
6690
+ if (open) {
6691
+ scrollRef.current?.scrollTo({
6692
+ top: 0,
6693
+ behavior: "instant"
6694
+ });
6695
+ setTimeout(()=>closeBtnRef.current?.focus(), 0);
6696
+ }
6697
+ }, [
6698
+ open
6699
+ ]);
6700
+ return /*#__PURE__*/ jsxs("div", {
6701
+ role: "dialog",
6702
+ "aria-modal": "true",
6703
+ className: `fixed inset-0 z-[100] ${open ? "opacity-100" : "opacity-0 pointer-events-none"} transition-opacity`,
6704
+ children: [
6705
+ /*#__PURE__*/ jsx("div", {
6706
+ className: "absolute inset-0 bg-black/40 backdrop-blur-[2px]",
6707
+ onClick: ()=>ref?.current?.fechar()
6708
+ }),
6709
+ /*#__PURE__*/ jsxs("aside", {
6710
+ className: `absolute inset-y-0 right-0 w-full bg-gradient-to-br from-gray-50 to-gray-100 shadow-2xl border-l border-gray-200 flex flex-col
6711
+ transform transition-transform duration-500 ease-in-out
6712
+ ${open ? "translate-x-0" : "translate-x-full"}`,
6713
+ onClick: (e)=>e.stopPropagation(),
6714
+ children: [
6715
+ /*#__PURE__*/ jsxs("div", {
6716
+ className: "flex items-center justify-between px-5 py-4 border-b border-gray-200 shrink-0",
6717
+ children: [
6718
+ /*#__PURE__*/ jsxs("div", {
6719
+ className: "flex items-center gap-3",
6720
+ children: [
6721
+ /*#__PURE__*/ jsx("button", {
6722
+ onClick: ()=>ref?.current?.fechar(),
6723
+ className: "p-1 rounded-full border border-gray-300 bg-white hover:bg-gray-100",
6724
+ children: /*#__PURE__*/ jsx(ChevronLeft, {
6725
+ className: "h-4 w-4 text-gray-700"
6726
+ })
6727
+ }),
6728
+ /*#__PURE__*/ jsx("h1", {
6729
+ className: "text-xl font-bold text-gray-900",
6730
+ children: title
6731
+ })
6732
+ ]
6733
+ }),
6734
+ /*#__PURE__*/ jsx("button", {
6735
+ ref: closeBtnRef,
6736
+ onClick: ()=>ref?.current?.fechar(),
6737
+ className: "p-2 rounded-full border border-gray-300 bg-white hover:bg-gray-100",
6738
+ children: /*#__PURE__*/ jsx(X, {
6739
+ className: "h-5 w-5 text-red-600"
6740
+ })
6741
+ })
6742
+ ]
6743
+ }),
6744
+ /*#__PURE__*/ jsx("div", {
6745
+ ref: scrollRef,
6746
+ className: "flex-1 overflow-y-auto pb-50",
6747
+ children: /*#__PURE__*/ jsx("div", {
6748
+ className: "max-w-6xl mx-auto w-full px-4 py-6",
6749
+ children: children
6750
+ })
6751
+ })
6752
+ ]
6753
+ })
6754
+ ]
6755
+ });
6756
+ });
6469
6757
  const Logo = ()=>/*#__PURE__*/ jsx("div", {
6470
6758
  className: "flex items-center justify-center relative",
6471
6759
  children: /*#__PURE__*/ jsx("h4", {
@@ -6730,7 +7018,7 @@ function Profile({ isCollapsed = false }) {
6730
7018
  ];
6731
7019
  return /*#__PURE__*/ jsxs("div", {
6732
7020
  ref: ref,
6733
- className: "relative z-50",
7021
+ className: "relative z-30",
6734
7022
  children: [
6735
7023
  /*#__PURE__*/ jsxs("button", {
6736
7024
  onClick: ()=>setOpen((p)=>!p),
@@ -6873,12 +7161,14 @@ function Profile({ isCollapsed = false }) {
6873
7161
  });
6874
7162
  }
6875
7163
  const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
6876
- className: " fixed top-0 left-0 right-0 h-16 w-full z-30 flex items-center justify-between px-4 bg-theme-card text-theme-text border-b border-theme-border shadow-sm backdrop-blur-md ",
7164
+ className: " fixed inset-x-0 top-0 z-40 h-16 flex items-center justify-between px-4 md:px-6 bg-theme-card/80 text-theme-text border-b border-theme-border backdrop-blur-xl supports-[backdrop-filter]:bg-theme-card/70 shadow-sm will-change-transform ",
6877
7165
  children: [
6878
7166
  /*#__PURE__*/ jsx("div", {
7167
+ className: "flex items-center gap-3",
6879
7168
  children: /*#__PURE__*/ jsx(NavBar_Logo, {})
6880
7169
  }),
6881
7170
  /*#__PURE__*/ jsx("div", {
7171
+ className: "flex items-center gap-3",
6882
7172
  children: /*#__PURE__*/ jsx(Profile, {
6883
7173
  isCollapsed: true
6884
7174
  })
@@ -6888,14 +7178,19 @@ const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
6888
7178
  const layout_NavBar = NavBar;
6889
7179
  function Layout() {
6890
7180
  return /*#__PURE__*/ jsxs("div", {
6891
- className: "flex w-full min-h-[100dvh] overflow-hidden mainwrapper bg-theme-bg text-theme-text",
7181
+ className: "w-full h-[100dvh] bg-theme-bg text-theme-text",
6892
7182
  children: [
6893
7183
  /*#__PURE__*/ jsx(layout_NavBar, {}),
6894
- /*#__PURE__*/ jsx("div", {
6895
- className: "flex flex-col flex-grow relative z-[1] bg-theme-bg",
6896
- children: /*#__PURE__*/ jsx("div", {
6897
- className: "flex-1 w-full h-full overflow-x-hidden overflow-y-auto box-border",
6898
- children: /*#__PURE__*/ jsx(Outlet, {})
7184
+ /*#__PURE__*/ jsx("main", {
7185
+ className: "h-full overflow-hidden",
7186
+ children: /*#__PURE__*/ jsxs("div", {
7187
+ className: "h-full overflow-y-auto overflow-x-hidden",
7188
+ children: [
7189
+ /*#__PURE__*/ jsx("div", {
7190
+ className: "h-16 shrink-0"
7191
+ }),
7192
+ /*#__PURE__*/ jsx(Outlet, {})
7193
+ ]
6899
7194
  })
6900
7195
  })
6901
7196
  ]
@@ -6982,4 +7277,6 @@ function LayoutPublic() {
6982
7277
  ]
6983
7278
  });
6984
7279
  }
6985
- export { AuthAtivarDesativarAuthenticator, AuthGoogle, AuthLogin, AuthRegister, EsqueciMinhaSenha, Layout, LayoutPublic, shared_types as TypesUsuario, VerificarAuthenticator, src_config_env as config_env_usuario, contexto_contexto_layout as contexto_layout, contexto_contexto_usuario as contexto_usuario };
7280
+ var __webpack_exports__TypeDrawerFullScreenRef = DraweFullScreen_namespaceObject.TypeDrawerFullScreenRef;
7281
+ var __webpack_exports__TypeDrawerPadraoRef = DrawerPadrao_namespaceObject.TypeDrawerPadraoRef;
7282
+ export { AuthAtivarDesativarAuthenticatorButton, AuthGoogle, AuthLogin, AuthRegister, DrawerFullScreen, DrawerPadrao, EsqueciMinhaSenha, Layout, LayoutPublic, shared_types as TypesUsuario, VerificarAuthenticator, src_config_env as config_env_usuario, contexto_contexto_layout as contexto_layout, contexto_contexto_usuario as contexto_usuario, __webpack_exports__TypeDrawerFullScreenRef as TypeDrawerFullScreenRef, __webpack_exports__TypeDrawerPadraoRef as TypeDrawerPadraoRef };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/usuario",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "Service de autenticação de usuários unificado",
5
5
  "type": "module",
6
6
  "main": "./build/lib/index.js",