Compare commits
2 Commits
master
...
feature-cs
| Author | SHA1 | Date | |
|---|---|---|---|
| 4230d90de6 | |||
| e9b1d117e8 |
19
.agent/profile.yml
Normal file
19
.agent/profile.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
schema_version: 1
|
||||
|
||||
project:
|
||||
id: kart-front
|
||||
name: KART Front
|
||||
type: internal-service
|
||||
layer: frontend
|
||||
legacy: true
|
||||
|
||||
stack:
|
||||
- react
|
||||
|
||||
migration:
|
||||
status: planned
|
||||
target_stack:
|
||||
- typescript
|
||||
- react
|
||||
- nextjs
|
||||
strategy: staged
|
||||
26
.agent/project.md
Normal file
26
.agent/project.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## KART Front Repository Rules
|
||||
|
||||
### Repository Role and Current Authority
|
||||
|
||||
- This repository is the current React 17 and JavaScript frontend for KART survey processing and reporting.
|
||||
- Treat the existing routing, state management, report screens, tables, charts, exports, and custom publishing CSS as authoritative until an approved migration slice replaces them.
|
||||
- Do not perform incidental JavaScript-to-TypeScript, custom-CSS-to-Tailwind, React-to-Next.js, router, or state-library migrations while handling an unrelated change.
|
||||
- The sibling `../Style_publish` directory is outside this Git repository. Treat it as external reference material and do not modify it unless a task explicitly adds it to scope.
|
||||
|
||||
### Legacy Auxiliary Server
|
||||
|
||||
- The tracked `server/` directory is a legacy auxiliary Express/MSSQL artifact and includes embedded connection configuration. Do not copy, disclose, extend, or rely on those values.
|
||||
- Treat removal or replacement of that server configuration as migration cleanup; keep it outside unrelated frontend maintenance.
|
||||
|
||||
### Frontend Migration Direction
|
||||
|
||||
- The approved destination is Next.js with TypeScript and shadcn/ui, migrated by bounded route or feature slices.
|
||||
- In an approved migration slice, use shared KRI frontend contracts and shadcn components before creating application-local equivalents.
|
||||
- Do not create new frontend TypeScript type or interface names ending in `Dto` or `DTO`.
|
||||
- Preserve report filters, table and chart semantics, loading and error states, export behavior, responsive behavior, and user-visible styling during migration.
|
||||
- Existing partial Tailwind or shadcn work does not authorize a broad migration or establish that the entire application has already moved to the target architecture.
|
||||
|
||||
### Harness and Verification
|
||||
|
||||
- `AGENTS.md` and `CLAUDE.md` are generated. Edit `.agent/profile.yml` or `.agent/project.md`, then recompose instead of editing generated files.
|
||||
- Use the repository's existing package manager and narrow frontend checks. Do not start the auxiliary server or connect to MSSQL during validation.
|
||||
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/.gitattributes text eol=lf
|
||||
/.agent/** text eol=lf
|
||||
/AGENTS.md text eol=lf
|
||||
/CLAUDE.md text eol=lf
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -29,3 +29,5 @@ pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
tsconfig.node.tsbuildinfo
|
||||
|
||||
build/*
|
||||
250
AGENTS.md
Normal file
250
AGENTS.md
Normal file
@@ -0,0 +1,250 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Project: kart-front
|
||||
Schema version: 1
|
||||
Edit the source fragments or repository .agent files, then recompose.
|
||||
-->
|
||||
|
||||
# KRI Development Base Instructions
|
||||
|
||||
This document defines the shared working rules for KRI development repositories.
|
||||
Keep project-specific facts and commands in the project profile and project rules.
|
||||
|
||||
## Instruction Resolution
|
||||
|
||||
Apply repository instructions in this order:
|
||||
|
||||
1. Base rules
|
||||
2. Project-type rules
|
||||
3. Technology-stack rules
|
||||
4. Shared consumer contracts
|
||||
5. Project-specific rules
|
||||
6. The explicitly approved task scope
|
||||
|
||||
Later and more specific instructions may override earlier general instructions only within their stated scope.
|
||||
|
||||
- Apply a shared consumer contract only when `.agent/profile.yml` declares it.
|
||||
- Do not silently resolve a material instruction conflict. Report the conflicting rules and request a decision before changing files.
|
||||
- Rules involving destructive actions, credentials, external systems, production, deployment, databases, or Git publication require explicit authorization even when a later rule is less restrictive.
|
||||
|
||||
## Communication
|
||||
|
||||
- Respond to the user in Korean unless the user requests another language.
|
||||
- Keep code identifiers, commands, paths, protocol names, and external API terms in their original form.
|
||||
- Follow the repository's existing language conventions for code comments and user-facing messages.
|
||||
- Lead with the result or decision, then provide only the detail needed to verify it.
|
||||
- Do not create or retain a full session transcript.
|
||||
|
||||
## Work Authorization
|
||||
|
||||
- The default workflow is discussion first and explicit execution approval second.
|
||||
- During discussion, perform only read-only investigation needed to understand the task and propose a concrete plan, unless the user prohibits inspection.
|
||||
- Read-only investigation may include file inspection, code search, encoding checks, `git status`, `git diff`, `git log`, and sanitized official-documentation lookup.
|
||||
- Before execution approval, do not edit files, install dependencies, run builds or tests, start services, connect to databases, or change local or external state.
|
||||
- Before requesting approval, describe the intended scope, affected areas, validation plan, and material risks.
|
||||
- Treat approval as limited to the presented scope. Pause and discuss again if the work materially expands.
|
||||
- If the user explicitly requests immediate execution without prior discussion, the discussion gate may be skipped for the stated scope.
|
||||
- Fast-track authorization does not implicitly authorize protected operations such as destructive commands, production changes, deployments, database mutations, Git publication, or external messages.
|
||||
|
||||
## Local Development Environment
|
||||
|
||||
- Primary OS: Windows 11.
|
||||
- Primary shell: PowerShell.
|
||||
- Use Git Bash only when the repository already depends on Bash or POSIX shell behavior.
|
||||
- Prefer repository-provided wrappers and scripts over globally installed commands.
|
||||
- Do not assume that GNU utilities, WSL, Docker, or a Unix-compatible shell are available unless the project profile confirms them.
|
||||
- Detect Java, Node.js, .NET, Python, package-manager, and database-tool versions from repository configuration.
|
||||
- Do not install or modify global toolchains as part of a project task.
|
||||
|
||||
Preferred human-facing tools:
|
||||
|
||||
- Classic ASP: Visual Studio Code
|
||||
- Java and Spring Boot: IntelliJ IDEA
|
||||
- C# and .NET: JetBrains Rider
|
||||
- JavaScript, TypeScript, and Next.js: JetBrains WebStorm
|
||||
- Python: JetBrains PyCharm
|
||||
- Microsoft SQL Server: SQL Server Management Studio
|
||||
- Other databases: JetBrains DataGrip
|
||||
|
||||
- These preferences do not authorize launching or controlling a GUI application.
|
||||
- Prefer IDE-independent commands that can also run in CI.
|
||||
- Do not modify global IDE settings.
|
||||
- Do not create or modify `.idea`, `.vscode`, workspace, or run-configuration files unless the approved task requires it.
|
||||
- Preserve existing shared IDE configuration when it is already tracked.
|
||||
|
||||
## PowerShell and Path Safety
|
||||
|
||||
- Quote paths containing spaces, brackets, parentheses, Korean characters, or PowerShell metacharacters.
|
||||
- Prefer `-LiteralPath` when operating on an exact filesystem path.
|
||||
- Use project-relative paths in committed configuration and documentation. Do not commit machine-specific paths such as `D:\_____Dev\...`.
|
||||
- Do not pass filesystem targets between PowerShell, `cmd.exe`, and Bash for destructive or recursive operations.
|
||||
- Keep a filesystem operation within one shell from target resolution through execution.
|
||||
- Before a recursive delete or move, resolve and verify every absolute target.
|
||||
- Never use a drive root, workspace root, user profile, unresolved variable, wildcard, or broad glob as a recursive delete target.
|
||||
- Prefer recoverable operations when practical.
|
||||
|
||||
## Change Discipline
|
||||
|
||||
- Preserve all existing user changes, including uncommitted and untracked work.
|
||||
- Keep changes minimal but complete for the approved objective.
|
||||
- Avoid unrelated cleanup, formatting, renaming, dependency upgrades, and architectural refactoring.
|
||||
- Do not overwrite or revert unrelated changes.
|
||||
- Stop and report when the requested change overlaps existing work in a way that cannot be handled safely.
|
||||
- Prefer changing an authoritative source over editing generated output.
|
||||
- Treat files marked as generated as read-only unless regeneration is part of the approved plan.
|
||||
- Do not edit vendored dependencies, build outputs, caches, or generated clients unless explicitly required.
|
||||
- Do not regenerate a broad set of files for a narrow change without first explaining the expected output scope.
|
||||
|
||||
## Text Encoding and Korean Content Safety
|
||||
|
||||
- Treat the existing file encoding, BOM state, and line-ending style as part of the file's contract.
|
||||
- Preserve Korean comments, user-facing messages, error messages, identifiers, and documentation exactly unless the task explicitly requires changing them.
|
||||
- Do not assume that garbled terminal output means the file itself is corrupted. Verify bytes and encoding before modifying suspicious text.
|
||||
- Before editing an existing text file, determine its current encoding and BOM state when repository configuration does not already guarantee them.
|
||||
- Do not convert encoding, add or remove a BOM, or normalize line endings as a side effect of an unrelated change.
|
||||
- Avoid whole-file rewrites for small changes.
|
||||
- Do not rewrite source files through `Get-Content | Set-Content`, `Out-File`, shell redirection, or another method whose encoding behavior is implicit.
|
||||
- Do not use a patching or formatting tool on a non-UTF-8 file unless it is known to preserve that file's encoding.
|
||||
- Treat a console display problem and an on-disk encoding problem as separate issues.
|
||||
- After editing Korean text, inspect the diff for replacement characters (`<60>`), mojibake, unexpected escapes, BOM changes, and unrelated line-ending changes.
|
||||
- Run `.agent/tools/check-encoding.ps1` when it is available and the change touches Korean text or a non-default encoding.
|
||||
- If encoding cannot be identified confidently, stop before writing and report the affected file and evidence.
|
||||
- For a new text file, follow repository configuration. If no rule exists, use UTF-8 without BOM.
|
||||
|
||||
## Git Safety
|
||||
|
||||
- Use `git status`, `git diff`, and `git log` for read-only investigation.
|
||||
- Do not run `commit`, `push`, `pull`, `fetch`, `merge`, `rebase`, `reset`, `checkout`, `switch`, `stash`, `clean`, `tag`, or force operations unless that specific operation is explicitly approved.
|
||||
- Source-edit approval does not include commit or push approval.
|
||||
- Never amend an existing commit unless explicitly requested.
|
||||
- Before an approved commit, show the intended files, validation results, and proposed commit message.
|
||||
- Never push directly to a protected branch unless the user names the target branch and explicitly authorizes the push.
|
||||
|
||||
## Dependencies and External Actions
|
||||
|
||||
- Use the package manager, lockfile, and toolchain already selected by the repository.
|
||||
- Do not install global packages.
|
||||
- Do not add, remove, or upgrade a dependency unless it was included in the approved plan.
|
||||
- Pause for approval if an unplanned dependency becomes necessary.
|
||||
- Keep lockfiles synchronized with approved dependency changes.
|
||||
- Do not deploy, publish packages, create releases, send messages or email, call business APIs, or modify external services unless explicitly requested.
|
||||
- Never upload proprietary source code, internal documents, credentials, customer data, or database contents to an external service.
|
||||
- Remove secrets and unnecessary internal identifiers from external search queries.
|
||||
|
||||
## Database Safety
|
||||
|
||||
- Treat writing or reviewing SQL as source code separately from executing SQL against a database.
|
||||
- SQL files, migrations, schema proposals, and query drafts may be created within an approved source-change scope.
|
||||
- Do not connect to a shared, staging, or production database without explicit authorization for that environment.
|
||||
- Read-only queries against a non-local database also require authorization because results may contain sensitive data.
|
||||
- Do not execute DDL, DML, stored procedures, migrations, administrative commands, or data-correction scripts against a non-disposable database without separate authorization for the exact target and operation.
|
||||
- Source-change approval does not authorize migration execution.
|
||||
- Use a disposable local or test database for approved validation only after verifying its identity and disposable nature.
|
||||
- Never place credentials, connection strings, or sensitive query results in source files, logs, generated documents, or chat output.
|
||||
|
||||
## Secrets and Sensitive Data
|
||||
|
||||
- Never add credentials, tokens, passwords, private keys, connection strings, session identifiers, or production data to source control.
|
||||
- Read sensitive files only when the approved task requires it and no safer source exists.
|
||||
- Prefer inspecting configuration keys and schemas without displaying secret values.
|
||||
- Never echo secrets into terminal output, chat responses, logs, diffs, generated documents, test fixtures, or screenshots.
|
||||
- Redact sensitive values when reporting errors or command output.
|
||||
- If a possible secret is discovered, do not repeat it. Report only its location, type, and recommended containment action.
|
||||
- Do not rotate, revoke, copy, or otherwise modify credentials unless that exact action is explicitly authorized.
|
||||
|
||||
## Validation
|
||||
|
||||
- Discover supported build, test, lint, type-check, and formatting commands from repository files and project instructions. Do not invent commands.
|
||||
- Include intended validation in the discussion-phase plan.
|
||||
- After approved changes, run the narrowest relevant validation first, then broader checks when appropriate.
|
||||
- Limit formatting to files within the approved scope.
|
||||
- Do not run tests that require a shared database, production service, paid external API, or sensitive data unless separately authorized.
|
||||
- Do not claim that a check passed unless it was executed successfully.
|
||||
- If a check cannot be run, state the exact reason.
|
||||
- Distinguish a current-change failure from a pre-existing failure or an undetermined failure.
|
||||
- Do not fix unrelated failures without expanding the approved scope.
|
||||
- Inspect the worktree after validation for unexpected generated files, formatting churn, encoding changes, or lockfile changes.
|
||||
|
||||
## Artifacts and Session Records
|
||||
|
||||
- Do not create full-session transcripts, automatic HTML copies, analysis reports, or extra documentation unless explicitly requested.
|
||||
- Store durable information in the repository's existing documentation structure.
|
||||
- Do not place generated reports or temporary analysis files in the repository root.
|
||||
- Remove task-specific temporary files created by the current task after validation when removal is safe.
|
||||
|
||||
## Completion Report
|
||||
|
||||
When implementation is complete, report in Korean:
|
||||
|
||||
- what changed and why;
|
||||
- the main affected files or components;
|
||||
- validation commands actually executed and their results;
|
||||
- checks not executed and the reason;
|
||||
- remaining risks, assumptions, or follow-up work;
|
||||
- database, deployment, dependency, encoding, and compatibility impact when applicable.
|
||||
|
||||
- Do not report completion while required validation is failing or known encoding corruption is unresolved.
|
||||
- Keep the report concise and do not include a full session transcript.
|
||||
|
||||
## Internal Service Project Rules
|
||||
|
||||
- Internal-only usage does not reduce security, privacy, compatibility, or validation requirements.
|
||||
- Preserve authentication, authorization, role boundaries, auditability, and personal-data protections.
|
||||
- Identify affected user workflows before changing visible behavior.
|
||||
- Treat Frontend and Backend repositories as separate deployable systems with an explicit API contract between them.
|
||||
- Coordinate request, response, authentication, error, and versioning changes across both sides when the approved scope includes both repositories.
|
||||
- Do not silently require a simultaneous Frontend and Backend deployment.
|
||||
- Prefer backward-compatible transitions when deployments may occur independently.
|
||||
- Include migration and rollback considerations for database, API, and configuration changes.
|
||||
- Do not modernize legacy code as an unrelated side effect.
|
||||
- Apply Classic ASP text-safety rules only when the project profile declares the `classic-asp` stack.
|
||||
- Do not access or modify production data merely because the service is internal.
|
||||
|
||||
## React
|
||||
|
||||
- Treat the current React version, component style, state management, routing, styling, and test approach as authoritative.
|
||||
- Do not perform unrelated class-to-hook, JavaScript-to-TypeScript, state-library, styling-system, or React-to-Next.js migrations.
|
||||
- Keep components focused and follow the repository's established split between presentation, state, data access, and side effects.
|
||||
- Keep effects dependency-correct and clean up subscriptions, timers, listeners, and in-flight work where applicable.
|
||||
- Use stable semantic keys and preserve accessibility, loading, empty, error, disabled, and success states.
|
||||
- Preserve public component props and shared UI contracts unless a coordinated breaking change is explicitly approved.
|
||||
- Treat any planned Next.js migration as a separate policy and task; the current React application remains authoritative until that migration slice is approved.
|
||||
|
||||
## Planned Migration
|
||||
|
||||
- Treat the current stack and production behavior as authoritative until an explicit migration task and slice are approved.
|
||||
- Do not begin a partial migration while handling an unrelated feature, fix, review, or refactor.
|
||||
- Before migration work, document the relevant baseline: routes, APIs, authentication, authorization, state, data contracts, environment variables, build, deployment, operations, and user-visible behavior.
|
||||
- Define small staged slices with acceptance criteria, compatibility requirements, validation, rollout, and rollback for each slice.
|
||||
- Keep migrated and non-migrated areas interoperable for as long as both remain active.
|
||||
- Apply target-stack conventions only inside the approved slice and shared boundaries that must change with it.
|
||||
- Establish behavior equivalence with representative checks before removing the previous implementation.
|
||||
- Separate intentional product or behavior changes from framework-only migration changes so each can be reviewed independently.
|
||||
- For standalone React applications, the default planned target is Next.js with TypeScript unless the project profile explicitly declares another approved target.
|
||||
|
||||
## KART Front Repository Rules
|
||||
|
||||
### Repository Role and Current Authority
|
||||
|
||||
- This repository is the current React 17 and JavaScript frontend for KART survey processing and reporting.
|
||||
- Treat the existing routing, state management, report screens, tables, charts, exports, and custom publishing CSS as authoritative until an approved migration slice replaces them.
|
||||
- Do not perform incidental JavaScript-to-TypeScript, custom-CSS-to-Tailwind, React-to-Next.js, router, or state-library migrations while handling an unrelated change.
|
||||
- The sibling `../Style_publish` directory is outside this Git repository. Treat it as external reference material and do not modify it unless a task explicitly adds it to scope.
|
||||
|
||||
### Legacy Auxiliary Server
|
||||
|
||||
- The tracked `server/` directory is a legacy auxiliary Express/MSSQL artifact and includes embedded connection configuration. Do not copy, disclose, extend, or rely on those values.
|
||||
- Treat removal or replacement of that server configuration as migration cleanup; keep it outside unrelated frontend maintenance.
|
||||
|
||||
### Frontend Migration Direction
|
||||
|
||||
- The approved destination is Next.js with TypeScript and shadcn/ui, migrated by bounded route or feature slices.
|
||||
- In an approved migration slice, use shared KRI frontend contracts and shadcn components before creating application-local equivalents.
|
||||
- Do not create new frontend TypeScript type or interface names ending in `Dto` or `DTO`.
|
||||
- Preserve report filters, table and chart semantics, loading and error states, export behavior, responsive behavior, and user-visible styling during migration.
|
||||
- Existing partial Tailwind or shadcn work does not authorize a broad migration or establish that the entire application has already moved to the target architecture.
|
||||
|
||||
### Harness and Verification
|
||||
|
||||
- `AGENTS.md` and `CLAUDE.md` are generated. Edit `.agent/profile.yml` or `.agent/project.md`, then recompose instead of editing generated files.
|
||||
- Use the repository's existing package manager and narrow frontend checks. Do not start the auxiliary server or connect to MSSQL during validation.
|
||||
10
package.json
10
package.json
@@ -3,17 +3,21 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-slot": "^1.2.4",
|
||||
"@testing-library/jest-dom": "5.16.1",
|
||||
"@testing-library/react": "12.1.2",
|
||||
"@testing-library/user-event": "13.5.0",
|
||||
"axios": "0.27.2",
|
||||
"chart.js": "3.9.1",
|
||||
"chartjs-plugin-zoom": "1.2.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"cors": "2.8.5",
|
||||
"echarts": "5.4.0",
|
||||
"echarts-for-react": "3.0.2",
|
||||
"express": "4.18.1",
|
||||
"immutability-helper": "3.1.1",
|
||||
"lucide-react": "^1.16.0",
|
||||
"mssql": "7.3.5",
|
||||
"react": "17.0.2",
|
||||
"react-beautiful-dnd": "13.1.0",
|
||||
@@ -36,6 +40,7 @@
|
||||
"semantic-ui-css": "2.5.0",
|
||||
"semantic-ui-react": "2.1.5",
|
||||
"slick-carousel": "1.8.1",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"web-vitals": "2.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -63,6 +68,9 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"ajv": "8.18.0"
|
||||
"ajv": "8.18.0",
|
||||
"autoprefixer": "^10.4.27",
|
||||
"postcss": "^8.5.8",
|
||||
"tailwindcss": "^3.4.19"
|
||||
}
|
||||
}
|
||||
|
||||
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
51
src/components/ui/button.js
Normal file
51
src/components/ui/button.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import React from "react";
|
||||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { cva } from "class-variance-authority";
|
||||
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"kart-ui inline-flex w-auto min-w-0 m-0 shrink-0 items-center justify-center gap-2 whitespace-nowrap border border-transparent text-center font-bold leading-none outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "rounded-pill bg-primary text-primary-foreground hover:bg-primary/90",
|
||||
secondary: "rounded-pill bg-secondary text-muted-foreground hover:bg-secondary/80",
|
||||
outline: "rounded-pill border-border bg-white text-primary hover:bg-muted",
|
||||
ghost: "bg-transparent text-foreground hover:bg-muted",
|
||||
square: "rounded bg-primary text-primary-foreground hover:bg-primary/90",
|
||||
soft: "rounded bg-muted text-muted-foreground hover:bg-border",
|
||||
destructive: "rounded bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
||||
icon: "rounded border-border bg-white text-muted-foreground hover:bg-muted",
|
||||
},
|
||||
size: {
|
||||
default: "h-7 px-4 text-sm",
|
||||
sm: "h-7 px-3 text-xs",
|
||||
md: "h-9 px-4 text-sm",
|
||||
lg: "h-[50px] px-5 text-base",
|
||||
icon: "h-9 w-9 p-0",
|
||||
legacy: "h-7 w-[113px] px-3 text-sm",
|
||||
wide: "h-[50px] w-[156px] px-5 text-base",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
size: "default",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
||||
const Comp = asChild ? Slot : "button";
|
||||
|
||||
return (
|
||||
<Comp
|
||||
className={cn(buttonVariants({ variant, size, className }))}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
Button.displayName = "Button";
|
||||
|
||||
export { Button, buttonVariants };
|
||||
1
src/components/ui/index.js
Normal file
1
src/components/ui/index.js
Normal file
@@ -0,0 +1 @@
|
||||
export { Button, buttonVariants } from "./button";
|
||||
6
src/lib/utils.js
Normal file
6
src/lib/utils.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { clsx } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
export function cn(...inputs) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
70
src/resources/css/global.css
Normal file
70
src/resources/css/global.css
Normal file
@@ -0,0 +1,70 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 96%;
|
||||
--foreground: 0 0% 10%;
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 0 0% 10%;
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 0 0% 10%;
|
||||
--primary: 162 72% 40%;
|
||||
--primary-foreground: 0 0% 100%;
|
||||
--secondary: 0 0% 96%;
|
||||
--secondary-foreground: 0 0% 40%;
|
||||
--muted: 0 0% 96%;
|
||||
--muted-foreground: 0 0% 62%;
|
||||
--accent: 80 60% 81%;
|
||||
--accent-foreground: 0 0% 10%;
|
||||
--destructive: 8 100% 63%;
|
||||
--destructive-foreground: 0 0% 100%;
|
||||
--border: 0 0% 88%;
|
||||
--input: 0 0% 88%;
|
||||
--ring: 162 72% 40%;
|
||||
--radius: 4px;
|
||||
--radius-card: 15px;
|
||||
--radius-pill: 52px;
|
||||
--header-height: 64px;
|
||||
--titlebar-height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.kart-ui,
|
||||
.kart-ui * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
button.kart-ui {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
a.kart-ui {
|
||||
display: inline-flex;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
input.kart-ui,
|
||||
select.kart-ui,
|
||||
textarea.kart-ui {
|
||||
width: auto;
|
||||
height: auto;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ button {
|
||||
background: #fff url(../images/ic_bookmark_14.png) no-repeat left 16px center/11px 14px;
|
||||
padding-left: 21px;
|
||||
}
|
||||
.rt03 .statistic_wrap .round_btn {
|
||||
.page-tabulation .statistic_wrap .round_btn {
|
||||
color: #17BBB0;
|
||||
background: #fff url(../images/ic_plus.png) no-repeat left 20px center/12px;
|
||||
height: 28px;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
@charset "utf-8";
|
||||
@import url(reset.css);
|
||||
@import url("https://cdn.jsdelivr.net/npm/semantic-ui/dist/semantic.min.css");
|
||||
@import url("~semantic-ui-css/semantic.min.css");
|
||||
@import url(custom.css);
|
||||
@import url(media.css);
|
||||
@import url(global.css);
|
||||
|
||||
@@ -81,7 +81,7 @@ const Main = (props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<section id="main" className="main">
|
||||
<section id="main" className="page-overview">
|
||||
{specialEffect}
|
||||
<div className="wrap">
|
||||
<div className="chart_wrap">
|
||||
|
||||
@@ -371,7 +371,7 @@ const Derived = (props) => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{saveMutation.isLoading?<QueryLoading/>:null}
|
||||
<section id="main" className="rt02 rt05" style={isMobile?{display:'flex',justifyContent:'center',alignItems:'center',height:'80vh'}:{}}>
|
||||
<section id="main" className="page-report page-derived" style={isMobile?{display:'flex',justifyContent:'center',alignItems:'center',height:'80vh'}:{}}>
|
||||
{isMobile?
|
||||
<Icon src="icon_pc"/>
|
||||
:
|
||||
|
||||
@@ -142,7 +142,7 @@ const Exim = () => {
|
||||
return (
|
||||
<>
|
||||
{dataMutation.isLoading || guideMutation.isLoading || dataFormMutation.isLoading || questionFormMutation.isLoading || titleMutation.isLoading || importLoading?<QueryLoading/>:null}
|
||||
<section id="main" className="rt02 rt06" style={isMobile?{display:'flex',justifyContent:'center',alignItems:'center',height:'80vh'}:{}}>
|
||||
<section id="main" className="page-report page-exim" style={isMobile?{display:'flex',justifyContent:'center',alignItems:'center',height:'80vh'}:{}}>
|
||||
{isMobile?
|
||||
<Icon src="icon_pc"/>
|
||||
:
|
||||
|
||||
@@ -317,7 +317,7 @@ const Crosstab = () => {
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<section id="main" className="rt02 rt04 dropped drop_table mob dropped_word">
|
||||
<section id="main" className="page-report page-crosstab page-tabbed-report dropped drop_table mob dropped_word">
|
||||
<div className="tab_container">
|
||||
<BookmarkList page={'crosstab'} isMobile={isMobile} setSelectedBookMark={setSelectedBookMark} isViewBookMark={isViewBookMark} selectedBookMark={selectedBookMark}/>
|
||||
{isMobile===false?
|
||||
|
||||
@@ -231,7 +231,7 @@ const Current = () => {
|
||||
return (
|
||||
<>
|
||||
{dayFetching || typeFetching || loiFetching || screenFetching?<QueryLoading/>:null}
|
||||
<section id="main" className="rt01" onMouseUp={(e)=>{setDataDate()}} >
|
||||
<section id="main" className="page-current" onMouseUp={(e)=>{setDataDate()}} >
|
||||
<div className="wrap">
|
||||
<div className="chart_wrap">
|
||||
<div className="chart_flex_box">
|
||||
|
||||
@@ -177,7 +177,7 @@ const Quota = () => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{setExportMutation.isLoading || exportMutation.isLoading?<QueryLoading/>:null}
|
||||
<section id="main" className="rt02">
|
||||
<section id="main" className="page-report page-quota">
|
||||
<div className="wrap">
|
||||
<div className="data_wrap">
|
||||
<LeftToggleBox leftToggle={leftToggle} setLeftToggle={setLeftToggle}/>
|
||||
|
||||
@@ -343,7 +343,7 @@ const Tabulation = () => {
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<section id="main" className="rt02 rt03 rt04 dropped drop_table dropped_word" style={isMobile?{display:'flex',justifyContent:'center',alignItems:'center',height:'80vh'}:{}}>
|
||||
<section id="main" className="page-report page-tabulation page-tabbed-report dropped drop_table dropped_word" style={isMobile?{display:'flex',justifyContent:'center',alignItems:'center',height:'80vh'}:{}}>
|
||||
{
|
||||
isMobile?
|
||||
<Icon src="icon_pc"/>
|
||||
|
||||
59
tailwind.config.js
Normal file
59
tailwind.config.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
darkMode: ["class"],
|
||||
content: ["./public/index.html", "./src/**/*.{js,jsx,ts,tsx}"],
|
||||
corePlugins: {
|
||||
preflight: false,
|
||||
container: false,
|
||||
},
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
ring: "hsl(var(--ring))",
|
||||
background: "hsl(var(--background))",
|
||||
foreground: "hsl(var(--foreground))",
|
||||
primary: {
|
||||
DEFAULT: "hsl(var(--primary))",
|
||||
foreground: "hsl(var(--primary-foreground))",
|
||||
},
|
||||
secondary: {
|
||||
DEFAULT: "hsl(var(--secondary))",
|
||||
foreground: "hsl(var(--secondary-foreground))",
|
||||
},
|
||||
destructive: {
|
||||
DEFAULT: "hsl(var(--destructive))",
|
||||
foreground: "hsl(var(--destructive-foreground))",
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: "hsl(var(--muted))",
|
||||
foreground: "hsl(var(--muted-foreground))",
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: "hsl(var(--accent))",
|
||||
foreground: "hsl(var(--accent-foreground))",
|
||||
},
|
||||
popover: {
|
||||
DEFAULT: "hsl(var(--popover))",
|
||||
foreground: "hsl(var(--popover-foreground))",
|
||||
},
|
||||
card: {
|
||||
DEFAULT: "hsl(var(--card))",
|
||||
foreground: "hsl(var(--card-foreground))",
|
||||
},
|
||||
},
|
||||
borderRadius: {
|
||||
lg: "var(--radius)",
|
||||
md: "calc(var(--radius) - 2px)",
|
||||
sm: "calc(var(--radius) - 4px)",
|
||||
pill: "var(--radius-pill)",
|
||||
card: "var(--radius-card)",
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ["Noto Sans", "Montserrat", "sans-serif"],
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
Reference in New Issue
Block a user