Compare commits

..

No commits in common. "main" and "release(MVP/Sprint10)" have entirely different histories.

751 changed files with 4287 additions and 14726 deletions

View file

@ -1,11 +1,13 @@
{
"folders": [{ "path": "D:/IIS/Orius/app" }],
"folders": [
{ "path": "D:/IIS/Orius/app" }
],
"settings": {
// === GERAL ===
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit",
"source.organizeImports": "explicit"
},
"editor.formatOnPaste": false,
"editor.formatOnType": false,
@ -21,48 +23,53 @@
"**/dist/**": true,
"**/build/**": true,
"**/.next/**": true,
"**/.git/**": true,
"**/.git/**": true
},
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/.next": true,
"**/.git": true,
"**/.git": true
},
// === FRONTEND ===
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.defaultFormatter": "vscode.typescript-language-features"
},
// === TAILWIND ===
"files.associations": {
"*.css": "tailwindcss",
"*.css": "tailwindcss"
},
"tailwindCSS.includeLanguages": {
"plaintext": "html",
"javascript": "javascript",
"typescriptreact": "typescriptreact",
"typescriptreact": "typescriptreact"
},
// === TERMINAIS ===
"terminal.integrated.profiles.windows": {
"Next.js Dev": {
"path": "cmd.exe",
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run dev"],
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run dev"]
},
"Build & Preview": {
"path": "cmd.exe",
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run build && npm run start"],
"args": ["/k", "cd D:\\IIS\\Orius\\app && npm run build && npm run start"]
},
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe",
},
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
}
},
"terminal.integrated.defaultProfile.windows": "Git Bash",
@ -81,8 +88,8 @@
// === MISC ===
"files.exclude": {
"**/.DS_Store": true,
"**/*.log": true,
},
"**/*.log": true
}
},
"launch": {
"version": "0.2.0",
@ -94,9 +101,9 @@
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev"],
"cwd": "${workspaceFolder}",
"port": 9229,
},
],
"port": 9229
}
]
},
"extensions": {
"recommendations": [
@ -111,7 +118,7 @@
"streetsidesoftware.code-spell-checker",
"eamodio.gitlens",
"mhutchie.git-graph",
"donjayamanne.githistory",
],
},
"donjayamanne.githistory"
]
}
}

View file

@ -1,59 +1,22 @@
# ============================
# STAGE 1 Build
# ============================
FROM node:20-alpine AS builder
# Use uma imagem Node.js completa para o desenvolvimento
FROM node:20-alpine
# Define o diretório de trabalho no container
WORKDIR /app
# Copia pacotes e instala dependências
COPY package*.json ./
RUN npm ci
# Copia os arquivos de configuração do projeto
COPY package.json package-lock.json ./
# Copia o restante do código
# Instala todas as dependências do projeto
# Isso é necessário para o modo de desenvolvimento, pois o build não pré-compila os arquivos.
RUN npm install
# Copia o restante do código da sua aplicação
COPY . .
# ---------- Variáveis de build ----------
# Estas variáveis são usadas pelo Next.js durante o "build"
# para embutir no bundle do frontend.
ARG NEXT_PUBLIC_ORIUS_APP_STATE
ARG NEXT_PUBLIC_ORIUS_APP_API_URL
ARG NEXT_PUBLIC_ORIUS_APP_API_PREFIX
ARG NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE
ENV NEXT_PUBLIC_ORIUS_APP_STATE=$NEXT_PUBLIC_ORIUS_APP_STATE
ENV NEXT_PUBLIC_ORIUS_APP_API_URL=$NEXT_PUBLIC_ORIUS_APP_API_URL
ENV NEXT_PUBLIC_ORIUS_APP_API_PREFIX=$NEXT_PUBLIC_ORIUS_APP_API_PREFIX
ENV NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE=$NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE
# ---------- Build ----------
ENV NODE_ENV=production
RUN npm run build
# ============================
# STAGE 2 Runner (standalone)
# ============================
FROM node:20-alpine AS runner
WORKDIR /app
# ---------- Variáveis em runtime ----------
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
# Copia apenas o necessário do build
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
COPY --from=builder /app/package*.json ./
# ---------- Corrige permissões ----------
RUN addgroup -S nodejs && adduser -S nextjs -G nodejs \
&& mkdir -p .next/cache/images \
&& chown -R nextjs:nodejs /app
USER nextjs
# Expõe a porta de desenvolvimento padrão do Next.js
EXPOSE 3000
# ---------- Executa o servidor ----------
CMD ["node", "server.js"]
# Define o comando para iniciar a aplicação em modo de desenvolvimento
# Isso ativará o servidor de desenvolvimento e a recarga automática
CMD ["npm", "run", "dev"]

41
Dockerfile-homologacao Normal file
View file

@ -0,0 +1,41 @@
# Etapa 1: Construir a aplicação
FROM node:20-alpine AS builder
# Define o diretório de trabalho
WORKDIR /app
# Copia os arquivos de configuração do pacote
COPY package.json package-lock.json ./
# Instala as dependências do projeto
RUN npm install
# Copia todo o código da aplicação para o container
COPY . .
# Constrói a aplicação com o output 'standalone'
RUN npm run build
# Etapa 2: Executar a aplicação
# Usa uma imagem Node.js leve
FROM node:20-alpine AS runner
# Define o diretório de trabalho
WORKDIR /app
# Copia o diretório 'standalone' da etapa de build, que já contém o servidor e as dependências
# O diretório 'standalone' é a pasta .next/standalone gerada pela configuração 'output: standalone'
COPY --from=builder /app/.next/standalone ./
# Copia os arquivos públicos
COPY --from=builder /app/public ./public
# Copia os arquivos estáticos gerados pelo build. É aqui que os arquivos CSS e JS ficam.
COPY --from=builder /app/.next/static ./.next/static
# Expõe a porta padrão do Next.js
EXPOSE 3000
# Define o comando para iniciar a aplicação
# O 'start' do package.json não é necessário, o próprio servidor standalone já está no container
CMD ["node", "server.js"]

View file

@ -1,58 +1 @@
# saas_app
Criar envlocal para usar variaveis de ambiente no em desenvolvimento
NEXT_PUBLIC_ORIUS_APP_STATE=GO
NEXT_PUBLIC_ORIUS_APP_API_URL=<http://localhost:8000/>
NEXT_PUBLIC_ORIUS_APP_API_PREFIX=api/v1/
NEXT_PUBLIC_ORIUS_APP_API_CONTENT_TYPE=application/json
## Modo Debug
Abra Run → Add Configuration… → Attach to Node.js
Configure:
{
"name": "Attach Next.js (9230)",
"type": "node",
"request": "attach",
"port": 9230,
"restart": true,
"smartStep": true,
"skipFiles": ["<node_internals>/**"]
}
npm run dev:debug
## onlyoffice
docker run -i -t -d -p 8081:80 --restart=always -e JWT_ENABLED=false onlyoffice/documentserver
## next em rede
```
npx next dev -H 0.0.0.0
```
```
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"dev:lan": "next dev -H 0.0.0.0" <-- Adicione esta linha
},
```
Como acessar no outro dispositivo
Descubra seu IP Local:
No Windows (seu caso), abra um terminal (CMD ou PowerShell) e digite:
Bash
ipconfig
Procure por Endereço IPv4 (geralmente começa com 192.168.x.x ou 10.0.x.x).
Acesse no navegador: No celular ou outro computador, digite: http://SEU_IP_AQUI:3000
Exemplo: <http://192.168.0.15:3000>

View file

