Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace storybook framework to vite
Browse files Browse the repository at this point in the history
JunichiSugiura committed Dec 15, 2024
1 parent 64e39f8 commit 507b442
Showing 12 changed files with 32 additions and 2,477 deletions.
3 changes: 0 additions & 3 deletions packages/keychain/tsconfig.json
Original file line number Diff line number Diff line change
@@ -10,8 +10,5 @@
},
"include": [
"src",
// "global.d.ts",
"../ui/src/components/icons/StarknetGray.tsx"
],
"exclude": ["node_modules"]
}
2 changes: 0 additions & 2 deletions packages/ui-next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@cartridge/tsconfig/react.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "./src",
"outDir": "./dist",
"paths": {
"@/*": ["./src/*"]
2 changes: 1 addition & 1 deletion packages/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ const config: StorybookConfig = {
getAbsolutePath("storybook-dark-mode"),
],
framework: {
name: getAbsolutePath("@storybook/nextjs"),
name: getAbsolutePath("@storybook/react-vite"),
options: {},
},
docs: {
7 changes: 6 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,12 @@
"storybook": "storybook dev -p 6002",
"storybook:build": "storybook build"
},
"exports": {
".": {
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
@@ -26,7 +32,6 @@
"@cartridge/tsconfig": "workspace:*",
"@emotion/babel-plugin": "^11.11.0",
"@storybook/addon-essentials": "^7.1.1",
"@storybook/nextjs": "^7.4.2",
"@storybook/react": "^7.1.1",
"@storybook/react-vite": "^7.1.1",
"@storybook/testing-library": "^0.2.0",
7 changes: 1 addition & 6 deletions packages/ui/src/stories/Accordion.stories.tsx
Original file line number Diff line number Diff line change
@@ -9,12 +9,7 @@ import {
Box,
AccordionPanel,
} from "@chakra-ui/react";
import {
AlertIcon,
InfoIcon,
WarningIcon,
WedgeDownIcon,
} from "src/components";
import { AlertIcon, InfoIcon, WarningIcon, WedgeDownIcon } from "@/components";
import { motion } from "framer-motion";

const meta: Meta<typeof Accordion> = {
2 changes: 1 addition & 1 deletion packages/ui/src/stories/Icon.stories.tsx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import {
stateIcons,
utilityIcons,
} from "../components/icons";
import { StateIconProps } from "src/components/icons/state/types";
import { StateIconProps } from "@/components/icons/state/types";

const iconList = {
brand: brandIcons,
6 changes: 1 addition & 5 deletions packages/ui/src/stories/Menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -7,11 +7,7 @@ import {
Text,
} from "@chakra-ui/react";
import { Meta, StoryObj } from "@storybook/react";
import {
DopeWarsIcon,
MirrorWedgeIcon,
SpaceInvaderIcon,
} from "src/components";
import { DopeWarsIcon, MirrorWedgeIcon, SpaceInvaderIcon } from "@/components";

const meta: Meta<typeof Menu> = {
title: "Menu",
2 changes: 1 addition & 1 deletion packages/ui/src/stories/Table.stories.tsx
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import {
Td,
} from "@chakra-ui/react";
import { Meta, StoryObj } from "@storybook/react";
import { CopyText } from "src/components";
import { CopyText } from "@/components";

const meta: Meta<typeof Table> = {
title: "Table",
2 changes: 1 addition & 1 deletion packages/ui/src/stories/Tabs.stories.tsx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import {
} from "@chakra-ui/react";
import { Meta, StoryObj } from "@storybook/react";
import { useCallback, useState } from "react";
import { BoltIcon, DetailsIcon, StackShapeIcon } from "src/components";
import { BoltIcon, DetailsIcon, StackShapeIcon } from "@/components";

const meta: Meta<typeof Tabs> = {
title: "Tabs",
15 changes: 5 additions & 10 deletions packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -5,15 +5,10 @@
"baseUrl": ".",
"rootDir": "./src",
"outDir": "./dist",
"types": ["@emotion/react/types/css-prop"]
"types": ["@emotion/react/types/css-prop"],
"paths": {
"@/*": ["./src/*"]
}
},
"paths": {
"@cartridge/ui/components": ["./src/components"]
},
"include": [
"./src/**/*"
],
"exclude": [
"node_modules"
]
"include": ["src"],
}
5 changes: 5 additions & 0 deletions packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -27,6 +27,11 @@ export default defineConfig({
}),
dts(),
],
resolve: {
alias: {
"@": "/src",
},
},
});

function makeExternalPredicate(externalArr: string[]) {
2,456 changes: 10 additions & 2,446 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 507b442

Please sign in to comment.