Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions apps/app-frontend-server/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import tsconfigPathsPlugin from 'vite-tsconfig-paths';

import type { StorybookConfig } from '@storybook/experimental-nextjs-vite';
import type { StorybookConfig } from '@storybook/nextjs-vite';

const config: StorybookConfig = {
stories: ['../src/**/stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
{
name: '@storybook/addon-essentials',
options: { docs: false },
},
'@storybook/addon-actions',
'storycap',
'storycapture',
],
typescript: {
reactDocgen: 'react-docgen',
},
framework: '@storybook/experimental-nextjs-vite',
framework: '@storybook/nextjs-vite',
staticDirs: ['./public'],
viteFinal: config => ({
...config,
Expand Down
4 changes: 2 additions & 2 deletions apps/app-frontend-server/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { connectDatabase } from '@trastocker/drizzle-helper/sql-js';
import ms from 'ms';
import { initialize, mswLoader } from 'msw-storybook-addon';
import { ToastContainer } from 'react-toastify';
import { withScreenshot } from 'storycap';
import { withScreenshot } from 'storycapture';
import { Provider } from 'urql';

import type { Preview } from '@storybook/react';
import type { Preview } from '@storybook/react-vite';

import useUrql from '@hooks/useUrql';
import { setupHandlers } from '@mocks/index';
Expand Down
14 changes: 5 additions & 9 deletions apps/app-frontend-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"pages:build": "pnpm next-on-pages",
"preview": "pnpm pages:build && wrangler pages dev",
"storybook:build": "storybook build --test",
"storybook:screenshot": "storycap http://localhost:6007 --serverCmd 'http-server storybook-static --port 6007'",
"storybook:screenshot": "storycapture http://localhost:6007 --serverCmd 'http-server storybook-static --port 6007'",
"test": "vitest run",
"test:watch": "vitest run --watch",
"generate:mock-database": "tsx scripts/generate-mock-database.ts"
Expand Down Expand Up @@ -58,12 +58,8 @@
"@huuyafwww/eslint-config-storybook": "^1.2.0",
"@huuyafwww/tsconfig-common": "^1.1.2",
"@huuyafwww/tsconfig-next": "^1.2.1",
"@storybook/addon-actions": "^8.6.12",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/blocks": "^8.6.12",
"@storybook/experimental-nextjs-vite": "^8.6.12",
"@storybook/react": "^8.6.12",
"@storybook/test": "^8.6.12",
"@storybook/nextjs-vite": "^9.0.12",
"@storybook/react-vite": "^9.0.12",
"@tailwindcss/postcss": "^4.1.10",
"@tailwindcss/vite": "^4.1.6",
"@testing-library/react": "^16.3.0",
Expand Down Expand Up @@ -92,8 +88,8 @@
"reg-publish-s3-plugin": "^0.14.4",
"reg-suit": "^0.14.4",
"sql.js": "1.12.0",
"storybook": "^8.6.12",
"storycap": "^5.0.1",
"storybook": "^9.0.12",
"storycapture": "^9.0.0",
"tailwindcss": "^4.1.10",
"tsx": "^4.19.3",
"typescript": "^5.8.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import { useForm, FormProvider } from 'react-hook-form';
import { action } from 'storybook/actions';

import type { FieldValues } from 'react-hook-form';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UserLoginForm from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Domain/UserLoginForm',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UserRegisterForm from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Domain/UserRegisterForm',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UserVerifyErrorMessage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Domain/UserVerifyErrorMessage',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UserVerifySuccessMessage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Domain/UserVerifySuccessMessage',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import WorkspaceCreateForm from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Domain/WorkspaceCreateForm',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import WorkspaceJoinForm from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Domain/WorkspaceJoinForm',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UserLoginPage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

import AuthLayout from '@layouts/AuthLayout';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UserRegisterPage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

import AuthLayout from '@layouts/AuthLayout';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { and, isNull, isNotNull } from 'drizzle-orm';

import UserVerifyPage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

import AuthLayout from '@layouts/AuthLayout';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import WorkspaceCreatePage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

import AuthLayout from '@layouts/AuthLayout';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import InputControl from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

import ReactHookFormDecorator from '@components/decorators/ReactHookFormDecorator';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Trans from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Shared/Trans',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AuthLayout from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Layouts/AuthLayout',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import HomeLayout from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Layouts/HomeLayout',
Expand Down
7 changes: 1 addition & 6 deletions libraries/ui-elements/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
{
name: '@storybook/addon-essentials',
options: { docs: false },
},
],
addons: [],
typescript: {
reactDocgen: 'react-docgen-typescript',
},
Expand Down
4 changes: 2 additions & 2 deletions libraries/ui-elements/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '@styles/tailwind.css';
import '@styles/globals.css';
import { withScreenshot } from 'storycap';
import { withScreenshot } from 'storycapture';

import type { Preview } from '@storybook/react';
import type { Preview } from '@storybook/react-vite';

const options: {
serviceWorker?: {
Expand Down
15 changes: 5 additions & 10 deletions libraries/ui-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"lint:code": "eslint . --cache",
"lint:type": "tsc --pretty --noEmit",
"storybook:build": "storybook build --test",
"storybook:screenshot": "storycap http://localhost:6007 --serverCmd 'http-server storybook-static --port 6007'"
"storybook:screenshot": "storycapture http://localhost:6007 --serverCmd 'http-server storybook-static --port 6007'"
},
"dependencies": {
"@tailwindcss/cli": "^4.1.10",
Expand All @@ -49,26 +49,21 @@
"@huuyafwww/eslint-config-storybook": "^1.2.0",
"@huuyafwww/tsconfig-common": "^1.1.2",
"@huuyafwww/tsconfig-react": "^1.0.0",
"@storybook/addon-actions": "^8.6.12",
"@storybook/addon-essentials": "^8.6.12",
"@storybook/blocks": "^8.6.12",
"@storybook/react": "^8.6.12",
"@storybook/react-vite": "^8.6.12",
"@storybook/test": "^8.6.12",
"@storybook/react-vite": "^9.0.12",
"@tailwindcss/postcss": "^4.1.10",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vanilla-extract/esbuild-plugin": "^2.3.15",
"@vanilla-extract/vite-plugin": "^5.0.1",
"http-server": "^14.1.1",
"npm-run-all2": "^7.0.2",
"postcss": "^8.5.6",
"@tailwindcss/postcss": "^4.1.10",
"reg-keygen-git-hash-plugin": "^0.14.3",
"reg-notify-github-plugin": "^0.14.4",
"reg-publish-s3-plugin": "^0.14.4",
"reg-suit": "^0.14.4",
"storybook": "^8.6.12",
"storycap": "^5.0.1",
"storybook": "^9.0.12",
"storycapture": "^9.0.0",
"tsup": "^8.4.0",
"typescript": "^5.8.3",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/Box/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defaultVariant } from './styles.css';

import Box from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Box',
Expand Down
6 changes: 3 additions & 3 deletions libraries/ui-elements/src/components/Button/stories.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { fn } from '@storybook/test';
import { action } from 'storybook/actions';

import { defaultVariant } from './styles.css';

import Button from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Button',
component: Button,
args: {
as: 'button',
children: 'Button',
onPress: fn(),
onPress: action('onPress'),
variant: defaultVariant,
},
argTypes: {},
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/Divider/stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Divider from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Divider',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ErrorMessage from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'ErrorMessage',
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/IconBars/stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconBars from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/Bars',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconCheckCircle from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/CheckCircle',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconEllipsisHorizontal from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/EllipsisHorizontal',
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/IconEmail/stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconEmail from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/Email',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconExclamationCircle from './';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/ExclamationCircle',
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/IconEye/stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconEye from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/Eye',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconEyeOff from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/EyeOff',
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/IconKey/stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconKey from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/Key',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconTriangleAlert from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Icon/TriangleAlert',
Expand Down
2 changes: 1 addition & 1 deletion libraries/ui-elements/src/components/Input/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defaultVariant } from './styles.css';

import Input from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'Input',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import LogoTrastocker from '.';

import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

const meta = {
title: 'LogoTrastocker',
Expand Down
Loading