@ -1,70 +1,74 @@
import js from '@eslint/js';
import reactPlugin from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import importPlugin from 'eslint-plugin-import';
import tseslint from 'typescript-eslint';
import js from "@eslint/js";
import reactPlugin from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import jsxA11y from "eslint-plugin-jsx-a11y";
import importPlugin from "eslint-plugin-import";
import tseslint from "typescript-eslint";
export default [
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.ts', '**/*.tsx'],
ignores: ['node_modules/**', '.next/**', 'out/**', 'dist/**'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
},
globals: {
React: true,
JSX: true,
},
},
plugins: {
react: reactPlugin,
'react-hooks': reactHooks,
'jsx-a11y': jsxA11y,
import: importPlugin,
},
settings: {
react: { version: 'detect' },
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-uses-vars': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/order': [
'error',
{
groups: [['builtin', 'external'], ['internal'], ['parent', 'sibling', 'index']],
pathGroups: [
{
pattern: '@/**',
group: 'internal',
position: 'after',
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
ignores: ["node_modules/**", ".next/**", "out/**", "dist/**"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
},
globals: {
React: true,
JSX: true,
},
],
alphabetize: { order: 'asc', caseInsensitive: true },
'newlines-between': 'always',
},
],
'import/no-duplicates': 'error',
'import/newline-after-import': ['error', { count: 1 }],
'no-unused-vars': 'warn',
plugins: {
react: reactPlugin,
"react-hooks": reactHooks,
"jsx-a11y": jsxA11y,
import: importPlugin,
},
settings: {
react: { version: "detect" },
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
},
rules: {
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
"react/jsx-uses-vars": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"import/order": [
"error",
{
groups: [
["builtin", "external"],
["internal"],
["parent", "sibling", "index"],
],
pathGroups: [
{
pattern: "@/**",
group: "internal",
position: "after",
},
],
alphabetize: { order: "asc", caseInsensitive: true },
"newlines-between": "always",
},
],
"import/no-duplicates": "error",
"import/newline-after-import": ["error", { count: 1 }],
"no-unused-vars": "warn",
},
},
},
];

View file

@ -1,17 +1,12 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// Gera build autônomo para rodar com "node server.js"
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
// Isso gera um diretório otimizado que inclui tudo o que a aplicação precisa para rodar
output: 'standalone',
// Configurações gerais
reactStrictMode: true,
poweredByHeader: false,
compress: true,
// Desativa verificações no build de produção
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
eslint: {
// Desativa a verificação de lint durante o build
ignoreDuringBuilds: true,
},
};
module.exports = nextConfig;
export default nextConfig;

571
package-lock.json generated
View file

@ -7,11 +7,9 @@
"": {
"name": "saas",
"version": "25.9.1",
"hasInstallScript": true,
"dependencies": {
"@faker-js/faker": "^10.0.0",
"@hookform/resolvers": "^5.2.1",
"@onlyoffice/document-editor-react": "^2.1.1",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-checkbox": "^1.3.3",
@ -21,11 +19,10 @@
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
@ -35,7 +32,7 @@
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"cookies-next": "^6.1.0",
"date-fns": "^3.6.0",
"date-fns": "^4.1.0",
"faker-js": "^1.0.0",
"framer-motion": "^12.23.24",
"input-otp": "^1.4.2",
@ -65,7 +62,6 @@
"@types/react-dom": "^19",
"@typescript-eslint/eslint-plugin": "^8.46.1",
"@typescript-eslint/parser": "^8.46.1",
"cross-env": "^10.1.0",
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
@ -77,7 +73,6 @@
"eslint-plugin-unused-imports": "^4.2.0",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"shx": "^0.4.0",
"tailwindcss": "^4",
"tw-animate-css": "^1.3.7",
"typescript": "5.9.3",
@ -128,7 +123,6 @@
"integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.3",
@ -404,13 +398,6 @@
"tslib": "^2.4.0"
}
},
"node_modules/@epic-web/invariant": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz",
"integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==",
"dev": true,
"license": "MIT"
},
"node_modules/@eslint-community/eslint-utils": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
@ -1394,19 +1381,6 @@
"node": ">= 8"
}
},
"node_modules/@onlyoffice/document-editor-react": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@onlyoffice/document-editor-react/-/document-editor-react-2.1.1.tgz",
"integrity": "sha512-b0SnFPmT+OEyJons18PPHpwtFABVCI4nr3gPtAAImar1PhN9tNc9703Yo5KPYsHhIgVq+FqHSWgunI9GJnKa5w==",
"license": "Apache-2.0",
"dependencies": {
"lodash": "4.17.21"
},
"peerDependencies": {
"react": "^16.9.0 || ^17 || ^18 || ^19",
"react-dom": "^16.9.0 || ^17 || ^18 || ^19"
}
},
"node_modules/@pkgr/core": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz",
@ -1460,24 +1434,6 @@
}
}
},
"node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-arrow": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz",
@ -1614,24 +1570,6 @@
}
}
},
"node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-compose-refs": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
@ -1698,24 +1636,6 @@
}
}
},
"node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-direction": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz",
@ -1908,24 +1828,6 @@
}
}
},
"node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-popover": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.15.tgz",
@ -1963,24 +1865,6 @@
}
}
},
"node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-popper": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.8.tgz",
@ -2084,24 +1968,6 @@
}
}
},
"node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-progress": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.7.tgz",
@ -2126,38 +1992,6 @@
}
}
},
"node_modules/@radix-ui/react-radio-group": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.3.8.tgz",
"integrity": "sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==",
"license": "MIT",
"dependencies": {
"@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
"@radix-ui/react-presence": "1.1.5",
"@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-roving-focus": "1.1.11",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-previous": "1.1.1",
"@radix-ui/react-use-size": "1.1.1"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-roving-focus": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",
@ -2263,54 +2097,13 @@
}
}
},
"node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-separator": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.8.tgz",
"integrity": "sha512-sDvqVY4itsKwwSMEe0jtKgfTh+72Sy3gPmQpjqcQneqQ4PFmr/1I0YA+2/puilhggCe2gJcx5EBAYFkWkdpa5g==",
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.7.tgz",
"integrity": "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-primitive": "2.1.4"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.4.tgz",
"integrity": "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-slot": "1.2.4"
"@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@ -2328,9 +2121,9 @@
}
},
"node_modules/@radix-ui/react-slot": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.4.tgz",
"integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==",
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
@ -2438,24 +2231,6 @@
}
}
},
"node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
"integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-use-callback-ref": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",
@ -3164,7 +2939,6 @@
"integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==",
"devOptional": true,
"license": "MIT",
"peer": true,
"dependencies": {
"csstype": "^3.0.2"
}
@ -3175,7 +2949,6 @@
"integrity": "sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==",
"devOptional": true,
"license": "MIT",
"peer": true,
"peerDependencies": {
"@types/react": "^19.2.0"
}
@ -3192,7 +2965,6 @@
"integrity": "sha512-rUsLh8PXmBjdiPY+Emjz9NX2yHvhS11v0SR6xNJkm5GM1MO9ea/1GoDKlHHZGrOJclL/cZ2i/vRUYVtjRhrHVQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.46.1",
@ -3223,7 +2995,6 @@
"integrity": "sha512-6JSSaBZmsKvEkbRUkf7Zj7dru/8ZCrJxAqArcLaVMee5907JdtEbKGsZ7zNiIm/UAkpGUkaSMZEXShnN2D1HZA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "8.46.1",
"@typescript-eslint/types": "8.46.1",
@ -3698,7 +3469,6 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@ -4051,7 +3821,6 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.9",
"caniuse-lite": "^1.0.30001746",
@ -4278,24 +4047,6 @@
"react": ">= 16.8.0"
}
},
"node_modules/cross-env": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz",
"integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@epic-web/invariant": "^1.0.0",
"cross-spawn": "^7.0.6"
},
"bin": {
"cross-env": "dist/bin/cross-env.js",
"cross-env-shell": "dist/bin/cross-env-shell.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@ -4501,9 +4252,9 @@
}
},
"node_modules/date-fns": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
"integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz",
"integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==",
"license": "MIT",
"funding": {
"type": "github",
@ -4644,16 +4395,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/end-of-stream": {
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
"integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
"dev": true,
"license": "MIT",
"dependencies": {
"once": "^1.4.0"
}
},
"node_modules/enhanced-resolve": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz",
@ -4884,7 +4625,6 @@
"integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
@ -4945,7 +4685,6 @@
"integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
@ -5072,7 +4811,6 @@
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.9",
@ -5511,98 +5249,6 @@
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
"license": "MIT"
},
"node_modules/execa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
"dev": true,
"license": "MIT",
"dependencies": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/execa/node_modules/cross-spawn": {
"version": "6.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
"integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==",
"dev": true,
"license": "MIT",
"dependencies": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
},
"engines": {
"node": ">=4.8"
}
},
"node_modules/execa/node_modules/path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/execa/node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/execa/node_modules/shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
"dev": true,
"license": "MIT",
"dependencies": {
"shebang-regex": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/execa/node_modules/shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/execa/node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"which": "bin/which"
}
},
"node_modules/faker-js": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/faker-js/-/faker-js-1.0.0.tgz",
@ -5893,19 +5539,6 @@
"node": ">= 0.4"
}
},
"node_modules/get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"dev": true,
"license": "MIT",
"dependencies": {
"pump": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/get-symbol-description": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
@ -6199,16 +5832,6 @@
"node": ">=12"
}
},
"node_modules/interpret": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
"integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/is-array-buffer": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
@ -6514,16 +6137,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-string": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
@ -7105,12 +6718,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
},
"node_modules/lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
@ -7358,7 +6965,6 @@
"resolved": "https://registry.npmjs.org/next/-/next-15.5.5.tgz",
"integrity": "sha512-OQVdBPtpBfq7HxFN0kOVb7rXXOSIkt5lTzDJDGRBcOyVvNRIWFauMqi1gIHd1pszq1542vMOGY0HP4CaiALfkA==",
"license": "MIT",
"peer": true,
"dependencies": {
"@next/env": "15.5.5",
"@swc/helpers": "0.5.15",
@ -7444,13 +7050,6 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true,
"license": "MIT"
},
"node_modules/node-releases": {
"version": "2.0.25",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz",
@ -7458,29 +7057,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==",
"dev": true,
"license": "MIT",
"dependencies": {
"path-key": "^2.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/npm-run-path/node_modules/path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@ -7603,16 +7179,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
"license": "ISC",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/optionator": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@ -7649,16 +7215,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
@ -7805,7 +7361,6 @@
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
@ -7927,17 +7482,6 @@
"react-is": "^16.13.1"
}
},
"node_modules/pump": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
"integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
"dev": true,
"license": "MIT",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
@ -7974,7 +7518,6 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -7984,7 +7527,6 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
"license": "MIT",
"peer": true,
"dependencies": {
"scheduler": "^0.26.0"
},
@ -7997,7 +7539,6 @@
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.65.0.tgz",
"integrity": "sha512-xtOzDz063WcXvGWaHgLNrNzlsdFgtUWcb32E6WFaGTd7kPZG3EeDusjdZfUsPwKCKVXy1ZlntifaHZ4l8pAsmw==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18.0.0"
},
@ -8013,8 +7554,7 @@
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"license": "MIT",
"peer": true
"license": "MIT"
},
"node_modules/react-masked-text": {
"version": "1.0.5",
@ -8027,7 +7567,6 @@
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
"integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
"license": "MIT",
"peer": true,
"dependencies": {
"@types/use-sync-external-store": "^0.0.6",
"use-sync-external-store": "^1.4.0"
@ -8142,24 +7681,11 @@
"react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
"dev": true,
"dependencies": {
"resolve": "^1.1.6"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/redux": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
"license": "MIT",
"peer": true
"license": "MIT"
},
"node_modules/redux-thunk": {
"version": "3.1.0",
@ -8504,42 +8030,6 @@
"node": ">=8"
}
},
"node_modules/shelljs": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.9.2.tgz",
"integrity": "sha512-S3I64fEiKgTZzKCC46zT/Ib9meqofLrQVbpSswtjFfAVDW+AZ54WTnAM/3/yENoxz/V1Cy6u3kiiEbQ4DNphvw==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"execa": "^1.0.0",
"fast-glob": "^3.3.2",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
},
"bin": {
"shjs": "bin/shjs"
},
"engines": {
"node": ">=18"
}
},
"node_modules/shx": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.4.0.tgz",
"integrity": "sha512-Z0KixSIlGPpijKgcH6oCMCbltPImvaKy0sGH8AkLRXw1KyzpKtaCTizP2xen+hNDqVF4xxgvA0KXSb9o4Q6hnA==",
"dev": true,
"license": "MIT",
"dependencies": {
"minimist": "^1.2.8",
"shelljs": "^0.9.2"
},
"bin": {
"shx": "lib/cli.js"
},
"engines": {
"node": ">=18"
}
},
"node_modules/side-channel": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
@ -8616,13 +8106,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true,
"license": "ISC"
},
"node_modules/sonner": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
@ -8789,16 +8272,6 @@
"node": ">=4"
}
},
"node_modules/strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-json-comments": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
@ -8972,7 +8445,6 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12"
},
@ -8984,8 +8456,7 @@
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-8.1.2.tgz",
"integrity": "sha512-KITxHEEHRlxC5xOnxA123eAJ67NgsWxNphtItWt9TRu07DiTZrWIqJeIKRX9euE51/l3kJO4WQiqoBXKTJJGsA==",
"license": "GPL-2.0-or-later",
"peer": true
"license": "GPL-2.0-or-later"
},
"node_modules/to-regex-range": {
"version": "5.0.1",
@ -9139,7 +8610,6 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -9205,7 +8675,6 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"peer": true,
"dependencies": {
"napi-postinstall": "^0.3.0"
},
@ -9464,13 +8933,6 @@
"node": ">=0.10.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true,
"license": "ISC"
},
"node_modules/yallist": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
@ -9499,7 +8961,6 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz",
"integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==",
"license": "MIT",
"peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}

View file

@ -4,17 +4,14 @@
"version": "25.9.1",
"private": true,
"scripts": {
"dev": "next dev",
"dev:debug": "cross-env NEXT_USE_TURBOPACK=0 NODE_OPTIONS=\"--inspect=9230\" next dev",
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "shx mkdir -p public/libs && shx cp -r node_modules/tinymce public/libs/tinymce"
"lint": "next lint"
},
"dependencies": {
"@faker-js/faker": "^10.0.0",
"@hookform/resolvers": "^5.2.1",
"@onlyoffice/document-editor-react": "^2.1.1",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-checkbox": "^1.3.3",
@ -24,11 +21,10 @@
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
@ -38,7 +34,7 @@
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"cookies-next": "^6.1.0",
"date-fns": "^3.6.0",
"date-fns": "^4.1.0",
"faker-js": "^1.0.0",
"framer-motion": "^12.23.24",
"input-otp": "^1.4.2",
@ -68,7 +64,6 @@
"@types/react-dom": "^19",
"@typescript-eslint/eslint-plugin": "^8.46.1",
"@typescript-eslint/parser": "^8.46.1",
"cross-env": "^10.1.0",
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
@ -80,7 +75,6 @@
"eslint-plugin-unused-imports": "^4.2.0",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"shx": "^0.4.0",
"tailwindcss": "^4",
"tw-animate-css": "^1.3.7",
"typescript": "5.9.3",

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,50 @@
'use client';
import { useEffect } from 'react';
import { useParams } from 'next/navigation';
import { Card, CardContent } from '@/components/ui/card';
import { useGUsuarioReadHooks } from '@/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks';
import Usuario from '@/packages/administrativo/interfaces/GUsuario/GUsuarioInterface';
import Loading from '@/shared/components/loading/loading';
export default function UsuarioDetalhes() {
const params = useParams();
const { usuario, fetchUsuario } = useGUsuarioReadHooks();
useEffect(() => {
if (params.id) {
fetchUsuario({ usuario_id: Number(params.id) } as Usuario);
}
}, []);
if (!usuario) return <Loading type={1} />;
return (
<div>
<Card>
<CardContent>
<div className="mb-4 grid grid-cols-4 gap-4">
<div>
<div className="text-2xl font-semibold">Nome</div>
<div className="text-xl">{usuario?.nome_completo}</div>
</div>
<div>
<div className="text-2xl font-semibold">CPF</div>
<div className="text-xl">{usuario?.cpf}</div>
</div>
<div>
<div className="text-2xl font-semibold">Função</div>
<div className="text-xl">{usuario?.funcao}</div>
</div>
<div>
<div className="text-2xl font-semibold">Email</div>
<div className="text-xl">{usuario?.email}</div>
</div>
</div>
</CardContent>
</Card>
</div>
);
}

View file

@ -0,0 +1,127 @@
'use client';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { z } from 'zod';
import { Input } from '@/components/ui/input';
import { GUsuarioSchema } from '../../../../../../packages/administrativo/schemas/GUsuario/GUsuarioSchema';
import { Button } from '@/components/ui/button';
import { Card, CardContent } from '@/components/ui/card';
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@/components/ui/form';
import { useGUsuarioSaveHook } from '../../../../../../packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook';
type FormValues = z.infer<typeof GUsuarioSchema>;
export default function UsuarioFormularioPage() {
const { usuario, saveUsuario } = useGUsuarioSaveHook();
const form = useForm<FormValues>({
resolver: zodResolver(GUsuarioSchema),
defaultValues: {
login: '',
nome_completo: '',
funcao: '',
email: '',
cpf: '',
},
});
async function onSubmit(values: FormValues) {
saveUsuario(values);
}
return (
<div>
<Card>
<CardContent>
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<FormField
control={form.control}
name="login"
render={({ field }) => (
<FormItem>
<FormLabel>Login</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="nome_completo"
render={({ field }) => (
<FormItem>
<FormLabel>Nome Completo</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="funcao"
render={({ field }) => (
<FormItem>
<FormLabel>Função</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="cpf"
render={({ field }) => (
<FormItem>
<FormLabel>Cpf</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<Button type="submit">Salvar</Button>
</form>
</Form>
</CardContent>
</Card>
</div>
);
}

View file

@ -0,0 +1,82 @@
'use client';
import { Card, CardContent } from '@/components/ui/card';
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '@/components/ui/table';
import Usuario from '../../../../../packages/administrativo/interfaces/GUsuario/GUsuarioInterface';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import { useGUsuarioIndexHook } from '../../../../../packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook';
import { useEffect } from 'react';
import Loading from '@/shared/components/loading/loading';
export default function UsuarioPage() {
const { usuarios, fetchUsuarios } = useGUsuarioIndexHook();
useEffect(() => {
fetchUsuarios();
}, []);
if (!usuarios) return <Loading type={2} />;
return (
<div>
<Card>
<CardContent>
<div className="grid grid-cols-2">
<div className="text-2xl font-semibold">Usuarios</div>
<div className="text-right">
<Button asChild>
<Link href="/usuarios/formulario">+ Usuário</Link>
</Button>
</div>
</div>
<Table>
<TableHeader>
<TableRow>
<TableHead className="text-center">#</TableHead>
<TableHead>Situação</TableHead>
<TableHead>CPF</TableHead>
<TableHead>Login / Sigla / Nome</TableHead>
<TableHead>Função</TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{usuarios.map((usuario: Usuario) => (
<TableRow key={usuario.usuario_id} className="cursor-pointer">
<TableCell className="text-center">{usuario.usuario_id}</TableCell>
<TableCell className="font-medium">{usuario.situacao}</TableCell>
<TableCell className="font-medium">{usuario.cpf}</TableCell>
<TableCell>
<div className="text-xs font-semibold">
{usuario.login} - {usuario.sigla}
</div>
<div className="text-base">{usuario.nome_completo}</div>
</TableCell>
<TableCell>
<div className="text-base">{usuario.funcao}</div>
</TableCell>
<TableCell>
<Button asChild>
<Link href={`/usuarios/${usuario.usuario_id}/detalhes`}>Detalhes</Link>
</Button>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</CardContent>
</Card>
</div>
);
}

View file

@ -1,5 +1,9 @@
import TTBAndamentoServicoIndex from '@/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex';
import TTBAndamentoServicoIndex from "@/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex";
export default function TAtoParteTipo() {
return <TTBAndamentoServicoIndex />;
}
return (
< TTBAndamentoServicoIndex />
);
}

View file

@ -1,5 +1,9 @@
import TAtoParteTipoIndex from '@/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex';
import TAtoParteTipoIndex from "@/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex";
export default function TAtoParteTipo() {
return <TAtoParteTipoIndex />;
}
return (
< TAtoParteTipoIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GTBBairroIndex from '@/packages/administrativo/components/GTBBairro/GTBBairroIndex';
import GTBBairroIndex from "@/packages/administrativo/components/GTBBairro/GTBBairroIndex";
export default function GCidadePage() {
return <GTBBairroIndex />;
return (
< GTBBairroIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GCartorioIndex from '@/packages/administrativo/components/GCartorio/GCartorioIndex';
import GCartorioIndex from "@/packages/administrativo/components/GCartorio/GCartorioIndex";
export default function GCartorioPage() {
return <GCartorioIndex />;
return (
< GCartorioIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TCensecTipoNaturezaIndex from '@/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex';
import TCensecTipoNaturezaIndex from "@/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex";
export default function TCensecTipoNaturezaPage() {
return <TCensecTipoNaturezaIndex />;
return (
< TCensecTipoNaturezaIndex />
);
}

View file

@ -1,3 +1,5 @@
export default function TCensecPage() {
return <div></div>;
}
return (
<div></div>
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TCensecQualidadeIndex from '@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex';
import TCensecQualidadeIndex from "@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex";
export default function TCensecQualidadePage() {
return <TCensecQualidadeIndex />;
return (
< TCensecQualidadeIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TCensecIndex from '@/packages/administrativo/components/TCensec/TCensecIndex';
import TCensecIndex from "@/packages/administrativo/components/TCensec/TCensecIndex";
export default function GTBEstadoCivilPage() {
return <TCensecIndex />;
return (
< TCensecIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TCensecNaturezaLitigioIndex from '@/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex';
import TCensecNaturezaLitigioIndex from "@/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex";
export default function GCidadePage() {
return <TCensecNaturezaLitigioIndex />;
return (
< TCensecNaturezaLitigioIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TCensecQualidadeIndex from '@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex';
import TCensecQualidadeIndex from "@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex";
export default function GTBEstadoCivilPage() {
return <TCensecQualidadeIndex />;
return (
< TCensecQualidadeIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TCensecTipoAtoIndex from '@/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex';
import TCensecTipoAtoIndex from "@/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex";
export default function GTBEstadoCivilPage() {
return <TCensecTipoAtoIndex />;
return (
< TCensecTipoAtoIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GCidadeIndex from '@/packages/administrativo/components/GCidade/GCidadeIndex';
import GCidadeIndex from "@/packages/administrativo/components/GCidade/GCidadeIndex";
export default function GCidadePage() {
return <GCidadeIndex />;
return (
< GCidadeIndex />
);
}

View file

@ -1,5 +1,9 @@
import GCalculoIndex from '@/packages/administrativo/components/GCalculo/GCalculoIndex';
import GCalculoIndex from "@/packages/administrativo/components/GCalculo/GCalculoIndex";
export default function GEmolumentoPeriodoPage() {
return <GCalculoIndex />;
}
return (
<GCalculoIndex />
);
}

View file

@ -1,16 +1,18 @@
'use client';
'use client'
import { useParams } from 'next/navigation';
import { useParams } from "next/navigation";
import GEmolumentoItemIndex from '@/packages/administrativo/components/GEmolumentoItem/GEmolumentoItemIndex';
import GEmolumentoItemIndex from "@/packages/administrativo/components/GEmolumentoItem/GEmolumentoItemIndex";
export default function GGramaticaPage() {
const params = useParams();
return (
<GEmolumentoItemIndex
emolumento_id={Number(params.emolumentoId)}
emolumento_periodo_id={Number(params.emolumentoPeriodoId)}
/>
);
}
const params = useParams();
return (
<GEmolumentoItemIndex
emolumento_id={Number(params.emolumentoId)}
emolumento_periodo_id={Number(params.emolumentoPeriodoId)}
/>
);
}

View file

@ -1,5 +1,9 @@
import GEmolumentoIndex from '@/packages/administrativo/components/GEmolumento/GEmolumentoIndex';
import GEmolumentoIndex from "@/packages/administrativo/components/GEmolumento/GEmolumentoIndex";
export default function GEmolumentoPeriodoPage() {
return <GEmolumentoIndex />;
}
return (
<GEmolumentoIndex />
);
}

View file

@ -1,5 +1,9 @@
import GEmolumentoPeriodoIndex from '@/packages/administrativo/components/GEmolumentoPeriodo/GEmolumentoPeriodoIndex';
import GEmolumentoPeriodoIndex from "@/packages/administrativo/components/GEmolumentoPeriodo/GEmolumentoPeriodoIndex";
export default function GEmolumentoPeriodoPage() {
return <GEmolumentoPeriodoIndex />;
}
return (
<GEmolumentoPeriodoIndex />
);
}

View file

@ -1,5 +1,9 @@
import GGramaticaIndex from '@/packages/administrativo/components/GGramatica/GGramaticaIndex';
import GGramaticaIndex from "@/packages/administrativo/components/GGramatica/GGramaticaIndex";
export default function GGramaticaPage() {
return <GGramaticaIndex />;
}
return (
<GGramaticaIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TImovelDashboard from '@/packages/administrativo/components/TImovel/TImovelDashboard';
import TImovelDashboard from "@/packages/administrativo/components/TImovel/TImovelDashboard";
export default function TImovelDashboardPage() {
return <TImovelDashboard />;
return (
<TImovelDashboard />
);
}

View file

@ -1,6 +1,6 @@
'use client';
import TImovelIndex from '@/packages/administrativo/components/TImovel/TImovelIndex';
import TImovelIndex from "@/packages/administrativo/components/TImovel/TImovelIndex";
export default function TImovelRuralPage() {
return (

View file

@ -1,7 +1,9 @@
'use client';
import GTBTipoLogradouroIndex from '@/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex';
import GTBTipoLogradouroIndex from "@/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex";
export default function GMedidaTipoPage() {
return <GTBTipoLogradouroIndex />;
return (
< GTBTipoLogradouroIndex />
);
}

View file

@ -1,6 +1,6 @@
'use client';
import TImovelIndex from '@/packages/administrativo/components/TImovel/TImovelIndex';
import TImovelIndex from "@/packages/administrativo/components/TImovel/TImovelIndex";
export default function TImovelUrbanoPage() {
return (
@ -10,4 +10,4 @@ export default function TImovelUrbanoPage() {
tipoClasse={1}
/>
);
}
}

View file

@ -1,7 +1,9 @@
'use client';
import GMedidaTipoIndex from '@/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex';
import GMedidaTipoIndex from "@/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex";
export default function GMedidaTipoPage() {
return <GMedidaTipoIndex />;
return (
< GMedidaTipoIndex />
);
}

View file

@ -1,5 +1,11 @@
import GNaturezaIndex from '@/packages/administrativo/components/GNatureza/GNaturezaIndex';
import GNaturezaIndex from "@/packages/administrativo/components/GNatureza/GNaturezaIndex";
export default function GNaturezaPage() {
return <GNaturezaIndex sistema_id={2} />;
}
return (
<GNaturezaIndex
sistema_id={2}
/>
);
}

View file

@ -1,7 +1,9 @@
'use client';
import TPessoaDashboard from '@/packages/administrativo/components/TPessoa/TPessoaDashboard';
import TPessoaDashboard from "@/packages/administrativo/components/TPessoa/TPessoaDashboard";
export default function TPessoaDashboardPage() {
return <TPessoaDashboard />;
return (
<TPessoaDashboard />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GTBEstadoCivilIndex from '@/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex';
import GTBEstadoCivilIndex from "@/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex";
export default function GTBEstadoCivilPage() {
return <GTBEstadoCivilIndex />;
return (
< GTBEstadoCivilIndex />
);
}

View file

@ -3,5 +3,7 @@
import TPessoaFisicaIndex from '@/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex';
export default function TPessoaFisica() {
return <TPessoaFisicaIndex />;
return (
<TPessoaFisicaIndex />
);
}

View file

@ -3,5 +3,8 @@
import TPessoaJuridicaIndex from '@/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex';
export default function TPessoaFisica() {
return <TPessoaJuridicaIndex />;
return (
<TPessoaJuridicaIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GTBProfissaoIndex from '@/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex';
import GTBProfissaoIndex from "@/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex";
export default function GTBEstadoCivilPage() {
return <GTBProfissaoIndex />;
return (
< GTBProfissaoIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GTBRegimeBensIndex from '@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex';
import GTBRegimeBensIndex from "@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex";
export default function GTBRegimeBensPage() {
return <GTBRegimeBensIndex />;
return (
< GTBRegimeBensIndex />
);
}

View file

@ -1,7 +1,9 @@
'use client';
import GTBRegimeComunhaoIndex from '@/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex';
import GTBRegimeComunhaoIndex from "@/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex";
export default function GTBRegimeBensPage() {
return <GTBRegimeComunhaoIndex />;
return (
< GTBRegimeComunhaoIndex />
);
}

View file

@ -1,5 +1,9 @@
import TTBReconhecimentoTipoIndex from '@/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex';
import TTBReconhecimentoTipoIndex from "@/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex";
export default function TAtoParteTipo() {
return <TTBReconhecimentoTipoIndex />;
}
return (
< TTBReconhecimentoTipoIndex />
);
}

View file

@ -1,5 +1,9 @@
import GSeloGrupoIndex from '@/packages/administrativo/components/GSeloGrupo/GSeloGrupoIndex';
import GSeloGrupoIndex from "@/packages/administrativo/components/GSeloGrupo/GSeloGrupoIndex";
export default function GSeloGrupoPage() {
return <GSeloGrupoIndex />;
}
return (
<GSeloGrupoIndex />
);
}

View file

@ -1,5 +0,0 @@
import TServicoTipoIndex from '@/packages/administrativo/components/TServicoTipo/TServicoTipoIndex';
export default function TServicoTipoPage() {
return <TServicoTipoIndex />;
}

View file

@ -1,5 +1,11 @@
import GNaturezaTituloIndex from '@/packages/administrativo/components/GNaturezaTitulo/GNaturezaTituloIndex';
import GNaturezaTituloIndex from "@/packages/administrativo/components/GNaturezaTitulo/GNaturezaTituloIndex";
export default function GNaturezaPage() {
return <GNaturezaTituloIndex sistema_id={2} />;
}
return (
<GNaturezaTituloIndex
sistema_id={2}
/>
);
}

View file

@ -1,13 +1,14 @@
'use client';
import { useParams } from 'next/navigation';
import { useEffect, useState } from 'react';
import { useParams } from 'next/navigation';
import MainEditor from '@/components/MainEditor';
import { Card, CardContent } from '@/components/ui/card';
import MainEditor from '@/components/MainEditor';
import Loading from '@/shared/components/loading/loading';
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
import Loading from '@/shared/components/loading/loading';
export default function TMinutaDetalhes() {
const params = useParams();

View file

@ -1,13 +1,11 @@
'use client';
import { zodResolver } from '@hookform/resolvers/zod';
import z from 'zod';
import { useEffect } from 'react';
import { useForm, Controller } from 'react-hook-form';
import z from 'zod';
import { zodResolver } from '@hookform/resolvers/zod';
import MainEditor from '@/components/MainEditor';
import { Button } from '@/components/ui/button';
import { Card, CardContent } from '@/components/ui/card';
import { Checkbox } from '@/components/ui/checkbox';
import {
Form,
@ -19,8 +17,11 @@ import {
} from '@/components/ui/form';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
import MainEditor from '@/components/MainEditor';
import { TMinutaSchema } from '@/packages/administrativo/schemas/TMinuta/TMinutaSchema';
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
import { Card, CardContent } from '@/components/ui/card';
type FormValues = z.infer<typeof TMinutaSchema>;

View file

@ -1,19 +1,22 @@
'use client';
import { useEffect, useState, useCallback } from 'react';
import { Card, CardContent } from '@/components/ui/card';
import TMinutaForm from '@/packages/administrativo/components/TMinuta/TMinutaForm';
import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable';
import { useTMinutaIndexHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook';
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook';
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog';
import Loading from '@/shared/components/loading/loading';
import Header from '@/shared/components/structure/Header';
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
import Loading from '@/shared/components/loading/loading';
import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable';
import TMinutaForm from '@/packages/administrativo/components/TMinuta/TMinutaForm';
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook';
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
import { useTMinutaIndexHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook';
export default function TMinutaPage() {
// Hooks de leitura e escrita

View file

@ -2,8 +2,8 @@ import type { Metadata } from 'next';
import { Geist, Geist_Mono } from 'next/font/google';
import '../globals.css';
import { ResponseProvider } from '../../shared/components/response/ResponseContext';
import { AppSidebar } from '@/components/app-sidebar';
import { ThemeProvider } from '@/components/theme-provider';
import {
Breadcrumb,
BreadcrumbItem,
@ -15,9 +15,7 @@ import {
import { Separator } from '@/components/ui/separator';
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar';
import { Toaster } from '@/components/ui/sonner';
import Response from '../../shared/components/response/response';
import { ResponseProvider } from '../../shared/components/response/ResponseContext';
const geistSans = Geist({
variable: '--font-geist-sans',
@ -37,46 +35,50 @@ export const metadata: Metadata = {
},
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en" suppressHydrationWarning>
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
<ThemeProvider>
<SidebarProvider>
<AppSidebar />
<SidebarInset>
<header className="mb-4 flex h-16 shrink-0 items-center gap-2 border-b-1 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12">
<div className="flex items-center gap-2 px-4">
<SidebarTrigger className="-ml-1" />
<Separator
orientation="vertical"
className="mr-2 data-[orientation=vertical]:h-4"
/>
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem className="hidden md:block">
<BreadcrumbLink href="#">Building Your Application</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator className="hidden md:block" />
<BreadcrumbItem>
<BreadcrumbPage>Data Fetching</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
</div>
</header>
<ResponseProvider>
<div className="flex flex-1 flex-col gap-4 p-4 pt-0">
{children}
<Toaster richColors position="top-center" />
<Response />
</div>
</ResponseProvider>
</SidebarInset>
</SidebarProvider>
</ThemeProvider>
<SidebarProvider>
<AppSidebar />
<SidebarInset>
<header className="mb-4 flex h-16 shrink-0 items-center gap-2 border-b-1 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12">
<div className="flex items-center gap-2 px-4">
<SidebarTrigger className="-ml-1" />
<Separator
orientation="vertical"
className="mr-2 data-[orientation=vertical]:h-4"
/>
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem className="hidden md:block">
<BreadcrumbLink href="#">
Building Your Application
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator className="hidden md:block" />
<BreadcrumbItem>
<BreadcrumbPage>
Data Fetching
</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
</div>
</header>
<ResponseProvider>
<div className="flex flex-1 flex-col gap-4 p-4 pt-0">
{children}
<Toaster richColors position="top-center" />
<Response />
</div>
</ResponseProvider>
</SidebarInset>
</SidebarProvider>
</body>
</html>
);

View file

@ -1,51 +1,54 @@
'use client';
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
import { useEffect, useState } from 'react';
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
export default function Page() {
const { userAuthenticated } = useGUsuarioGetJWTHook();
const { userAuthenticated } = useGUsuarioGetJWTHook();
// Inicializa time como null para renderizar só no cliente
const [time, setTime] = useState<Date | null>(null);
// Inicializa time como null para renderizar só no cliente
const [time, setTime] = useState<Date | null>(null);
useEffect(() => {
setTime(new Date()); // define data inicial no cliente
const interval = setInterval(() => setTime(new Date()), 1000);
return () => clearInterval(interval);
}, []);
useEffect(() => {
setTime(new Date()); // define data inicial no cliente
const interval = setInterval(() => setTime(new Date()), 1000);
return () => clearInterval(interval);
}, []);
// Se ainda não temos a hora, renderiza nada para evitar mismatch
if (!time || !userAuthenticated?.data) return null;
// Se ainda não temos a hora, renderiza nada para evitar mismatch
if (!time || !userAuthenticated?.data) return null;
const hours = time.getHours();
const greeting = hours < 12 ? 'Bom dia' : hours < 18 ? 'Boa tarde' : 'Boa noite';
const hours = time.getHours();
const greeting =
hours < 12 ? 'Bom dia' : hours < 18 ? 'Boa tarde' : 'Boa noite';
const formattedDate = time.toLocaleDateString('pt-BR', {
weekday: 'long',
day: '2-digit',
month: 'long',
});
const formattedTime = time.toLocaleTimeString('pt-BR');
const formattedDate = time.toLocaleDateString('pt-BR', {
weekday: 'long',
day: '2-digit',
month: 'long',
});
const formattedTime = time.toLocaleTimeString('pt-BR');
return (
<main className="fixed inset-0 flex flex-col items-center justify-center overflow-hidden text-gray-800 select-none">
<section className="max-w-md px-4 text-center">
<h1 className="mb-2 text-4xl font-bold">
{greeting}, <span className="text-blue-600">{userAuthenticated.data.nome}</span> 👋
</h1>
return (
<main className="fixed inset-0 flex flex-col items-center justify-center text-gray-800 overflow-hidden select-none">
<section className="text-center max-w-md px-4">
<h1 className="text-4xl font-bold mb-2">
{greeting},{' '}
<span className="text-blue-600">{userAuthenticated.data.nome}</span>{' '}
👋
</h1>
<p className="mb-6 text-sm text-gray-600">
Hoje é <strong>{formattedDate}</strong>, {formattedTime}
</p>
<p className="text-gray-600 text-sm mb-6">
Hoje é <strong>{formattedDate}</strong>, {formattedTime}
</p>
<div className="rounded-2xl p-6">
<p className="leading-relaxed text-gray-700">
Que bom ter você de volta! 🎉 Aproveite o seu dia e continue alcançando seus objetivos.
</p>
</div>
</section>
</main>
);
<div className="rounded-2xl p-6">
<p className="text-gray-700 leading-relaxed">
Que bom ter você de volta! 🎉
Aproveite o seu dia e continue alcançando seus objetivos.
</p>
</div>
</section>
</main>
);
}

View file

@ -1,5 +0,0 @@
import TAtoForm from '@/packages/servicos/components/TAto/TAtoForm';
export default function TAtoFormPage() {
return <TAtoForm />;
}

View file

@ -1,5 +0,0 @@
import TAtoIndex from '@/packages/servicos/components/TAto/TAtoIndex';
export default function TServicoAToPag() {
return <TAtoIndex />;
}

View file

@ -0,0 +1,7 @@
import TServicoPedidoIndex from "@/packages/servicos/components/TServicoPedido/TServicoPedidoIndex";
export default function TServicoPedidoPage() {
return (
<TServicoPedidoIndex />
)
}

View file

@ -0,0 +1,90 @@
import { Card, CardContent } from "@/components/ui/card";
import TServicoItemPedidoResumo from "@/packages/servicos/components/TServicoItemPedido/TServicoItemPedidoResumo";
const itens = [
{
id: 1,
descricao: "Reconhecimento de Firma",
valor: 12.50,
},
{
id: 2,
descricao: "Autenticação de Cópia",
valor: 6.00,
},
{
id: 3,
descricao: "Procuração Pública",
valor: 98.75,
},
{
id: 4,
descricao: "Certidão de Escritura",
valor: 42.30,
},
{
id: 5,
descricao: "Registro de Documento",
valor: 73.10,
},
]
export default function PedidoPage() {
return (
<div>
<div className="grid w-full grid-cols-12 gap-4">
<div className="col-span-12 sm:col-span-9 md:col-span-9">
<Card>
<CardContent>
<div className="grid w-full grid-cols-12 gap-4">
<div className="col-span-12 sm:col-span-3 md:col-span-3">
<Card>
<CardContent>
</CardContent>
</Card>
</div>
<div className="col-span-12 sm:col-span-3 md:col-span-3">
<Card>
<CardContent>
</CardContent>
</Card>
</div>
<div className="col-span-12 sm:col-span-3 md:col-span-3">
<Card>
<CardContent>
</CardContent>
</Card>
</div>
<div className="col-span-12 sm:col-span-3 md:col-span-3">
<Card>
<CardContent>
</CardContent>
</Card>
</div>
<div className="col-span-12 sm:col-span-3 md:col-span-3">
<Card>
<CardContent>
</CardContent>
</Card>
</div>
</div>
</CardContent>
</Card>
</div>
<div className="col-span-12 sm:col-span-3 md:col-span-3">
<TServicoItemPedidoResumo
dataPedido="01/01/2026"
numeroPedido={123}
itens={itens}
/>
</div>
</div>
</div>
)
}

View file

@ -1,5 +1,7 @@
import TServicoPedidoDashboard from '@/packages/servicos/components/TServicoPedido/TServicoPedidoDashboard';
import TServicoPedidoDashboard from "@/packages/servicos/components/TServicoPedido/TServicoPedidoDashboard";
export default function TServicoPedidoPage() {
return <TServicoPedidoDashboard />;
}
return (
<TServicoPedidoDashboard />
)
}

View file

@ -1,11 +0,0 @@
'use client';
import { useParams } from 'next/navigation';
import TServicoPedidoDetails from '@/packages/servicos/components/TServicoPedido/TServicoPedidoDetails';
export default function TServicoPedidoDetailsPage() {
const params = useParams();
return <TServicoPedidoDetails servico_pedido_id={Number(params.servicoPedidoId)} />;
}

View file

@ -1,5 +0,0 @@
import TServicoPedidoIndex from '@/packages/servicos/components/TServicoPedido/TServicoPedidoIndex';
export default function TServicoPedidoPage() {
return <TServicoPedidoIndex />;
}

View file

@ -1,11 +0,0 @@
'use client';
import { useParams } from 'next/navigation';
import TServicoPedidoForm from '@/packages/servicos/components/TServicoPedido/TServicoPedidoForm';
export default function TServicoPedidoPage() {
const params = useParams();
return <TServicoPedidoForm servico_pedido_id={Number(params.servicoPedidoId)} />;
}

View file

@ -1,5 +0,0 @@
import TServicoPedidoForm from '@/packages/servicos/components/TServicoPedido/TServicoPedidoForm';
export default function TServicoPedidoPage() {
return <TServicoPedidoForm />;
}

View file

@ -1,111 +1,124 @@
'use client';
import React, { useState } from 'react';
import {
AlertDialog,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogAction,
} from '@/components/ui/alert-dialog';
import {
AlertDialog,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogAction,
} from '@/components/ui/alert-dialog';
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
InputOTP,
InputOTPGroup,
InputOTPSlot,
} from '@/components/ui/input-otp';
interface ConfirmExclusionProps {
isOpen: boolean;
title: string;
description?: string;
expectedCode: string;
confirmText?: string;
cancelText?: string;
onConfirm: () => void;
onCancel: () => void;
onResendCode: () => void; // Função para reenviar o código
isOpen: boolean;
title: string;
description?: string;
expectedCode: string;
confirmText?: string;
cancelText?: string;
onConfirm: () => void;
onCancel: () => void;
onResendCode: () => void; // Função para reenviar o código
}
export default function ConfirmExclusion({
isOpen,
title,
description,
expectedCode,
confirmText = 'Continuar',
cancelText = 'Cancelar',
onConfirm,
onCancel,
onResendCode, // A função para reenvio do código
isOpen,
title,
description,
expectedCode,
confirmText = 'Continuar',
cancelText = 'Cancelar',
onConfirm,
onCancel,
onResendCode, // A função para reenvio do código
}: ConfirmExclusionProps) {
const [code, setCode] = useState('');
const [isValid, setIsValid] = useState(false);
const [isResending, setIsResending] = useState(false); // Novo estado para controle de envio do código
const [code, setCode] = useState('');
const [isValid, setIsValid] = useState(false);
const [isResending, setIsResending] = useState(false); // Novo estado para controle de envio do código
const handleChange = (value: string) => {
setCode(value);
setIsValid(value === expectedCode);
};
const handleChange = (value: string) => {
setCode(value);
setIsValid(value === expectedCode);
};
const handleResendCode = async () => {
setIsResending(true);
try {
await onResendCode(); // Chamando a função de reenvio
} catch (error) {
console.error('Erro ao reenviar código', error);
} finally {
setIsResending(false); // Resetando o estado de envio
}
};
const handleResendCode = async () => {
setIsResending(true);
try {
await onResendCode(); // Chamando a função de reenvio
} catch (error) {
console.error("Erro ao reenviar código", error);
} finally {
setIsResending(false); // Resetando o estado de envio
}
};
return (
<AlertDialog open={isOpen} onOpenChange={(open) => !open && onCancel()}>
<AlertDialogContent className="mx-auto max-w-lg p-6">
<AlertDialogHeader className="text-center">
<AlertDialogTitle className="text-center text-xl font-semibold">{title}</AlertDialogTitle>
{description && (
<AlertDialogDescription className="text-muted-foreground mt-2 text-center text-sm">
{description}
</AlertDialogDescription>
)}
</AlertDialogHeader>
return (
<AlertDialog open={isOpen} onOpenChange={(open) => !open && onCancel()}>
<AlertDialogContent className="max-w-lg mx-auto p-6">
<AlertDialogHeader className="text-center">
<AlertDialogTitle className="text-xl font-semibold text-center">{title}</AlertDialogTitle>
{description && (
<AlertDialogDescription className="mt-2 text-sm text-muted-foreground text-center">
{description}
</AlertDialogDescription>
)}
</AlertDialogHeader>
<div className="text-muted-foreground space-y-4 py-4 text-sm">
<div className="flex justify-center">
<InputOTP maxLength={expectedCode.length} value={code} onChange={handleChange}>
<InputOTPGroup className="flex gap-4">
{expectedCode.split('').map((_, index) => (
<InputOTPSlot
key={index}
index={index}
className="h-12 w-12 rounded-lg border-2 border-gray-300 text-center text-lg focus:ring-2 focus:ring-blue-500"
/>
))}
</InputOTPGroup>
</InputOTP>
</div>
<div className="py-4 text-sm text-muted-foreground space-y-4">
<div className="flex justify-center">
<InputOTP
maxLength={expectedCode.length}
value={code}
onChange={handleChange}
>
<InputOTPGroup className="flex gap-4">
{expectedCode.split('').map((_, index) => (
<InputOTPSlot
key={index}
index={index}
className="w-12 h-12 text-center text-lg border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"
/>
))}
</InputOTPGroup>
</InputOTP>
</div>
{/* Botão "Reenviar Código" */}
<div className="mt-4 flex items-center justify-center gap-2 text-center">
<AlertDialogDescription>Não recebeu o código?</AlertDialogDescription>
<button
onClick={handleResendCode}
className={`cursor-pointer font-semibold text-blue-500 ${isResending ? 'cursor-not-allowed text-gray-400' : 'hover:text-blue-600'}`}
disabled={isResending} // Desabilita o botão enquanto o código está sendo reenviado
>
{isResending ? 'Enviando...' : 'Reenviar Código'}
</button>
</div>
</div>
{/* Botão "Reenviar Código" */}
<div className="flex justify-center items-center text-center gap-2 mt-4">
<AlertDialogDescription>
Não recebeu o código?
</AlertDialogDescription>
<button
onClick={handleResendCode}
className={`text-blue-500 font-semibold cursor-pointer ${isResending ? 'cursor-not-allowed text-gray-400' : 'hover:text-blue-600'}`}
disabled={isResending} // Desabilita o botão enquanto o código está sendo reenviado
>
{isResending ? 'Enviando...' : 'Reenviar Código'}
</button>
</div>
</div>
<AlertDialogFooter>
<AlertDialogCancel onClick={onCancel} className="text-gray-600 hover:text-gray-800">
{cancelText}
</AlertDialogCancel>
<AlertDialogAction onClick={onConfirm} disabled={!isValid}>
{confirmText}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
<AlertDialogFooter>
<AlertDialogCancel onClick={onCancel} className="text-gray-600 hover:text-gray-800">
{cancelText}
</AlertDialogCancel>
<AlertDialogAction
onClick={onConfirm}
disabled={!isValid}
>
{confirmText}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}

