Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitpanjwani committed Aug 29, 2020
0 parents commit 9d33bc7
Show file tree
Hide file tree
Showing 89 changed files with 6,312 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
parserOptions: {
parser: "babel-eslint"
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
}
};
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"tabWidth": 2
}
33 changes: 33 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
MIT License
Copyright (c) 2020 Bytefury
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.MIT License
Copyright (c) 2020 Bytefury
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Introduction

Spacewind is a Vue Component Library for TailwindCSS.

It is inspired by [TailwindUI](https://tailwindui.com/) & [VueTailwind](https://www.vue-tailwind.com/)

# Table of Contents

1. [Documentation](#documentation)
2. [Credits](#credits)
3. [License](#license)

## Documentation


## Credits
Crater is a product of [Bytefury](https://bytefury.com)

## License
Crater is released under the Attribution Assurance License.
See [LICENSE](LICENSE) for details.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
50 changes: 50 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "@bytefury/spacewind",
"version": "0.1.0",
"private": false,
"main": "./dist/spacewind.umd.js",
"unpkg": "./dist/spacewind.umd.min.js",
"description": "UI Component Library for Vue & TailwindCSS",
"author": {
"name": "Bytefury",
"email": "info@bytefury.com"
},
"repository": "https://github.com/bytefury/spacewind",
"bugs": "https://github.com/bytefury/spacewind/issues",
"keywords": [
"tailwindcss",
"tailwindadmin",
"vuetailwindui",
"uitheme"
],
"license": "MIT",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"build-bundle": "vue-cli-service build --target lib --name spacewind ./src/index.js"
},
"dependencies": {
"core-js": "^3.6.5",
"lodash": "^4.17.19",
"moment": "^2.27.0",
"tailwindcss": "^1.5.1",
"v-click-outside": "^3.0.1",
"v-money": "^0.8.1",
"vue": "^2.6.11"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^1.19.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
}
}
21 changes: 21 additions & 0 deletions plugin/colors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
// Brand
primary: {
50: '#F7F6FD',
100: '#EEEEFB',
200: '#D5D4F5',
300: '#BCB9EF',
400: '#8A85E4',
500: '#5851D8',
600: '#4F49C2',
700: '#353182',
800: '#282461',
900: '#1A1841'
},

// Status
danger: '#FB7178',
success: '#00C99C',
warning: '#F3AF4E',
info: '#15B2EC'
}
37 changes: 37 additions & 0 deletions plugin/components/switch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const SwitchComponent = theme => {
return {
'.switch[type = "checkbox"]': {
height: 0,
width: 0,
visibility: 'hidden'
},
'.switch-label': {
textIndent: '-9999px',
width: '35px',
borderRadius: '16px',
'.switch-circle': {
position: 'absolute',
top: '-3px',
left: '0px',
width: '20px',
height: '20px',
background: theme('colors.gray.500'),
borderRadius: '15px',
transition: '0.3s'
}
},
'.switch-label:active .switch-circle': {
width: '20px'
},
'.switch:checked + .switch-label': {
background: theme('colors.primary.300')
},
'.switch:checked + .switch-label .switch-circle': {
left: 'calc(100% - 0px)',
transform: 'translateX(-100%)',
background: theme('colors.primary.500')
}
}
}

module.exports = SwitchComponent
52 changes: 52 additions & 0 deletions plugin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
const plugin = require('tailwindcss/plugin')
const colors = require('./colors')

const SwitchComponent = require('./components/switch')

const spacing = {
'1.5': '0.375rem',
'2.5': '0.625rem'
}

module.exports = plugin.withOptions(
function() {
return function(options) {
const {
addUtilities,
addVariant,
theme,
e,
prefix,
variants,
addBase,
addComponents
} = options

let craterDefaultTypography = {
fontWeight: 600,
color: theme('colors.black')
}

addBase({
'.page-title': {
...craterDefaultTypography,
fontSize: '24.5px'
}
})

let SwSwitch = SwitchComponent(theme)

addComponents(SwSwitch)
}
},
function() {
return {
theme: {
extend: {
colors,
spacing
}
}
}
}
)
3 changes: 3 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require('tailwindcss'), require('autoprefixer')],
}
20 changes: 20 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>SPACEWIND-UI</title>
</head>
<body>
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Loading

0 comments on commit 9d33bc7

Please sign in to comment.