Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
feat(button & spinner): create button & spinner components
Browse files Browse the repository at this point in the history
  • Loading branch information
pepelele committed Jun 13, 2021
0 parents commit 8c35e05
Show file tree
Hide file tree
Showing 190 changed files with 17,656 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# local changelog cache (lerna-changelog)
.changelog/

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
16 changes: 16 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
stories: ["../packages/**/stories/*.stories.tsx"],
addons: [
{
name: "@storybook/addon-postcss",
options: {
postcssLoaderOptions: {
implementation: require("postcss"),
},
},
},
],
typescript: {
reactDocgen: false,
},
};
5 changes: 5 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import "./styles.css";

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
};
3 changes: 3 additions & 0 deletions .storybook/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
31 changes: 31 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const BABEL_ENV = process.env.BABEL_ENV;
const isCommonJS = BABEL_ENV !== undefined && BABEL_ENV === "cjs";
const isESM = BABEL_ENV !== undefined && BABEL_ENV === "esm";

module.exports = function(api) {
api.cache(true);

const presets = [
[
"@babel/env",
{
loose: true,
modules: isCommonJS ? "commonjs" : false,
targets: {
esmodules: isESM ? true : undefined,
},
},
],
"@babel/preset-typescript",
"@babel/preset-react",
];

const plugins = [
["@babel/plugin-proposal-class-properties", { loose: true }],
];

return {
presets,
plugins,
};
};
1 change: 1 addition & 0 deletions docs
Submodule docs added at 5af706
16 changes: 16 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packages": ["packages/*", "docs"],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true,
"registry": "https://registry.npmjs.org/",
"command": {
"version": { "exact": true },
"publish": {
"conventionalCommits": true,
"message": "chore(release): publish",
"ignoreChanges": ["**/stories/**", "**/tests/**"],
"allowBranch": "master"
}
}
}
60 changes: 60 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "vechaiui",
"private": true,
"version": "1.0.0",
"workspaces": {
"packages": [
"packages/*",
"docs"
]
},
"description": "",
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"clean": "run-p clean:*",
"clean:build": "lerna run clean:build --parallel",
"clean:node_modules": "lerna run clean:node_modules --parallel && rimraf node_modules",
"prestart": "yarn && yarn bootstrap",
"boot": "yarn prestart && yarn build",
"start": "yarn build && yarn storybook",
"start:all": "yarn build && concurrently \"yarn docs dev\" \"yarn storybook\" ",
"build": "lerna run build --no-private --stream",
"bootstrap": "lerna bootstrap --use-workspaces",
"test": "echo \"Error: no test specified\" && exit 1",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"release": "changeset publish",
"docs": "yarn workspace @vechai-ui/docs",
"docs:dev": "yarn docs dev",
"docs:start": "yarn docs start"
},
"resolutions": {
"**/react": "17.0.1",
"**/react-dom": "17.0.1"
},
"author": "pepelele",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.5",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/preset-env": "^7.14.5",
"@babel/preset-react": "^7.14.5",
"@babel/preset-typescript": "^7.14.5",
"@babel/runtime": "^7.14.5",
"@changesets/cli": "^2.16.0",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/react": "^6.2.9",
"@tailwindcss/forms": "^0.3.3",
"autoprefixer": "^10.2.6",
"cross-env": "^7.0.3",
"lerna": "^4.0.0",
"postcss": "^8.3.2",
"rimraf": "^3.0.2",
"tailwindcss": "^2.1.4",
"typescript": "^4.3.2"
}
}
11 changes: 11 additions & 0 deletions packages/button/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `button`

> TODO: description
## Usage

```
const button = require('button');
// TODO: DEMONSTRATE API
```
69 changes: 69 additions & 0 deletions packages/button/dist/cjs/button.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/button/dist/cjs/button.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions packages/button/dist/cjs/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/button/dist/cjs/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions packages/button/dist/cjs/styles.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/button/dist/cjs/styles.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions packages/button/dist/esm/button.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8c35e05

Please sign in to comment.