View file

@ -1,4 +1,4 @@
import { useCallback, useState } from 'react';
import { useCallback, useState } from "react";
interface UseConfirmExclusionOptions {
onConfirm?: () => void;
@ -6,19 +6,15 @@ interface UseConfirmExclusionOptions {
expectedCode: string; // código que o usuário precisa digitar
}
export function useConfirmExclusion({
onConfirm,
onCancel,
expectedCode,
}: UseConfirmExclusionOptions) {
export function useConfirmExclusion({ onConfirm, onCancel, expectedCode }: UseConfirmExclusionOptions) {
const [isOpen, setIsOpen] = useState(false);
const [code, setCode] = useState('');
const [code, setCode] = useState("");
const [isValid, setIsValid] = useState(false);
const openDialog = useCallback(() => setIsOpen(true), []);
const closeDialog = useCallback(() => {
setIsOpen(false);
setCode(''); // limpa o código quando fecha
setCode(""); // limpa o código quando fecha
setIsValid(false);
}, []);
@ -39,7 +35,7 @@ export function useConfirmExclusion({
setCode(value);
setIsValid(value === expectedCode);
},
[expectedCode],
[expectedCode]
);
return {

View file

@ -3,194 +3,60 @@
@custom-variant dark (&:is(.dark *));
:root {
--background: oklch(0.9911 0 0);
--foreground: oklch(0.2988 0.0123 222.4429);
--card: oklch(1 0 0);
--card-foreground: oklch(0.2988 0.0123 222.4429);
--popover: oklch(0.9881 0 0);
--popover-foreground: oklch(0.2988 0.0123 222.4429);
--primary: oklch(0.721 0.1873 47.564);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.2988 0.0123 222.4429);
--secondary-foreground: oklch(1 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.9551 0 0);
--accent-foreground: oklch(0.2988 0.0123 222.4429);
--destructive: oklch(0.577 0.245 27.325);
--destructive-foreground: oklch(1 0 0);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.81 0.1 252);
--chart-2: oklch(0.62 0.19 260);
--chart-3: oklch(0.55 0.22 263);
--chart-4: oklch(0.49 0.22 264);
--chart-5: oklch(0.42 0.18 266);
--sidebar: oklch(1 0 0);
--sidebar-foreground: oklch(0.2988 0.0123 222.4429);
--sidebar-primary: oklch(0.2364 0.0083 240.2365);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--font-sans:
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
--font-mono:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
monospace;
--radius: 0.625rem;
--shadow-x: 0;
--shadow-y: 1px;
--shadow-blur: 3px;
--shadow-spread: 0px;
--shadow-opacity: 0.1;
--shadow-color: oklch(0 0 0);
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
--tracking-normal: 0em;
--spacing: 0.25rem;
--shadow-offset-x: 0;
--shadow-offset-y: 1px;
--letter-spacing: 0em;
}
.dark {
--background: oklch(0.1934 0.0062 236.9149);
--foreground: oklch(0.9881 0 0);
--card: oklch(0.2364 0.0083 240.2365);
--card-foreground: oklch(0.9881 0 0);
--popover: oklch(0.2988 0.0123 222.4429);
--popover-foreground: oklch(0.9881 0 0);
--primary: oklch(0.721 0.1873 47.564);
--primary-foreground: oklch(0.2988 0.0123 222.4429);
--secondary: oklch(0.2988 0.0123 222.4429);
--secondary-foreground: oklch(1 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.2988 0.0123 222.4429);
--accent-foreground: oklch(1 0 0);
--destructive: oklch(0.704 0.191 22.216);
--destructive-foreground: oklch(0.985 0 0);
--border: oklch(0.275 0 0);
--input: oklch(0.325 0 0);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.81 0.1 252);
--chart-2: oklch(0.62 0.19 260);
--chart-3: oklch(0.55 0.22 263);
--chart-4: oklch(0.49 0.22 264);
--chart-5: oklch(0.42 0.18 266);
--sidebar: oklch(0.2364 0.0083 240.2365);
--sidebar-foreground: oklch(0.9881 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(0.275 0 0);
--sidebar-ring: oklch(0.439 0 0);
--font-sans:
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
--font-mono:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
monospace;
--radius: 0.625rem;
--shadow-x: 0;
--shadow-y: 1px;
--shadow-blur: 3px;
--shadow-spread: 0px;
--shadow-opacity: 0.1;
--shadow-color: oklch(0 0 0);
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
--shadow-offset-x: 0;
--shadow-offset-y: 1px;
--letter-spacing: 0em;
--spacing: 0.25rem;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--font-sans: Inter, sans-serif;
--font-mono: JetBrains Mono, monospace;
--color-sidebar-ring: var(--sidebar-ring);
--font-sans:
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
--font-mono:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
monospace;
--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--shadow-2xs: var(--shadow-2xs);
--shadow-xs: var(--shadow-xs);
--shadow-sm: var(--shadow-sm);
--shadow: var(--shadow);
--shadow-md: var(--shadow-md);
--shadow-lg: var(--shadow-lg);
--shadow-xl: var(--shadow-xl);
--shadow-2xl: var(--shadow-2xl);
--radius: 0.625rem;
--font-serif: Source Serif 4, serif;
--radius: 0.375rem;
--tracking-tighter: calc(var(--tracking-normal) - 0.05em);
--tracking-tight: calc(var(--tracking-normal) - 0.025em);
--tracking-wide: calc(var(--tracking-normal) + 0.025em);
--tracking-wider: calc(var(--tracking-normal) + 0.05em);
--tracking-widest: calc(var(--tracking-normal) + 0.1em);
--tracking-normal: var(--tracking-normal);
--shadow-2xl: var(--shadow-2xl);
--shadow-xl: var(--shadow-xl);
--shadow-lg: var(--shadow-lg);
--shadow-md: var(--shadow-md);
--shadow: var(--shadow);
--shadow-sm: var(--shadow-sm);
--shadow-xs: var(--shadow-xs);
--shadow-2xs: var(--shadow-2xs);
--spacing: var(--spacing);
--letter-spacing: var(--letter-spacing);
--shadow-offset-y: var(--shadow-offset-y);
@ -199,6 +65,118 @@
--shadow-blur: var(--shadow-blur);
--shadow-opacity: var(--shadow-opacity);
--color-shadow-color: var(--shadow-color);
--color-destructive-foreground: var(--destructive-foreground);
}
:root {
--radius: 0.375rem;
--background: oklch(1 0 0);
--foreground: oklch(0.2686 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.2686 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.2686 0 0);
--primary: oklch(0.7686 0.1647 70.0804);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.967 0.0029 264.5419);
--secondary-foreground: oklch(0.4461 0.0263 256.8018);
--muted: oklch(0.9846 0.0017 247.8389);
--muted-foreground: oklch(0.551 0.0234 264.3637);
--accent: oklch(0.9869 0.0214 95.2774);
--accent-foreground: oklch(0.4732 0.1247 46.2007);
--destructive: oklch(0.6368 0.2078 25.3313);
--border: oklch(0.9276 0.0058 264.5313);
--input: oklch(0.9276 0.0058 264.5313);
--ring: oklch(0.7686 0.1647 70.0804);
--chart-1: oklch(0.7686 0.1647 70.0804);
--chart-2: oklch(0.6658 0.1574 58.3183);
--chart-3: oklch(0.5553 0.1455 48.9975);
--chart-4: oklch(0.4732 0.1247 46.2007);
--chart-5: oklch(0.4137 0.1054 45.9038);
--sidebar: oklch(0.9846 0.0017 247.8389);
--sidebar-foreground: oklch(0.2686 0 0);
--sidebar-primary: oklch(0.7686 0.1647 70.0804);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.9869 0.0214 95.2774);
--sidebar-accent-foreground: oklch(0.4732 0.1247 46.2007);
--sidebar-border: oklch(0.9276 0.0058 264.5313);
--sidebar-ring: oklch(0.7686 0.1647 70.0804);
--destructive-foreground: oklch(1 0 0);
--font-sans: Inter, sans-serif;
--font-serif: Source Serif 4, serif;
--font-mono: JetBrains Mono, monospace;
--shadow-color: hsl(0 0% 0%);
--shadow-opacity: 0.1;
--shadow-blur: 8px;
--shadow-spread: -1px;
--shadow-offset-x: 0px;
--shadow-offset-y: 4px;
--letter-spacing: 0em;
--spacing: 0.25rem;
--shadow-2xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
--shadow-sm: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 1px 2px -2px hsl(0 0% 0% / 0.1);
--shadow: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 1px 2px -2px hsl(0 0% 0% / 0.1);
--shadow-md: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 2px 4px -2px hsl(0 0% 0% / 0.1);
--shadow-lg: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 4px 6px -2px hsl(0 0% 0% / 0.1);
--shadow-xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 8px 10px -2px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.25);
--tracking-normal: 0em;
}
.dark {
--background: oklch(0.2046 0 0);
--foreground: oklch(0.9219 0 0);
--card: oklch(0.2686 0 0);
--card-foreground: oklch(0.9219 0 0);
--popover: oklch(0.2686 0 0);
--popover-foreground: oklch(0.9219 0 0);
--primary: oklch(0.7686 0.1647 70.0804);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.2686 0 0);
--secondary-foreground: oklch(0.9219 0 0);
--muted: oklch(0.2686 0 0);
--muted-foreground: oklch(0.7155 0 0);
--accent: oklch(0.4732 0.1247 46.2007);
--accent-foreground: oklch(0.9243 0.1151 95.7459);
--destructive: oklch(0.6368 0.2078 25.3313);
--border: oklch(0.3715 0 0);
--input: oklch(0.3715 0 0);
--ring: oklch(0.7686 0.1647 70.0804);
--chart-1: oklch(0.8369 0.1644 84.4286);
--chart-2: oklch(0.6658 0.1574 58.3183);
--chart-3: oklch(0.4732 0.1247 46.2007);
--chart-4: oklch(0.5553 0.1455 48.9975);
--chart-5: oklch(0.4732 0.1247 46.2007);
--sidebar: oklch(0.1684 0 0);
--sidebar-foreground: oklch(0.9219 0 0);
--sidebar-primary: oklch(0.7686 0.1647 70.0804);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.4732 0.1247 46.2007);
--sidebar-accent-foreground: oklch(0.9243 0.1151 95.7459);
--sidebar-border: oklch(0.3715 0 0);
--sidebar-ring: oklch(0.7686 0.1647 70.0804);
--destructive-foreground: oklch(1 0 0);
--radius: 0.375rem;
--font-sans: Inter, sans-serif;
--font-serif: Source Serif 4, serif;
--font-mono: JetBrains Mono, monospace;
--shadow-color: hsl(0 0% 0%);
--shadow-opacity: 0.1;
--shadow-blur: 8px;
--shadow-spread: -1px;
--shadow-offset-x: 0px;
--shadow-offset-y: 4px;
--letter-spacing: 0em;
--spacing: 0.25rem;
--shadow-2xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
--shadow-sm: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 1px 2px -2px hsl(0 0% 0% / 0.1);
--shadow: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 1px 2px -2px hsl(0 0% 0% / 0.1);
--shadow-md: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 2px 4px -2px hsl(0 0% 0% / 0.1);
--shadow-lg: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 4px 6px -2px hsl(0 0% 0% / 0.1);
--shadow-xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 8px 10px -2px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.25);
}
@layer base {

View file

@ -1,5 +1,5 @@
import { Editor } from '@tinymce/tinymce-react';
import React from 'react';
import { Editor } from '@tinymce/tinymce-react';
// 1. Define as propriedades que nosso componente vai receber
interface MainEditorProps {

View file

@ -5,9 +5,8 @@ import {
Frame,
GalleryVerticalEnd,
HouseIcon,
SquareMousePointer,
SquareTerminal,
UsersIcon,
UsersIcon
} from 'lucide-react';
import Image from 'next/image';
import * as React from 'react';
@ -27,6 +26,7 @@ import {
} from '@/components/ui/sidebar';
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
// This is sample data.
const data = {
teams: [],
@ -46,7 +46,7 @@ const data = {
{
title: 'Servicos',
url: '#',
icon: SquareMousePointer,
icon: UsersIcon,
isActive: false,
items: [
{
@ -54,12 +54,8 @@ const data = {
url: '/servicos/dashboard/',
},
{
title: 'Pedidos',
url: '/servicos/pedidos/',
},
{
title: 'Atos',
url: '/servicos/atos/',
title: 'Balcão',
url: '/servicos/balcao/',
},
],
},
@ -133,8 +129,8 @@ const data = {
url: '/administrativo/pessoas/estados-civis',
},
{
title: 'Regimes/Comunhão',
url: '/administrativo/pessoas/regimes-comunhao/',
title: "Regimes/Comunhão",
url: "/administrativo/pessoas/regimes-comunhao/",
},
{
title: 'Tipo de Medida',
@ -157,12 +153,12 @@ const data = {
url: '/administrativo/minutas/naturezas',
},
{
title: 'Censec/Tipo do Ato',
url: '/administrativo/centrais/censec/tipos-atos',
title: "Censec/Tipo do Ato",
url: "/administrativo/centrais/censec/tipos-atos"
},
{
title: 'Censec/Qualidades',
url: '/administrativo/centrais/censec/qualidades',
title: "Censec/Qualidades",
url: "/administrativo/centrais/censec/qualidades"
},
{
title: 'Censec/Centrais',
@ -173,41 +169,38 @@ const data = {
url: '/administrativo/centrais/censec/naturezas-litigios',
},
{
title: 'Tipos/Serviços',
url: '/administrativo/tipos-servicos',
title: "Atos/Partes Tipos",
url: "/administrativo/atos/partes-tipos",
},
{
title: 'Atos/Partes Tipos',
url: '/administrativo/atos/partes-tipos',
title: "Valores de Serviços",
url: "/administrativo/valores-de-servicos",
},
{
title: 'Valores de Serviços',
url: '/administrativo/valores-de-servicos',
title: "Gramatica",
url: "/administrativo/gramatica",
},
{
title: 'Gramatica',
url: '/administrativo/gramatica',
title: "Cartório",
url: "/administrativo/cartorio",
},
{
title: 'Cartório',
url: '/administrativo/cartorio',
title: "Financeiro/Periodo",
url: "/administrativo/financeiro/periodos",
},
{
title: 'Financeiro/Periodo',
url: '/administrativo/financeiro/periodos',
title: "Financeiro/Emolumentos",
url: "/administrativo/financeiro/emolumentos",
},
{
title: 'Financeiro/Emolumentos',
url: '/administrativo/financeiro/emolumentos',
title: "Selos/Grupos",
url: "/administrativo/selos/grupos",
},
{
title: 'Selos/Grupos',
url: '/administrativo/selos/grupos',
},
{
title: 'Financeiro/Cálculo Rápido',
url: '/administrativo/financeiro/calculo-rapido',
},
title: "Financeiro/Cálculo Rápido",
url: "/administrativo/financeiro/calculo-rapido",
}
],
},
],
@ -236,12 +229,16 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
alt="Logo do site"
width={100}
height={100}
className="rounded-lg"
className='rounded-lg'
/>
</div>
<div className="flex flex-col gap-0.5 leading-none">
<span className="font-semibold">Orius Tecnologia</span>
<span className="">25.9.1</span>
<span className="font-semibold">
Orius Tecnologia
</span>
<span className="">
25.9.1
</span>
</div>
</a>
</SidebarMenuButton>

View file

@ -1,20 +1,18 @@
'use client';
import { zodResolver } from '@hookform/resolvers/zod';
import Image from 'next/image';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import z from 'zod';
import { cn } from '@/lib/utils';
import { Card, CardContent } from '@/components/ui/card';
import { Input } from '@/components/ui/input';
import { cn } from '@/lib/utils';
import { GUsuarioLoginSchema } from '@/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema';
import z from 'zod';
import { zodResolver } from '@hookform/resolvers/zod';
import GUsuarioLoginService from '@/packages/administrativo/services/GUsuario/GUsuarioLogin';
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
import { Button } from './ui/button';
import { useForm } from 'react-hook-form';
import { useState } from 'react';
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form';
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
import { Button } from './ui/button';
import { GUsuarioLoginSchema } from '@/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema';
type FormValues = z.infer<typeof GUsuarioLoginSchema>;

View file

@ -31,7 +31,9 @@ export function NavMain({
}) {
return (
<SidebarGroup>
<SidebarGroupLabel>SAAS</SidebarGroupLabel>
<SidebarGroupLabel>
SAAS
</SidebarGroupLabel>
<SidebarMenu>
{items.map((item) => (
<Collapsible

View file

@ -32,7 +32,9 @@ export function NavProjects({
return (
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
<SidebarGroupLabel>Escrituras</SidebarGroupLabel>
<SidebarGroupLabel>
Escrituras
</SidebarGroupLabel>
<SidebarMenu>
{projects.map((item) => (
<SidebarMenuItem key={item.name}>

View file

@ -1,9 +1,6 @@
'use client';
import { ChevronsUpDown, LogOut, Moon, Sparkles, Sun } from 'lucide-react';
import { useTheme } from 'next-themes';
import { useCallback, useState } from 'react';
import { ChevronsUpDown, LogOut, Sparkles } from 'lucide-react';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import {
DropdownMenu,
@ -20,9 +17,11 @@ import {
SidebarMenuItem,
useSidebar,
} from '@/components/ui/sidebar';
import { useGUsuarioLogoutHook } from '@/packages/administrativo/hooks/GUsuario/useGUsuarioLogoutHook';
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
import GUsuarioAuthenticatedInterface from '@/shared/interfaces/GUsuarioAuthenticatedInterface';
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
import { useGUsuarioLogoutHook } from '@/packages/administrativo/hooks/GUsuario/useGUsuarioLogoutHook';
import { use, useCallback, useState } from 'react';
export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
// Hook para encerrar sessão
@ -33,25 +32,18 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
const { isMobile } = useSidebar();
// Tema (claro/escuro) - next-themes
const { theme, setTheme } = useTheme();
const isDark = theme === 'dark';
const handleConfirmOpen = useCallback(() => {
// Manipulação de formulário de confirmação
const handleConfirmOpen = useCallback(async () => {
setIsConfirmOpen(true);
}, []);
const handleLogoutConfirm = useCallback(() => {
const handleLogoutConfirm = useCallback(async () => {
logoutUsuario();
}, [logoutUsuario]);
const handleLogoutCancel = useCallback(() => {
setIsConfirmOpen(false);
}, []);
const handleToggleTheme = useCallback(() => {
setTheme(isDark ? 'light' : 'dark');
}, [isDark, setTheme]);
const handleLogoutCancel = useCallback(async () => {
setIsConfirmOpen(false);
}, []);
if (!user) {
return 'Carregando...';
@ -69,11 +61,13 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
>
<Avatar className="h-8 w-8 rounded-lg">
<AvatarImage src={user.sigla} alt={user.nome} />
<AvatarFallback className="rounded-lg">{user.sigla}</AvatarFallback>
</Avatar>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-medium">{user.nome}</span>
<span className="truncate text-xs">{user.email}</span>
</div>
@ -91,11 +85,13 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
<div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
<Avatar className="h-8 w-8 rounded-lg">
<AvatarImage src={user.sigla} alt={user.nome} />
<AvatarFallback className="rounded-lg">{user.sigla}</AvatarFallback>
</Avatar>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-medium">{user.nome}</span>
<span className="truncate text-xs">{user.email}</span>
</div>
</div>
@ -104,22 +100,16 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
<DropdownMenuSeparator />
<DropdownMenuGroup>
{/* Alternância de tema */}
<DropdownMenuItem className="cursor-pointer" onClick={handleToggleTheme}>
{isDark ? <Sun className="mr-2 h-4 w-4" /> : <Moon className="mr-2 h-4 w-4" />}
{isDark ? 'Modo claro' : 'Modo escuro'}
</DropdownMenuItem>
<DropdownMenuItem className="cursor-pointer">
<Sparkles className="mr-2 h-4 w-4" />
<Sparkles />
Configurações
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuItem className="cursor-pointer" onClick={handleConfirmOpen}>
<LogOut className="mr-2 h-4 w-4" />
<DropdownMenuItem className="cursor-pointer" onClick={() => handleConfirmOpen()}>
<LogOut />
Log out
</DropdownMenuItem>
</DropdownMenuContent>
@ -132,11 +122,11 @@ export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) {
isOpen={isConfirmOpen}
title="Log-out"
description="Atenção"
message="Deseja realmente encerrar a sessão? Dados não salvos serão perdidos."
message={`Deseja realmente encerrar a sessão ? Dados não salvos serão perdidos`}
confirmText="Sim, sair"
cancelText="Cancelar"
onConfirm={handleLogoutConfirm}
onCancel={handleLogoutCancel}
onConfirm={() => handleLogoutConfirm()}
onCancel={() => handleLogoutCancel()}
/>
</>
);

View file

@ -1,7 +1,7 @@
'use client';
import { ChevronsUpDown, Plus } from 'lucide-react';
import * as React from 'react';
import { ChevronsUpDown, Plus } from 'lucide-react';
import {
DropdownMenu,

View file

@ -1,17 +0,0 @@
'use client';
import { ThemeProvider as NextThemesProvider } from 'next-themes';
import * as React from 'react';
export function ThemeProvider({ children }: { children: React.ReactNode }) {
return (
<NextThemesProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</NextThemesProvider>
);
}

View file

@ -1,10 +1,10 @@
'use client';
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
import * as React from 'react';
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
import { buttonVariants } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { buttonVariants } from '@/components/ui/button';
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;

View file

@ -1,7 +1,7 @@
'use client';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import * as React from 'react';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import { cn } from '@/lib/utils';

View file

@ -1,39 +1,46 @@
import { Slot } from '@radix-ui/react-slot';
import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react';
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
const badgeVariants = cva(
'inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
{
variants: {
variant: {
default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
default:
"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
secondary:
'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
destructive:
'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline:
"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
},
},
defaultVariants: {
variant: 'default',
variant: "default",
},
},
);
}
)
function Badge({
className,
variant,
asChild = false,
...props
}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
const Comp = asChild ? Slot : 'span';
}: React.ComponentProps<"span"> &
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
const Comp = asChild ? Slot : "span"
return (
<Comp data-slot="badge" className={cn(badgeVariants({ variant }), className)} {...props} />
);
<Comp
data-slot="badge"
className={cn(badgeVariants({ variant }), className)}
{...props}
/>
)
}
export { Badge, badgeVariants };
export { Badge, badgeVariants }

View file

@ -1,6 +1,6 @@
import * as React from 'react';
import { Slot } from '@radix-ui/react-slot';
import { ChevronRight, MoreHorizontal } from 'lucide-react';
import * as React from 'react';
import { cn } from '@/lib/utils';

View file

@ -1,78 +0,0 @@
import { Slot } from '@radix-ui/react-slot';
import { cva, type VariantProps } from 'class-variance-authority';
import { Separator } from '@/components/ui/separator';
import { cn } from '@/lib/utils';
const buttonGroupVariants = cva(
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
{
variants: {
orientation: {
horizontal:
'[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none',
vertical:
'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none',
},
},
defaultVariants: {
orientation: 'horizontal',
},
},
);
function ButtonGroup({
className,
orientation,
...props
}: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>) {
return (
<div
role="group"
data-slot="button-group"
data-orientation={orientation}
className={cn(buttonGroupVariants({ orientation }), className)}
{...props}
/>
);
}
function ButtonGroupText({
className,
asChild = false,
...props
}: React.ComponentProps<'div'> & {
asChild?: boolean;
}) {
const Comp = asChild ? Slot : 'div';
return (
<Comp
className={cn(
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
className,
)}
{...props}
/>
);
}
function ButtonGroupSeparator({
className,
orientation = 'vertical',
...props
}: React.ComponentProps<typeof Separator>) {
return (
<Separator
data-slot="button-group-separator"
orientation={orientation}
className={cn(
'bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto',
className,
)}
{...props}
/>
);
}
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };

View file

@ -1,38 +1,40 @@
import { Slot } from '@radix-ui/react-slot';
import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react';
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
{
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline:
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
link: 'text-primary underline-offset-4 hover:underline',
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost:
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
icon: 'size-9',
'icon-sm': 'size-8',
'icon-lg': 'size-10',
default: "h-9 px-4 py-2 has-[>svg]:px-3",
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
"icon-sm": "size-8",
"icon-lg": "size-10",
},
},
defaultVariants: {
variant: 'default',
size: 'default',
variant: "default",
size: "default",
},
},
);
}
)
function Button({
className,
@ -40,11 +42,11 @@ function Button({
size,
asChild = false,
...props
}: React.ComponentProps<'button'> &
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean;
asChild?: boolean
}) {
const Comp = asChild ? Slot : 'button';
const Comp = asChild ? Slot : "button"
return (
<Comp
@ -52,7 +54,7 @@ function Button({
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
);
)
}
export { Button, buttonVariants };
export { Button, buttonVariants }

View file

@ -1,75 +1,92 @@
import * as React from 'react';
import * as React from "react"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function Card({ className, ...props }: React.ComponentProps<'div'>) {
function Card({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card"
className={cn(
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
className,
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
className
)}
{...props}
/>
);
)
}
function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-header"
className={cn(
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
className,
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
className
)}
{...props}
/>
);
)
}
function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-title"
className={cn('leading-none font-semibold', className)}
className={cn("leading-none font-semibold", className)}
{...props}
/>
);
)
}
function CardDescription({ className, ...props }: React.ComponentProps<'div'>) {
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-description"
className={cn('text-muted-foreground text-sm', className)}
className={cn("text-muted-foreground text-sm", className)}
{...props}
/>
);
)
}
function CardAction({ className, ...props }: React.ComponentProps<'div'>) {
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-action"
className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}
className={cn(
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
className
)}
{...props}
/>
);
)
}
function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
return <div data-slot="card-content" className={cn('px-6', className)} {...props} />;
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-content"
className={cn("px-6", className)}
{...props}
/>
)
}
function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-footer"
className={cn('flex items-center px-6 [.border-t]:pt-6', className)}
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
{...props}
/>
);
)
}
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardAction,
CardDescription,
CardContent,
}

