@navservice/usuario 1.1.190 → 1.5.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.
Files changed (2) hide show
  1. package/build/es/index.js +147 -181
  2. package/package.json +45 -45
package/build/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
2
  import { create as external_zustand_create } from "zustand";
3
3
  import { immer } from "zustand/middleware/immer";
4
+ import react, { createElement, forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
4
5
  import v4 from "zod/v4";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import react, { createElement, forwardRef, useEffect, useMemo, useRef, useState } from "react";
7
7
  import { QRCodeSVG } from "qrcode.react";
8
8
  import { GoogleLogin, GoogleOAuthProvider } from "@react-oauth/google";
9
9
  import { Outlet, useLocation, useNavigate, useSearchParams } from "react-router-dom";
@@ -2184,128 +2184,62 @@ axios.getAdapter = adapters_adapters.getAdapter;
2184
2184
  axios.HttpStatusCode = helpers_HttpStatusCode;
2185
2185
  axios.default = axios;
2186
2186
  const lib_axios = axios;
2187
- class index_browser_config_env {
2187
+ class utils_config_env {
2188
2188
  static SET_PUBLIC_BASE_URL_BACKEND_PRINCIPAL;
2189
2189
  static init(config) {
2190
- index_browser_config_env.SET_PUBLIC_BASE_URL_BACKEND_PRINCIPAL = config.SET_PUBLIC_BASE_URL_BACKEND_PRINCIPAL;
2190
+ utils_config_env.SET_PUBLIC_BASE_URL_BACKEND_PRINCIPAL = config.SET_PUBLIC_BASE_URL_BACKEND_PRINCIPAL;
2191
2191
  }
2192
2192
  static get PUBLIC_BASE_URL_BACKEND_PRINCIPAL() {
2193
2193
  return this.SET_PUBLIC_BASE_URL_BACKEND_PRINCIPAL;
2194
2194
  }
2195
2195
  }
2196
- const index_browser_src_config_env = index_browser_config_env;
2197
- (function(TypeControllerUsuario) {
2198
- TypeControllerUsuario.AppEnum = [
2199
- "service-usuario",
2200
- "service-financeiro",
2201
- "service-pages-ai"
2202
- ];
2203
- TypeControllerUsuario.UsuarioTipoEnum = [
2204
- "padrao"
2205
- ];
2206
- v4["enum"]([
2207
- "service-usuario",
2208
- "service-financeiro",
2209
- "service-pages-ai"
2210
- ]);
2211
- v4["enum"](TypeControllerUsuario.UsuarioTipoEnum);
2212
- })(_usuario_TypeControllerUsuario || (_usuario_TypeControllerUsuario = {}));
2213
- const _usuario = _usuario_TypeControllerUsuario;
2214
- var _usuario_TypeControllerUsuario;
2215
- (function(TypeControllerResponse) {
2216
- const StatusSchema = v4.union([
2217
- v4.literal(200),
2218
- v4.literal(201),
2219
- v4.literal(202),
2220
- v4.literal(204),
2221
- v4.literal(400),
2222
- v4.literal(401),
2223
- v4.literal(403),
2224
- v4.literal(404),
2225
- v4.literal(409),
2226
- v4.literal(422),
2227
- v4.literal(500),
2228
- v4.literal(428),
2229
- v4.literal(405)
2230
- ]);
2231
- const TypeSchema = v4.union([
2232
- v4.literal("success"),
2233
- v4.literal("warning"),
2234
- v4.literal("error")
2235
- ]).default("success");
2236
- const CodeSchema = v4.union([
2237
- v4.literal("SUCCESS"),
2238
- v4.literal("ACTION_REQUIRED"),
2239
- v4.literal("CREATED"),
2240
- v4.literal("WARNING"),
2241
- v4.literal("AUTHORIZATION_ERROR"),
2242
- v4.literal("SCHEMA_VALIDATION"),
2243
- v4.literal("SERVER_ERROR"),
2244
- v4.literal("UNAUTHORIZED"),
2245
- v4.literal("INVALID_TOKEN"),
2246
- v4.literal("NOT_FOUND"),
2247
- v4.literal("SUCCESS_FILE"),
2248
- v4.literal("DATABASE_ERROR")
2249
- ]);
2250
- v4.object({
2251
- status: StatusSchema,
2252
- code: CodeSchema,
2253
- type: TypeSchema,
2254
- message: v4.string(),
2255
- results: v4.unknown().optional(),
2256
- error: v4.unknown().optional()
2257
- });
2258
- (function(C) {
2259
- C.InputSchema = v4.object({
2260
- status: StatusSchema,
2261
- code: CodeSchema,
2262
- type: TypeSchema.optional().default("success"),
2263
- message: v4.string().optional(),
2264
- results: v4.any(),
2265
- c: v4.custom()
2266
- });
2267
- v4.object({
2268
- status: StatusSchema,
2269
- message: v4.string().optional(),
2270
- file_buffer: v4.union([
2271
- v4["instanceof"](Blob),
2272
- v4["instanceof"](ArrayBuffer),
2273
- v4["instanceof"](Uint8Array)
2274
- ]),
2275
- content_type: v4.string(),
2276
- filename: v4.string().optional(),
2277
- c: v4.custom().optional()
2278
- });
2279
- })(TypeControllerResponse.C || (TypeControllerResponse.C = {}));
2280
- (function(Error1) {
2281
- Error1.InputSchema = v4.object({
2282
- message: v4.string().optional(),
2283
- results: v4.union([
2284
- v4.array(v4.unknown()),
2285
- v4.unknown()
2286
- ]).optional(),
2287
- type: TypeSchema.optional().default("success"),
2288
- code: CodeSchema,
2289
- status: v4.number().optional().default(200)
2290
- });
2291
- })(TypeControllerResponse.Error || (TypeControllerResponse.Error = {}));
2292
- })(_type_response_TypeControllerResponse || (_type_response_TypeControllerResponse = {}));
2293
- const _type_response = _type_response_TypeControllerResponse;
2294
- var _type_response_TypeControllerResponse;
2295
- (function(t) {
2296
- (function(Controller) {
2297
- Controller.Usuario = _usuario;
2298
- })(t.Controller || (t.Controller = {}));
2299
- (function(Geral) {
2300
- Geral.Response = _type_response;
2301
- })(t.Geral || (t.Geral = {}));
2302
- })(types_t || (types_t = {}));
2303
- var types_t;
2196
+ const utils_src_config_env = utils_config_env;
2197
+ const _session_storage = class {
2198
+ static adicionar_item_session_storage({ chave, novoItem }) {
2199
+ try {
2200
+ const valorAtual = window.sessionStorage.getItem(chave);
2201
+ const listaAtual = valorAtual ? JSON.parse(valorAtual) : [];
2202
+ const newDataItem = {
2203
+ ...listaAtual,
2204
+ ...novoItem
2205
+ };
2206
+ window.sessionStorage.setItem(chave, JSON.stringify(newDataItem));
2207
+ } catch (error) {
2208
+ console.error(error);
2209
+ }
2210
+ }
2211
+ static set_session_storage_sem_incremento({ chave, novoItem }) {
2212
+ try {
2213
+ window.sessionStorage.setItem(chave, JSON.stringify(novoItem));
2214
+ } catch (error) {
2215
+ console.error(error);
2216
+ }
2217
+ }
2218
+ static get_item_session_storage(chave) {
2219
+ try {
2220
+ if ("undefined" != typeof window) {
2221
+ const valorAtual = window.sessionStorage.getItem(chave);
2222
+ return valorAtual ? JSON.parse(valorAtual) : valorAtual;
2223
+ }
2224
+ return;
2225
+ } catch (error) {
2226
+ console.error(error);
2227
+ }
2228
+ }
2229
+ static remover_item_session_storage(chave) {
2230
+ try {
2231
+ window.sessionStorage.removeItem(chave);
2232
+ } catch (error) {
2233
+ console.error(error);
2234
+ }
2235
+ }
2236
+ };
2237
+ const utils_session_storage = _session_storage;
2304
2238
  const _api_api = class _api {
2305
2239
  static servidor_service_usuario = class {
2306
2240
  static get #axios() {
2307
2241
  return lib_axios.create({
2308
- baseURL: index_browser_src_config_env.PUBLIC_BASE_URL_BACKEND_PRINCIPAL
2242
+ baseURL: utils_src_config_env.PUBLIC_BASE_URL_BACKEND_PRINCIPAL
2309
2243
  });
2310
2244
  }
2311
2245
  static async post({ url, data, setToken = true }) {
@@ -2339,7 +2273,7 @@ const _api_api = class _api {
2339
2273
  }
2340
2274
  };
2341
2275
  static headers({ setToken = true }) {
2342
- const get_auth_user = src_utils.session_sorage.get_item_session_storage("auth_user");
2276
+ const get_auth_user = utils_session_storage.get_item_session_storage("auth_user");
2343
2277
  if (true === setToken) return {
2344
2278
  headers: {
2345
2279
  Authorization: `Bearer ${get_auth_user?.data?.usuario?.token}`,
@@ -2699,57 +2633,89 @@ const _update_context = class {
2699
2633
  }
2700
2634
  };
2701
2635
  const utils_update_context = _update_context;
2702
- const _session_storage = class {
2703
- static adicionar_item_session_storage({ chave, novoItem }) {
2704
- try {
2705
- const valorAtual = window.sessionStorage.getItem(chave);
2706
- const listaAtual = valorAtual ? JSON.parse(valorAtual) : [];
2707
- const newDataItem = {
2708
- ...listaAtual,
2709
- ...novoItem
2710
- };
2711
- window.sessionStorage.setItem(chave, JSON.stringify(newDataItem));
2712
- } catch (error) {
2713
- console.error(error);
2714
- }
2715
- }
2716
- static set_session_storage_sem_incremento({ chave, novoItem }) {
2717
- try {
2718
- window.sessionStorage.setItem(chave, JSON.stringify(novoItem));
2719
- } catch (error) {
2720
- console.error(error);
2636
+ const _sistema = {
2637
+ empresa: {
2638
+ nome: "Nav Software",
2639
+ email_suporte: "suporte@navsoftware.com.br",
2640
+ email_no_replay: "no-replay@navsoftware.com.br",
2641
+ razaoSocial: "Nav Software Desenvolvimento de Sistemas Ltda",
2642
+ cnpj: "00.000.000/0001-00",
2643
+ inscricaoEstadual: "000.000.000.000",
2644
+ inscricaoMunicipal: "000000",
2645
+ endereco: {
2646
+ logradouro: "Rua Exemplo",
2647
+ numero: "000",
2648
+ complemento: "Sala 00",
2649
+ bairro: "Centro",
2650
+ cidade: "Navegantes",
2651
+ estado: "SC",
2652
+ cep: "88370-000",
2653
+ pais: "Brasil"
2654
+ },
2655
+ contato: {
2656
+ telefone: "(47) 0000-0000",
2657
+ celular: "(47) 90000-0000",
2658
+ email: "contato@navsoftware.com.br",
2659
+ site: "https://www.navsoftware.com.br"
2660
+ },
2661
+ dadosBancarios: {
2662
+ banco: "000 - Banco Exemplo",
2663
+ agencia: "0000",
2664
+ conta: "00000-0",
2665
+ tipoConta: "Conta Corrente",
2666
+ pix: "contato@navsoftware.com.br"
2667
+ },
2668
+ responsavel: {
2669
+ nome: "Nome do Responsável",
2670
+ cpf: "000.000.000-00",
2671
+ cargo: "Diretor",
2672
+ email: "responsavel@navsoftware.com.br"
2673
+ },
2674
+ configuracoes: {
2675
+ ativo: true,
2676
+ dataFundacao: "2020-01-01",
2677
+ regimeTributario: "Simples Nacional",
2678
+ ramoAtividade: "Desenvolvimento de Software",
2679
+ cnae: "62.01-5-00",
2680
+ porteEmpresa: "ME"
2721
2681
  }
2722
2682
  }
2723
- static get_item_session_storage(chave) {
2724
- try {
2725
- if ("undefined" != typeof window) {
2726
- const valorAtual = window.sessionStorage.getItem(chave);
2727
- return valorAtual ? JSON.parse(valorAtual) : valorAtual;
2728
- }
2729
- return;
2730
- } catch (error) {
2731
- console.error(error);
2732
- }
2683
+ };
2684
+ const utils_sistema = _sistema;
2685
+ class _hooks {
2686
+ use_is_mobile() {
2687
+ const [isMobile, setIsMobile] = useState(false);
2688
+ useLayoutEffect(()=>{
2689
+ const updateSize = ()=>setIsMobile(window.innerWidth < 768);
2690
+ window.addEventListener("resize", updateSize);
2691
+ updateSize();
2692
+ return ()=>window.removeEventListener("resize", updateSize);
2693
+ }, []);
2694
+ return isMobile;
2733
2695
  }
2734
- static remover_item_session_storage(chave) {
2735
- try {
2736
- window.sessionStorage.removeItem(chave);
2737
- } catch (error) {
2738
- console.error(error);
2696
+ use_dark_mode() {
2697
+ if ("dark" === localStorage.getItem("theme")) {
2698
+ document.documentElement.classList.add("dark");
2699
+ localStorage.setItem("theme", "dark");
2700
+ } else {
2701
+ document.documentElement.classList.remove("dark");
2702
+ localStorage.setItem("theme", "light");
2739
2703
  }
2740
2704
  }
2705
+ }
2706
+ const utils_hooks = new _hooks;
2707
+ const utils_utils = {
2708
+ api: utils_api,
2709
+ data: utils_data,
2710
+ form: utils_form,
2711
+ geral: _geral,
2712
+ local_storage: utils_local_storage,
2713
+ update_context: utils_update_context,
2714
+ session_sorage: utils_session_storage,
2715
+ sistema: utils_sistema,
2716
+ hooks: utils_hooks
2741
2717
  };
2742
- const utils_session_storage = _session_storage;
2743
- const index_browser_utils = class {
2744
- static api = utils_api;
2745
- static data = utils_data;
2746
- static form = utils_form;
2747
- static geral = _geral;
2748
- static local_storage = utils_local_storage;
2749
- static update_context = utils_update_context;
2750
- static session_sorage = utils_session_storage;
2751
- };
2752
- const src_utils = index_browser_utils;
2718
+ const src_utils = utils_utils;
2753
2719
  const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
2754
2720
  (function(TypeControllerUsuario) {
2755
2721
  TypeControllerUsuario.AppEnum = [
@@ -3146,9 +3112,9 @@ var type_response_TypeControllerResponse;
3146
3112
  (function(Geral) {
3147
3113
  Geral.Response = type_response;
3148
3114
  })(t.Geral || (t.Geral = {}));
3149
- })(shared_types_t || (shared_types_t = {}));
3150
- const shared_types = shared_types_t;
3151
- var shared_types_t;
3115
+ })(types_t || (types_t = {}));
3116
+ const types = types_t;
3117
+ var types_t;
3152
3118
  const store = external_zustand_create()(immer((set)=>({
3153
3119
  states: {
3154
3120
  user: src_utils.session_sorage.get_item_session_storage("auth_user"),
@@ -3162,7 +3128,7 @@ const contexto_usuario_contexto_usuario = class contexto_usuario {
3162
3128
  try {
3163
3129
  contexto_usuario.contexto.state.set_loading(true);
3164
3130
  const response = await src_utils.api.servidor_service_usuario.post({
3165
- url: shared_types.Controller.Usuario.Register.route,
3131
+ url: types.Controller.Usuario.Register.route,
3166
3132
  data: props,
3167
3133
  setToken: false
3168
3134
  });
@@ -3178,7 +3144,7 @@ const contexto_usuario_contexto_usuario = class contexto_usuario {
3178
3144
  try {
3179
3145
  contexto_usuario.contexto.state.set_loading(true);
3180
3146
  const response = await src_utils.api.servidor_service_usuario.post({
3181
- url: shared_types.Controller.Usuario.Login.route,
3147
+ url: types.Controller.Usuario.Login.route,
3182
3148
  data: props,
3183
3149
  setToken: false
3184
3150
  });
@@ -3194,7 +3160,7 @@ const contexto_usuario_contexto_usuario = class contexto_usuario {
3194
3160
  try {
3195
3161
  contexto_usuario.contexto.state.set_loading(true);
3196
3162
  const response = await src_utils.api.servidor_service_usuario.post({
3197
- url: shared_types.Controller.CodigoOtp.EntrarComCodigoOtp.rota,
3163
+ url: types.Controller.CodigoOtp.EntrarComCodigoOtp.rota,
3198
3164
  data: props,
3199
3165
  setToken: false
3200
3166
  });
@@ -3211,7 +3177,7 @@ const contexto_usuario_contexto_usuario = class contexto_usuario {
3211
3177
  try {
3212
3178
  contexto_usuario.contexto.state.set_loading(true);
3213
3179
  const response = await src_utils.api.servidor_service_usuario.post({
3214
- url: shared_types.Controller.Usuario.RegisterLoginGoogle.route,
3180
+ url: types.Controller.Usuario.RegisterLoginGoogle.route,
3215
3181
  data: props,
3216
3182
  setToken: false
3217
3183
  });
@@ -3677,7 +3643,7 @@ const AuthAtivarDesativarAuthenticator = ()=>{
3677
3643
  try {
3678
3644
  setCarregando(true);
3679
3645
  const response = await src_utils.api.servidor_service_usuario.get({
3680
- url: shared_types.Controller.Autheticator.BuscarAuthenticatorPeloId.route
3646
+ url: types.Controller.Autheticator.BuscarAuthenticatorPeloId.route
3681
3647
  });
3682
3648
  if (response?.data?.type !== "success") return;
3683
3649
  if (!response?.data?.results) return;
@@ -3689,7 +3655,7 @@ const AuthAtivarDesativarAuthenticator = ()=>{
3689
3655
  async function desativarAuthenticator() {
3690
3656
  setCarregando(true);
3691
3657
  await src_utils.api.servidor_service_usuario.post({
3692
- url: shared_types.Controller.Autheticator.DesativarAuthenticatorCode.route,
3658
+ url: types.Controller.Autheticator.DesativarAuthenticatorCode.route,
3693
3659
  data: {}
3694
3660
  });
3695
3661
  await buscar_authenticator();
@@ -3707,7 +3673,7 @@ const AuthAtivarDesativarAuthenticator = ()=>{
3707
3673
  }
3708
3674
  };
3709
3675
  const resp = await src_utils.api.servidor_service_usuario.post({
3710
- url: shared_types.Controller.Autheticator.GerarAutheticatorCode.route,
3676
+ url: types.Controller.Autheticator.GerarAutheticatorCode.route,
3711
3677
  data,
3712
3678
  setToken: true
3713
3679
  });
@@ -4048,7 +4014,7 @@ function EsqueciMinhaSenha({ email: emailProp }) {
4048
4014
  sessionStorage.setItem(CHAVE_LS, ate.toISOString());
4049
4015
  iniciarContagem(TEMPO_COOLDOWN);
4050
4016
  await src_utils.api.servidor_service_usuario.post({
4051
- url: shared_types.Controller.CodigoOtp.EnviarCodigoOtp.rota,
4017
+ url: types.Controller.CodigoOtp.EnviarCodigoOtp.rota,
4052
4018
  data: dadosBody
4053
4019
  });
4054
4020
  setMostrarOtp(true);
@@ -5847,7 +5813,7 @@ function zod_a(o, a, u) {
5847
5813
  ]
5848
5814
  ];
5849
5815
  const LoaderCircle = createLucideIcon("loader-circle", loader_circle_iconNode);
5850
- const LoginSchema = shared_types.Controller.Usuario.Login.InputSchema.shape.data.shape.usuario;
5816
+ const LoginSchema = types.Controller.Usuario.Login.InputSchema.shape.data.shape.usuario;
5851
5817
  function AuthLogin() {
5852
5818
  const navigate = useNavigate();
5853
5819
  const loading_auth = contexto_contexto_usuario.contexto.jsx.get_loading();
@@ -5917,7 +5883,7 @@ function AuthLogin() {
5917
5883
  type: "email",
5918
5884
  placeholder: "Digite seu e-mail",
5919
5885
  ...register("email"),
5920
- className: " w-full rounded-lg border border-theme-border bg-theme-bg text-theme-text px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 transition-all duration-200 ease-out "
5886
+ className: " w-full rounded-lg border border-theme-border bg-theme-bg text-theme-text px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 transition-all duration-200 ease-out "
5921
5887
  }),
5922
5888
  errors.email && /*#__PURE__*/ jsx("p", {
5923
5889
  className: "text-xs text-error-600",
@@ -5938,7 +5904,7 @@ function AuthLogin() {
5938
5904
  type: "password",
5939
5905
  placeholder: "Digite sua senha",
5940
5906
  ...register("senha"),
5941
- className: " w-full rounded-lg border border-theme-border bg-theme-bg text-theme-text px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 transition-all duration-200 ease-out "
5907
+ className: " w-full rounded-lg border border-theme-border bg-theme-bg text-theme-text px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 transition-all duration-200 ease-out "
5942
5908
  }),
5943
5909
  errors.senha && /*#__PURE__*/ jsx("p", {
5944
5910
  className: "text-xs text-error-600",
@@ -5957,7 +5923,7 @@ function AuthLogin() {
5957
5923
  /*#__PURE__*/ jsxs("button", {
5958
5924
  type: "submit",
5959
5925
  disabled: loading_auth,
5960
- className: " w-full bg-primary-600 hover:bg-primary-500 active:bg-primary-700 text-white py-3.5 rounded-lg text-sm font-medium flex items-center justify-center gap-2 transition-all duration-200 ease-out disabled:opacity-60 disabled:cursor-not-allowed ",
5926
+ className: " w-full bg-primary-600 hover:bg-primary-500 active:bg-primary-700 text-white py-3.5 rounded-lg text-sm font-medium flex items-center justify-center gap-2 transition-all duration-200 ease-out disabled:opacity-60 disabled:cursor-not-allowed ",
5961
5927
  children: [
5962
5928
  loading_auth && /*#__PURE__*/ jsx(LoaderCircle, {
5963
5929
  className: "w-4 h-4 animate-spin"
@@ -6004,7 +5970,7 @@ function AuthLogin() {
6004
5970
  })
6005
5971
  });
6006
5972
  }
6007
- const RegisterSchema = shared_types.Controller.Usuario.Register.InputSchema.shape.data.shape.usuario;
5973
+ const RegisterSchema = types.Controller.Usuario.Register.InputSchema.shape.data.shape.usuario;
6008
5974
  function AuthRegister() {
6009
5975
  const navigate = useNavigate();
6010
5976
  const loading_auth = contexto_contexto_usuario.contexto.jsx.get_loading();
@@ -6590,7 +6556,7 @@ function DarkMode() {
6590
6556
  ]);
6591
6557
  return /*#__PURE__*/ jsx("button", {
6592
6558
  onClick: ()=>setDark(!dark),
6593
- className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
6559
+ className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
6594
6560
  children: /*#__PURE__*/ jsxs("div", {
6595
6561
  className: "flex items-center gap-3",
6596
6562
  children: [
@@ -6737,7 +6703,7 @@ function Profile({ isCollapsed = false }) {
6737
6703
  children: [
6738
6704
  menuItems.map((item, idx)=>/*#__PURE__*/ jsx("button", {
6739
6705
  onClick: item.action,
6740
- className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
6706
+ className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
6741
6707
  children: /*#__PURE__*/ jsxs("div", {
6742
6708
  className: "flex items-center gap-3",
6743
6709
  children: [
@@ -6760,7 +6726,7 @@ function Profile({ isCollapsed = false }) {
6760
6726
  className: "p-2",
6761
6727
  children: /*#__PURE__*/ jsx("button", {
6762
6728
  onClick: ()=>contexto_contexto_usuario.contexto.state.set_signout(),
6763
- className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-error-600 font-semibold hover:bg-error-50/10 hover:translate-x-[2px] transition-all ",
6729
+ className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-error-600 font-semibold hover:bg-error-50/10 hover:translate-x-[2px] transition-all ",
6764
6730
  children: /*#__PURE__*/ jsxs("div", {
6765
6731
  className: "flex items-center gap-3",
6766
6732
  children: [
@@ -6794,7 +6760,7 @@ function Profile({ isCollapsed = false }) {
6794
6760
  });
6795
6761
  }
6796
6762
  const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
6797
- 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 ",
6763
+ 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 ",
6798
6764
  children: [
6799
6765
  /*#__PURE__*/ jsx("div", {
6800
6766
  children: /*#__PURE__*/ jsx(NavBar_Logo, {})
@@ -6874,12 +6840,12 @@ function Header() {
6874
6840
  children: [
6875
6841
  /*#__PURE__*/ jsx("button", {
6876
6842
  onClick: ()=>navigate("/auth/login"),
6877
- className: " px-4 py-2 rounded-lg text-sm transition-all border border-theme-border bg-theme-card text-theme-text hover:bg-theme-border/20 ",
6843
+ className: " px-4 py-2 rounded-lg text-sm transition-all border border-theme-border bg-theme-card text-theme-text hover:bg-theme-border/20 ",
6878
6844
  children: "Login"
6879
6845
  }),
6880
6846
  /*#__PURE__*/ jsx("button", {
6881
6847
  onClick: ()=>navigate("/auth/register"),
6882
- className: " px-4 py-2 rounded-lg text-sm shadow-sm transition-all bg-primary-600 text-white hover:bg-primary-700 ",
6848
+ className: " px-4 py-2 rounded-lg text-sm shadow-sm transition-all bg-primary-600 text-white hover:bg-primary-700 ",
6883
6849
  children: "Registrar"
6884
6850
  })
6885
6851
  ]
@@ -6903,4 +6869,4 @@ function LayoutPublic() {
6903
6869
  ]
6904
6870
  });
6905
6871
  }
6906
- 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 };
6872
+ export { AuthAtivarDesativarAuthenticator, AuthGoogle, AuthLogin, AuthRegister, EsqueciMinhaSenha, Layout, LayoutPublic, types as TypesUsuario, VerificarAuthenticator, src_config_env as config_env_usuario, contexto_contexto_layout as contexto_layout, contexto_contexto_usuario as contexto_usuario };
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "@navservice/usuario",
3
- "version": "1.1.190",
4
- "description": "Service de autenticação de usuários unificado",
5
- "type": "module",
6
- "main": "./build/lib/index.js",
7
- "module": "./build/es/index.js",
8
- "types": "./build/es/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./build/es/index.js",
12
- "require": "./build/lib/index.js",
13
- "types": "./build/es/biblioteca/src/index.d.ts"
14
- }
15
- },
16
- "files": [
17
- "build"
18
- ],
19
- "scripts": {
20
- "build": "rslib build"
21
- },
22
- "peerDependencies": {
23
- "react": "^19",
24
- "react-dom": "^19",
25
- "react-router-dom": "^7",
26
- "@react-oauth/google": "^0.12",
27
- "google-auth-library": "^10",
28
- "qrcode.react": "^4",
29
- "zod": "^4",
30
- "zustand": "^5"
31
- },
32
- "devDependencies": {
33
- "typescript": "^5",
34
- "react": "^19",
35
- "react-dom": "^19",
36
- "react-router-dom": "^7",
37
- "zod": "^4",
38
- "zustand": "^5",
39
- "@react-oauth/google": "^0.12"
40
- },
41
- "publishConfig": {
42
- "access": "public",
43
- "provenance": false
44
- }
45
- }
1
+ {
2
+ "name": "@navservice/usuario",
3
+ "version": "1.5.0",
4
+ "description": "Service de autenticação de usuários unificado",
5
+ "type": "module",
6
+ "main": "./build/lib/index.js",
7
+ "module": "./build/es/index.js",
8
+ "types": "./build/es/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./build/es/index.js",
12
+ "require": "./build/lib/index.js",
13
+ "types": "./build/es/biblioteca/src/index.d.ts"
14
+ }
15
+ },
16
+ "files": [
17
+ "build"
18
+ ],
19
+ "scripts": {
20
+ "build": "rslib build"
21
+ },
22
+ "peerDependencies": {
23
+ "react": "^19",
24
+ "react-dom": "^19",
25
+ "react-router-dom": "^7",
26
+ "@react-oauth/google": "^0.12",
27
+ "google-auth-library": "^10",
28
+ "qrcode.react": "^4",
29
+ "zod": "^4",
30
+ "zustand": "^5"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "^5",
34
+ "react": "^19",
35
+ "react-dom": "^19",
36
+ "react-router-dom": "^7",
37
+ "zod": "^4",
38
+ "zustand": "^5",
39
+ "@react-oauth/google": "^0.12"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public",
43
+ "provenance": false
44
+ }
45
+ }