Skip to content

Commit 23015c3

Browse files
committed
feat(checkin): wire @tecnova/ui shadcn primitives into checkin
Mirrors the admin wiring: shared globals.css, components.json, tsconfig path mapping, and Noto Sans font swap. Replaces the manual-form submit button with shadcn Button to verify wiring. PWA viewport and appleWebApp metadata are preserved.
1 parent 75564d6 commit 23015c3

9 files changed

Lines changed: 45 additions & 48 deletions

File tree

apps/checkin/components.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "radix-luma",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "../../packages/ui/src/styles/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true
11+
},
12+
"iconLibrary": "tabler",
13+
"aliases": {
14+
"components": "@/components",
15+
"hooks": "@/hooks",
16+
"lib": "@/lib",
17+
"utils": "@tecnova/ui/lib/utils",
18+
"ui": "@tecnova/ui/components"
19+
},
20+
"rtl": false,
21+
"menuColor": "default-translucent",
22+
"menuAccent": "subtle"
23+
}

apps/checkin/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
44
// モノレポ内 workspace パッケージを Next の transpile 対象にする
5-
transpilePackages: ['@tecnova/shared'],
5+
transpilePackages: ['@tecnova/shared', '@tecnova/ui'],
66
};
77

88
export default nextConfig;

apps/checkin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@tecnova/shared": "workspace:*",
13+
"@tecnova/ui": "workspace:*",
1314
"@zxing/browser": "^0.2.0",
1415
"next": "16.2.4",
1516
"react": "19.2.4",

apps/checkin/postcss.config.mjs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
const config = {
2-
plugins: {
3-
'@tailwindcss/postcss': {},
4-
},
5-
};
6-
7-
export default config;
1+
export { default } from '@tecnova/ui/postcss.config';

apps/checkin/src/app/globals.css

Lines changed: 0 additions & 26 deletions
This file was deleted.

apps/checkin/src/app/layout.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import type { Metadata, Viewport } from 'next';
2-
import { Geist, Geist_Mono } from 'next/font/google';
3-
import './globals.css';
2+
import { Geist_Mono, Noto_Sans } from 'next/font/google';
3+
import '@tecnova/ui/globals.css';
4+
import { cn } from '@tecnova/ui/lib/utils';
45

5-
const geistSans = Geist({
6-
variable: '--font-geist-sans',
6+
const fontSans = Noto_Sans({
7+
variable: '--font-sans',
78
subsets: ['latin'],
89
});
910

10-
const geistMono = Geist_Mono({
11-
variable: '--font-geist-mono',
11+
const fontMono = Geist_Mono({
12+
variable: '--font-mono',
1213
subsets: ['latin'],
1314
});
1415

@@ -39,7 +40,10 @@ export default function RootLayout({
3940
children: React.ReactNode;
4041
}>) {
4142
return (
42-
<html lang="ja" className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}>
43+
<html
44+
lang="ja"
45+
className={cn('h-full antialiased font-sans', fontSans.variable, fontMono.variable)}
46+
>
4347
<body className="min-h-full flex flex-col">{children}</body>
4448
</html>
4549
);

apps/checkin/src/app/page.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import type { ScanResponse } from '@tecnova/shared/schemas';
4+
import { Button } from '@tecnova/ui/components/button';
45
import { BrowserMultiFormatReader, type IScannerControls } from '@zxing/browser';
56
import Link from 'next/link';
67
import { type FormEvent, useEffect, useRef, useState } from 'react';
@@ -210,13 +211,9 @@ export default function Home() {
210211
onChange={(e) => setInput(e.target.value)}
211212
className="rounded-lg border border-zinc-300 px-4 py-4 text-center text-3xl tracking-widest"
212213
/>
213-
<button
214-
type="submit"
215-
disabled={input.length !== 5}
216-
className="rounded-lg bg-blue-600 px-8 py-4 text-xl font-semibold text-white disabled:bg-zinc-300"
217-
>
214+
<Button type="submit" size="lg" disabled={input.length !== 5}>
218215
チェックイン / アウト
219-
</button>
216+
</Button>
220217
</form>
221218
<button
222219
type="button"

apps/checkin/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
}
2020
],
2121
"paths": {
22-
"@/*": ["./src/*"]
22+
"@/*": ["./src/*"],
23+
"@tecnova/ui/*": ["../../packages/ui/src/*"]
2324
}
2425
},
2526
"include": [

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)