View file

@ -1,132 +0,0 @@
const ChartTooltip = RechartsPrimitive.Tooltip;
function ChartTooltipContent(props: any) {
const {
active,
payload,
className,
indicator = 'dot',
hideLabel = false,
hideIndicator = false,
label,
labelFormatter,
labelClassName,
formatter,
color,
nameKey,
labelKey,
} = props;
const { config } = useChart();
const tooltipLabel = React.useMemo(() => {
if (hideLabel || !payload?.length) {
return null;
}
const [item] = payload;
const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
const value =
!labelKey && typeof label === 'string'
? config[label as keyof typeof config]?.label || label
: itemConfig?.label;
if (labelFormatter) {
return (
<div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>
);
}
if (!value) {
return null;
}
return <div className={cn('font-medium', labelClassName)}>{value}</div>;
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
if (!active || !payload?.length) {
return null;
}
const nestLabel = payload.length === 1 && indicator !== 'dot';
return (
<div
className={cn(
'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',
className,
)}
>
{!nestLabel ? tooltipLabel : null}
<div className="grid gap-1.5">
{payload
.filter((item: any) => item.type !== 'none')
.map((item: any, index: number) => {
const key = `${nameKey || item.name || item.dataKey || 'value'}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
const indicatorColor = color || item.payload?.fill || item.color;
return (
<div
key={item.dataKey}
className={cn(
'[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',
indicator === 'dot' && 'items-center',
)}
>
{formatter && item?.value !== undefined && item.name ? (
formatter(item.value, item.name, item, index, item.payload)
) : (
<>
{itemConfig?.icon ? (
<itemConfig.icon />
) : (
!hideIndicator && (
<div
className={cn(
'shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)',
{
'h-2.5 w-2.5': indicator === 'dot',
'w-1': indicator === 'line',
'w-0 border-[1.5px] border-dashed bg-transparent':
indicator === 'dashed',
'my-0.5': nestLabel && indicator === 'dashed',
},
)}
style={
{
'--color-bg': indicatorColor,
'--color-border': indicatorColor,
} as React.CSSProperties
}
/>
)
)}
<div
className={cn(
'flex flex-1 justify-between leading-none',
nestLabel ? 'items-end' : 'items-center',
)}
>
<div className="grid gap-1.5">
{nestLabel ? tooltipLabel : null}
<span className="text-muted-foreground">
{itemConfig?.label || item.name}
</span>
</div>
{item.value && (
<span className="text-foreground font-mono font-medium tabular-nums">
{item.value.toLocaleString()}
</span>
)}
</div>
</>
)}
</div>
);
})}
</div>
</div>
);
}

View file

@ -1,8 +1,8 @@
'use client';
import * as React from 'react';
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
import { CheckIcon } from 'lucide-react';
import * as React from 'react';
import { cn } from '@/lib/utils';

View file

@ -1,9 +1,10 @@
'use client';
import * as React from 'react';
import { Command as CommandPrimitive } from 'cmdk';
import { SearchIcon } from 'lucide-react';
import * as React from 'react';
import { cn } from '@/lib/utils';
import {
Dialog,
DialogContent,
@ -11,7 +12,6 @@ import {
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { cn } from '@/lib/utils';
function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
return (

View file

@ -1,8 +1,8 @@
'use client';
import * as React from 'react';
import * as DialogPrimitive from '@radix-ui/react-dialog';
import { XIcon } from 'lucide-react';
import * as React from 'react';
import { cn } from '@/lib/utils';

View file

@ -1,8 +1,8 @@
'use client';
import * as React from 'react';
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
import * as React from 'react';
import { cn } from '@/lib/utils';

View file

@ -1,8 +1,8 @@
'use client';
import * as React from 'react';
import * as LabelPrimitive from '@radix-ui/react-label';
import { Slot } from '@radix-ui/react-slot';
import * as React from 'react';
import {
Controller,
FormProvider,
@ -13,8 +13,8 @@ import {
type FieldValues,
} from 'react-hook-form';
import { Label } from '@/components/ui/label';
import { cn } from '@/lib/utils';
import { Label } from '@/components/ui/label';
const Form = FormProvider;

View file

@ -1,51 +1,58 @@
'use client';
"use client"
import { OTPInput, OTPInputContext } from 'input-otp';
import { MinusIcon } from 'lucide-react';
import * as React from 'react';
import * as React from "react"
import { OTPInput, OTPInputContext } from "input-otp"
import { MinusIcon } from "lucide-react"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function InputOTP({
className,
containerClassName,
...props
}: React.ComponentProps<typeof OTPInput> & {
containerClassName?: string;
containerClassName?: string
}) {
return (
<OTPInput
data-slot="input-otp"
containerClassName={cn('flex items-center gap-2 has-disabled:opacity-50', containerClassName)}
className={cn('disabled:cursor-not-allowed', className)}
containerClassName={cn(
"flex items-center gap-2 has-disabled:opacity-50",
containerClassName
)}
className={cn("disabled:cursor-not-allowed", className)}
{...props}
/>
);
)
}
function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {
function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
return (
<div data-slot="input-otp-group" className={cn('flex items-center', className)} {...props} />
);
<div
data-slot="input-otp-group"
className={cn("flex items-center", className)}
{...props}
/>
)
}
function InputOTPSlot({
index,
className,
...props
}: React.ComponentProps<'div'> & {
index: number;
}: React.ComponentProps<"div"> & {
index: number
}) {
const inputOTPContext = React.useContext(OTPInputContext);
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
const inputOTPContext = React.useContext(OTPInputContext)
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}
return (
<div
data-slot="input-otp-slot"
data-active={isActive}
className={cn(
'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]',
className,
"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
className
)}
{...props}
>
@ -56,15 +63,15 @@ function InputOTPSlot({
</div>
)}
</div>
);
)
}
function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {
function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
return (
<div data-slot="input-otp-separator" role="separator" {...props}>
<MinusIcon />
</div>
);
)
}
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }

View file

@ -1,21 +1,21 @@
import * as React from 'react';
import * as React from "react"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (
<input
type={type}
data-slot="input"
className={cn(
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
className,
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
className
)}
{...props}
/>
);
)
}
export { Input };
export { Input }

View file

@ -1,172 +0,0 @@
import { Slot } from '@radix-ui/react-slot';
import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react';
import { Separator } from '@/components/ui/separator';
import { cn } from '@/lib/utils';
function ItemGroup({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div
role="list"
data-slot="item-group"
className={cn('group/item-group flex flex-col', className)}
{...props}
/>
);
}
function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {
return (
<Separator
data-slot="item-separator"
orientation="horizontal"
className={cn('my-0', className)}
{...props}
/>
);
}
const itemVariants = cva(
'group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
{
variants: {
variant: {
default: 'bg-transparent',
outline: 'border-border',
muted: 'bg-muted/50',
},
size: {
default: 'p-4 gap-4 ',
sm: 'py-3 px-4 gap-2.5',
},
},
defaultVariants: {
variant: 'default',
size: 'default',
},
},
);
function Item({
className,
variant = 'default',
size = 'default',
asChild = false,
...props
}: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & { asChild?: boolean }) {
const Comp = asChild ? Slot : 'div';
return (
<Comp
data-slot="item"
data-variant={variant}
data-size={size}
className={cn(itemVariants({ variant, size, className }))}
{...props}
/>
);
}
const itemMediaVariants = cva(
'flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5',
{
variants: {
variant: {
default: 'bg-transparent',
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
image: 'size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover',
},
},
defaultVariants: {
variant: 'default',
},
},
);
function ItemMedia({
className,
variant = 'default',
...props
}: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>) {
return (
<div
data-slot="item-media"
data-variant={variant}
className={cn(itemMediaVariants({ variant, className }))}
{...props}
/>
);
}
function ItemContent({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div
data-slot="item-content"
className={cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className)}
{...props}
/>
);
}
function ItemTitle({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div
data-slot="item-title"
className={cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', className)}
{...props}
/>
);
}
function ItemDescription({ className, ...props }: React.ComponentProps<'p'>) {
return (
<p
data-slot="item-description"
className={cn(
'text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance',
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
className,
)}
{...props}
/>
);
}
function ItemActions({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div data-slot="item-actions" className={cn('flex items-center gap-2', className)} {...props} />
);
}
function ItemHeader({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div
data-slot="item-header"
className={cn('flex basis-full items-center justify-between gap-2', className)}
{...props}
/>
);
}
function ItemFooter({ className, ...props }: React.ComponentProps<'div'>) {
return (
<div
data-slot="item-footer"
className={cn('flex basis-full items-center justify-between gap-2', className)}
{...props}
/>
);
}
export {
Item,
ItemMedia,
ItemContent,
ItemActions,
ItemGroup,
ItemSeparator,
ItemTitle,
ItemDescription,
ItemHeader,
ItemFooter,
};

View file

@ -1,7 +1,7 @@
'use client';
import * as LabelPrimitive from '@radix-ui/react-label';
import * as React from 'react';
import * as LabelPrimitive from '@radix-ui/react-label';
import { cn } from '@/lib/utils';

View file

@ -1,7 +1,7 @@
'use client';
import * as PopoverPrimitive from '@radix-ui/react-popover';
import * as React from 'react';
import * as PopoverPrimitive from '@radix-ui/react-popover';
import { cn } from '@/lib/utils';

View file

@ -1,9 +1,9 @@
'use client';
"use client"
import * as ProgressPrimitive from '@radix-ui/react-progress';
import * as React from 'react';
import * as React from "react"
import * as ProgressPrimitive from "@radix-ui/react-progress"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function Progress({
className,
@ -13,7 +13,10 @@ function Progress({
return (
<ProgressPrimitive.Root
data-slot="progress"
className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}
className={cn(
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
className
)}
{...props}
>
<ProgressPrimitive.Indicator
@ -22,7 +25,7 @@ function Progress({
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</ProgressPrimitive.Root>
);
)
}
export { Progress };
export { Progress }

View file

@ -1,9 +1,9 @@
'use client';
"use client"
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
import * as React from 'react';
import * as React from "react"
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function ScrollArea({
className,
@ -13,7 +13,7 @@ function ScrollArea({
return (
<ScrollAreaPrimitive.Root
data-slot="scroll-area"
className={cn('relative', className)}
className={cn("relative", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport
@ -25,12 +25,12 @@ function ScrollArea({
<ScrollBar />
<ScrollAreaPrimitive.Corner />
</ScrollAreaPrimitive.Root>
);
)
}
function ScrollBar({
className,
orientation = 'vertical',
orientation = "vertical",
...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
return (
@ -38,10 +38,12 @@ function ScrollBar({
data-slot="scroll-area-scrollbar"
orientation={orientation}
className={cn(
'flex touch-none p-px transition-colors select-none',
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',
className,
"flex touch-none p-px transition-colors select-none",
orientation === "vertical" &&
"h-full w-2.5 border-l border-l-transparent",
orientation === "horizontal" &&
"h-2.5 flex-col border-t border-t-transparent",
className
)}
{...props}
>
@ -50,7 +52,7 @@ function ScrollBar({
className="bg-border relative flex-1 rounded-full"
/>
</ScrollAreaPrimitive.ScrollAreaScrollbar>
);
)
}
export { ScrollArea, ScrollBar };
export { ScrollArea, ScrollBar }

View file

@ -1,30 +1,36 @@
'use client';
"use client"
import * as SelectPrimitive from '@radix-ui/react-select';
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
import * as React from 'react';
import * as React from "react"
import * as SelectPrimitive from "@radix-ui/react-select"
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
return <SelectPrimitive.Root data-slot="select" {...props} />;
function Select({
...props
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
return <SelectPrimitive.Root data-slot="select" {...props} />
}
function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
function SelectGroup({
...props
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
return <SelectPrimitive.Group data-slot="select-group" {...props} />
}
function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
function SelectValue({
...props
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
return <SelectPrimitive.Value data-slot="select-value" {...props} />
}
function SelectTrigger({
className,
size = 'default',
size = "default",
children,
...props
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
size?: 'sm' | 'default';
size?: "sm" | "default"
}) {
return (
<SelectPrimitive.Trigger
@ -32,7 +38,7 @@ function SelectTrigger({
data-size={size}
className={cn(
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
className,
className
)}
{...props}
>
@ -41,14 +47,14 @@ function SelectTrigger({
<ChevronDownIcon className="size-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
);
)
}
function SelectContent({
className,
children,
position = 'popper',
align = 'center',
position = "popper",
align = "center",
...props
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
return (
@ -56,10 +62,10 @@ function SelectContent({
<SelectPrimitive.Content
data-slot="select-content"
className={cn(
'bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
position === 'popper' &&
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
className,
"bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className
)}
position={position}
align={align}
@ -68,9 +74,9 @@ function SelectContent({
<SelectScrollUpButton />
<SelectPrimitive.Viewport
className={cn(
'p-1',
position === 'popper' &&
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
)}
>
{children}
@ -78,17 +84,20 @@ function SelectContent({
<SelectScrollDownButton />
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
);
)
}
function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
function SelectLabel({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
return (
<SelectPrimitive.Label
data-slot="select-label"
className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
{...props}
/>
);
)
}
function SelectItem({
@ -101,7 +110,7 @@ function SelectItem({
data-slot="select-item"
className={cn(
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
className,
className
)}
{...props}
>
@ -112,7 +121,7 @@ function SelectItem({
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item>
);
)
}
function SelectSeparator({
@ -122,10 +131,10 @@ function SelectSeparator({
return (
<SelectPrimitive.Separator
data-slot="select-separator"
className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
{...props}
/>
);
)
}
function SelectScrollUpButton({
@ -135,12 +144,15 @@ function SelectScrollUpButton({
return (
<SelectPrimitive.ScrollUpButton
data-slot="select-scroll-up-button"
className={cn('flex cursor-default items-center justify-center py-1', className)}
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronUpIcon className="size-4" />
</SelectPrimitive.ScrollUpButton>
);
)
}
function SelectScrollDownButton({
@ -150,12 +162,15 @@ function SelectScrollDownButton({
return (
<SelectPrimitive.ScrollDownButton
data-slot="select-scroll-down-button"
className={cn('flex cursor-default items-center justify-center py-1', className)}
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronDownIcon className="size-4" />
</SelectPrimitive.ScrollDownButton>
);
)
}
export {
@ -169,4 +184,4 @@ export {
SelectSeparator,
SelectTrigger,
SelectValue,
};
}

View file

@ -1,7 +1,7 @@
'use client';
import * as SeparatorPrimitive from '@radix-ui/react-separator';
import * as React from 'react';
import * as SeparatorPrimitive from '@radix-ui/react-separator';
import { cn } from '@/lib/utils';

View file

@ -1,8 +1,8 @@
'use client';
import * as React from 'react';
import * as SheetPrimitive from '@radix-ui/react-dialog';
import { XIcon } from 'lucide-react';
import * as React from 'react';
import { cn } from '@/lib/utils';

View file

@ -1,10 +1,12 @@
'use client';
import * as React from 'react';
import { Slot } from '@radix-ui/react-slot';
import { cva, VariantProps } from 'class-variance-authority';
import { PanelLeftIcon } from 'lucide-react';
import * as React from 'react';
import { useIsMobile } from '@/hooks/use-mobile';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Separator } from '@/components/ui/separator';
@ -17,8 +19,6 @@ import {
} from '@/components/ui/sheet';
import { Skeleton } from '@/components/ui/skeleton';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
import { useIsMobile } from '@/hooks/use-mobile';
import { cn } from '@/lib/utils';
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@ -548,7 +548,7 @@ function SidebarMenuAction({
'peer-data-[size=lg]/menu-button:top-2.5',
'group-data-[collapsible=icon]:hidden',
showOnHover &&
'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',
'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',
className,
)}
{...props}

View file

@ -1,28 +1,31 @@
'use client';
"use client"
import * as SwitchPrimitive from '@radix-ui/react-switch';
import * as React from 'react';
import * as React from "react"
import * as SwitchPrimitive from "@radix-ui/react-switch"
import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"
function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
function Switch({
className,
...props
}: React.ComponentProps<typeof SwitchPrimitive.Root>) {
return (
<SwitchPrimitive.Root
data-slot="switch"
className={cn(
'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
className,
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
>
<SwitchPrimitive.Thumb
data-slot="switch-thumb"
className={cn(
'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0',
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
)}
/>
</SwitchPrimitive.Root>
);
)
}
export { Switch };
export { Switch }

View file

@ -1,7 +1,7 @@
'use client';
import * as TabsPrimitive from '@radix-ui/react-tabs';
import * as React from 'react';
import * as TabsPrimitive from '@radix-ui/react-tabs';
import { cn } from '@/lib/utils';

View file

@ -1,7 +1,7 @@
'use client';
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
import * as React from 'react';
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
import { cn } from '@/lib/utils';

View file

@ -4,19 +4,13 @@ import { NextResponse, type MiddlewareConfig, type NextRequest } from 'next/serv
const publicRoutes = [
{ path: '/login', whenAuthenticated: 'redirect' },
{ path: '/register', whenAuthenticated: 'redirect' },
{ path: '/', whenAuthenticated: 'next' },
] as const;
const ROOT_PATH = '/login'; // url raiz
export function middleware(request: NextRequest) {
const path = request.nextUrl.pathname;
// --- AJUSTE NECESSÁRIO PARA ONLYOFFICE ---
// Se a rota termina em .docx, libera o acesso imediatamente (sem checar token)
if (path.endsWith('.docx')) {
return NextResponse.next();
}
// -----------------------------------------
const publicRoute = publicRoutes.find((route) => route.path === path);
const authToken = request.cookies.get('access_token');
@ -32,8 +26,6 @@ export function middleware(request: NextRequest) {
// 3. Autenticado em rota pública com flag "redirect" → vai para raiz
if (authToken && publicRoute && publicRoute.whenAuthenticated === 'redirect') {
// OBS: Se ROOT_PATH for '/login', isso pode gerar um loop infinito para usuários logados.
// O ideal seria redirecionar para '/' (dashboard), mas mantive seu código original.
return NextResponse.redirect(new URL(ROOT_PATH, request.url));
}
@ -61,7 +53,7 @@ export function middleware(request: NextRequest) {
export const config: MiddlewareConfig = {
matcher: [
// ignora APIs, arquivos estáticos, metadados E ARQUIVOS .DOCX
'/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|images|.*\\.docx$).*)',
// ignora APIs, arquivos estáticos e metadados
'/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|images).*)',
],
};
};

Some files were not shown because too many files have changed in this diff Show more