From 7319a4b2872fa3d2e145780ff3845e522d291811 Mon Sep 17 00:00:00 2001 From: s7tya <53410646+s7tya@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:29:44 +0900 Subject: [PATCH 01/14] update --- .vscode/settings.json | 7 +- panda.config.ts | 3 + src/app/committee/forms/new/page.tsx | 149 +++++++++++++++++++++++++++ src/lib/textUtils.ts | 35 +++++++ 4 files changed, 191 insertions(+), 3 deletions(-) create mode 100644 src/app/committee/forms/new/page.tsx create mode 100644 src/lib/textUtils.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 31f2c9f3..234fb89f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,8 @@ { "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.tabSize": 2, - "files.insertFinalNewline": true + "files.insertFinalNewline": true, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } diff --git a/panda.config.ts b/panda.config.ts index ed752dde..7eb747a0 100644 --- a/panda.config.ts +++ b/panda.config.ts @@ -22,6 +22,9 @@ export default defineConfig({ orange: { value: "#ed6d1f" }, purple: { value: "#60C" }, }, + tsukuba: { + purple: { value: "#60C" }, + } }, }, }, diff --git a/src/app/committee/forms/new/page.tsx b/src/app/committee/forms/new/page.tsx new file mode 100644 index 00000000..ac838b4b --- /dev/null +++ b/src/app/committee/forms/new/page.tsx @@ -0,0 +1,149 @@ +"use client"; + +import { getProjectAttributeText, getProjectCategoryText } from "@/lib/textUtils"; +import { projectAttributes, projectCategories } from "@/lib/valibot"; +import { css } from "@styled-system/css"; +import { stack, visuallyHidden } from "@styled-system/patterns"; +import { NextPage } from "next"; +import { FC } from "react"; +import { useForm } from "react-hook-form"; + +const sectionTitleStyle = css({ + fontSize: "xl", + fontWeight: "bold", +}); + +const descriptionStyle = css({ + fontSize: "sm", + color: "gray.600", +}); + +const checkboxStyle = css({ + py: 1, + px: 4, + rounded: "full", + background: "gray.200", + color: "gray.500", + fontSize: "sm", + fontWeight: "bold", + "&:has(:checked)": { + background: "tsukuba.purple", + color: "white", + }, +}); + +const checkboxGrpupStyle = css({ + display: "flex", + flexWrap: "wrap", + gap: 1, +}); + +const textInputStyle = css({ + border: "1px solid token(colors.gray.400)", + background: "gray.100", + rounded: "sm", + width: "full", + padding: 2, +}); + +const Divider: FC = () => { + return
; +}; + +const CreateFormPage: NextPage = () => { + const { register } = useForm(); + + return ( +
+

+ 新規申請作成 +

+ +
+
+ 送信先絞り込み +

選択しない場合全ての企画が対象になります

+
+ +
+ {projectCategories.map((category) => ( + + ))} +
+
+ +
+ +
+ {projectAttributes.map((attribute) => ( + + ))} +
+
+
+ + + +
+
+ + +
+
+ +