Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
estevanmaito committed Jun 23, 2020
0 parents commit 6f26b83
Show file tree
Hide file tree
Showing 42 changed files with 117,954 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
dev
coverage
40 changes: 40 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"env": {
"jest": true
},
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["standard", "plugin:react/recommended", "prettier"],
"plugins": ["prettier"],
"rules": {
"no-unused-vars": [
2,
{
"args": "all",
"argsIgnorePattern": "^_"
}
],
"no-warning-comments": 0,
"prettier/prettier": [
"error",
{
"semi": false,
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"bracketSpacing": true,
"parser": "flow",
"endOfLine": "auto"
}
]
}
}
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: "\U0001F41B Bug report"
about: 'Bugs, missing documentation, or unexpected behavior '
title: ''
labels: ''
assignees: ''
---

<!--
* Please fill out this template with all the relevant information so we can
understand what's going on and fix the issue. We appreciate bugs filed and PRs
submitted!
* Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
-->

- `windmill-react-ui` version:

### Relevant code or config:

```html
<!-- your code here -->
```

<!--
If this is an issue with documentation, please file an issue on the docs repo:
https://github.com/docs/docs
-->

### What you did:

<!-- What you were doing -->

### What happened:

<!-- Please provide the full error message/screenshots/anything -->

### Reproduction:

<!--
If possible, please create a repository that reproduces the issue with the
minimal amount of code possible
Or if you can, try to reproduce the issue in a Codesandbox or CodePen
-->

### Problem description:

<!-- Please describe why the current behavior is a problem -->

### Suggested solution:

<!--
It's ok if you don't have a suggested solution, but it really helps if you could
do a little digging to come up with some suggestion of how to improve things.
-->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/---feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F4A1 Feature request"
about: 'I have a suggestion (and might want to implement myself)! '
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
dist
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "lf"
}
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: node_js
cache: npm
notifications:
email: false
node_js:
- 12
- 14
- node
install:
- npm install
script:
- npm run lint
- npm run test:coverage
- npm run build
after_success:
- npm run codecov
# - npm run semantic-release
branches:
only:
- master
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT CONTACT]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Estevan Maito

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.
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Windmill React UI

The Tailwind CSS React component library

<p>
<a href="https://codecov.io/gh/estevanmaito/windmill-react-ui"><img src="https://codecov.io/gh/estevanmaito/windmill-react-ui/branch/master/graph/badge.svg" alt="codecov" /></a>
<a href="https://travis-ci.com/github/estevanmaito/windmill-react-ui"><img src="https://img.shields.io/travis/estevanmaito/windmill-react-ui" alt="Travis (.org)" /></a>
<a href="https://www.npmjs.com/package/windmill-react-ui"><img src="https://img.shields.io/npm/v/mywindmill-react-ui" alt="npm" /></a>
<a href="https://github.com/estevanmaito/windmill-react-ui/blob/master/LICENSE"><img src="https://img.shields.io/github/license/estevanmaito/windmill-react-ui" alt="MIT License" /></a>
</p>

Projects using it: [Windmill Dashboard React](https://github.com/estevanmaito/windmill-dashboard-react)

## Mission

Be the most accessible it can be out of the box and the fastest way to production.

## Roadmap

- [ ] Docs
- [ ] Next.js + MDX (see [Tailwind Starter Kit](https://github.com/estevanmaito/tailwind-starter-kit))
- [ ] Themes
- [ ] Scope Tailwind? Prefix? Use user config?
- I'm inclined to create a root theme file, with all classes used, for every element. This way users can import it and extend/modify, but it would be used to let purge know which classes are being used. But what about custom theme configs, like the `shadow-outline` custom plugin, or extended styles? Maybe create a plugin that could be imported from this package also?

```js
//tailwind.config.js
// this is responsible for theme classes and could also be used for customization
import windmillTheme from 'windmill-react-ui/defaultTheme'
// solve the extension/custom styles problem
import windmillPlugin from 'windmill-react-ui/plugin'
purge: [windmillTheme],
plugins: [windmillPlugin()]
```

### Components

- [ ] Button
- [ ] Card
- [ ] Dropdown
- [ ] Form
- [ ] Modal
- [ ] Table
- [ ] Avatar
- [ ] Transition
- [ ] Backdrop
- [ ] Badge

Things that are not in the plans for the near future and why:

#### Different button _states_ like 'danger', 'warning', 'pink', etc

It introduces unnecessary noise. If you feel you need a red button to tell users that something is dangerous, you're approaching the problem wrongfully.

- Colorblind people will see it in unpredictable colors;
- You're probably giving the user an option like: Delete your account? [cancel][delete]; Here you have a primary and a secondary action, where you can use something like a `link` or `outline` button for cancel and a normal, primary button for delete.
- If the action is too dangerous, you should implement additional confirmation, like a modal. Consider people have cats and they will step in their keyboards when focus is over the delete button. 🐱‍💻

#### New components

This library is so fresh, that if we just add new components now, we'll be just introducing bugs and bad design decisions into more code.

So, until we get to a point that the current components are in good shape and we have a clear vision of what a good component must have, we will just work on the existing component base.

How long will it take? A week, a month, it depends on the time I can put into it.
Loading

0 comments on commit 6f26b83

Please sign in to comment.