Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thien-do committed Jul 6, 2024
1 parent 66af09b commit 4999de9
Show file tree
Hide file tree
Showing 295 changed files with 8,336 additions and 14,745 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended'],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
37 changes: 0 additions & 37 deletions .eslintrc.json

This file was deleted.

28 changes: 25 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
/node_modules
.DS_Store
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vercel
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*storybook.log
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

21 changes: 21 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
addons: [
"@storybook/addon-docs",
"storybook-dark-mode"
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
docsMode: true,
}
};

export default config;
4 changes: 4 additions & 0 deletions .storybook/preview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.sbdocs:not(#x) p {
font-size: 16px;
line-height: 28px;
}
21 changes: 21 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { DocsContainer } from "@storybook/blocks";
import { Preview } from '@storybook/react';
import { useDarkMode } from "storybook-dark-mode";
import "./preview.css";
import { themes } from './theme';

const Container: typeof DocsContainer = (props) => {
const dark = useDarkMode();
const theme = dark ? themes.dark : themes.light
return <DocsContainer {...props} theme={theme} />;
};

const preview: Preview = {
parameters: {
docs: {
container: Container,
},
},
};

export default preview;
48 changes: 48 additions & 0 deletions .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { create } from "@storybook/theming";

const common = {
// Highlight color
colorPrimary: "hsl(199, 89%, 48%)", // highlight-5
colorSecondary: "hsl(199, 89%, 48%)", // highlight-5
// Typography
fontBase: '"Inter var", sans-serif',
// Branding
brandTitle: "Moai UI kit",
brandUrl: "https://moai.thien.do",
};

const light = create({
...common,
base: "light",
// UI
appBg: "hsl(235, 18%, 98%)", // gray-0
appContentBg: "hsl(0, 0%, 100%)", // white
appBorderColor: "hsl(216, 12%, 77%)", // gray-2
appBorderRadius: 2,
// Text colors
textColor: "hsl(216, 13%, 15%)", // gray-8
textMutedColor: "hsl(220, 09%, 46%)", // gray-4
// Toolbar default and active colors
barTextColor: "hsl(216, 13%, 15%)", // gray-8
barSelectedColor: "hsl(216, 13%, 15%)", // gray-8
barBg: "hsl(0, 0%, 100%)", // white
});

const dark = create({
...common,
base: "dark",
// UI
appBg: "hsl(216, 13%, 15%)", // gray-8
appContentBg: "hsl(220, 13%, 18%)", // gray-7
appBorderColor: "hsl(220, 09%, 46%)", // gray-4
appBorderRadius: 2,
// Text colors
textColor: "hsl(235, 18%, 98%)", // gray-0
textMutedColor: "hsl(218, 11%, 65%)", // gray-3
// Toolbar default and active colors
barTextColor: "hsl(235, 18%, 98%)", // gray-0
barSelectedColor: "hsl(235, 18%, 98%)", // gray-0
barBg: "hsl(220, 13%, 18%)", // gray-7
});

export const themes = { light, dark };
Binary file removed .yarn/install-state.gz
Binary file not shown.
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions core/.gitignore

This file was deleted.

56 changes: 0 additions & 56 deletions core/package.json

This file was deleted.

71 changes: 0 additions & 71 deletions core/rollup.config.mjs

This file was deleted.

10 changes: 0 additions & 10 deletions core/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions gallery/.gitignore

This file was deleted.

Loading

0 comments on commit 4999de9

Please sign in to comment.