Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1352 from mercadolibre/develop
Browse files Browse the repository at this point in the history
Update to version 2.0.12
  • Loading branch information
battaglr authored Sep 21, 2017
2 parents fc864d2 + 34572f6 commit 402c7dd
Show file tree
Hide file tree
Showing 18 changed files with 117 additions and 225 deletions.
20 changes: 0 additions & 20 deletions LICENSE

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2012 MercadoLibre

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.
231 changes: 61 additions & 170 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,210 +1,101 @@
# Chico UI

[![npm version](https://img.shields.io/npm/v/chico.svg)](https://www.npmjs.com/package/chico)
![Bower version](https://img.shields.io/bower/v/chico.svg)
[![Build Status](https://travis-ci.org/mercadolibre/chico.svg?branch=master)](https://travis-ci.org/mercadolibre/chico)
[![devDependency Status](https://img.shields.io/david/dev/mercadolibre/chico.svg)](https://david-dm.org/mercadolibre/chico#info=devDependencies)
[![npm](https://img.shields.io/npm/v/chico.svg)](https://www.npmjs.com/package/chico)
[![Known vulnerabilities](https://snyk.io/test/github/mercadolibre/chico/badge.svg)](https://snyk.io/test/github/mercadolibre/chico)

> Chico UI is a free and open source collection of easy-to-use UI components for designers and developers.
> A collection of easy-to-use UI components.
## Installation

## Installing
Install it using npm:

Using npm:

```bash
```sh
$ npm install chico
```

Using bower:

```bash
$ bower install chico
```

## Development setup

1. Make sure you have [Git](http://git-scm.com/) and [NodeJS](http://nodejs.org/)
up and running.
*For a specific version, please check the
[releases](https://github.com/mercadolibre/chico/releases) section.*

2. Open your terminal and clone `mercadolibre/chico` by running:
## Development

$ git clone [email protected]:mercadolibre/chico.git
*Make sure to have [Git](http://git-scm.com/) and
[Node](http://nodejs.org/) installed.*

3. Now go to the project's folder:
1. Fork the repo and create a new branch —or just create a new branch if you
have permissions.

$ cd chico
2. Once you have your local copy, install its dependencies:

4. Install its dependencies:
```sh
$ npm install
```

$ npm install
3. Install [Gulp](https://gulpjs.com/):

5. Install `gulp`:
```sh
$ npm install gulp -g
```

$ npm install gulp -g
4. Install [Browsersync](https://www.browsersync.io/):

6. Install `BrowserSync`:
```sh
$ npm install browser-sync -g
```

$ npm install browser-sync -g
5. Run the `dev` task

7. Run dev task
```sh
$ gulp dev
```

$ gulp dev
*This will open the "ui" version at
[http://localhost:3040](http://localhost:3040/) in your default browser.
The "mobile" version is at
[http://localhost:3040/mobile](http://localhost:3040/mobile).*

[http://localhost:3040](http://localhost:3040/) will open in a default browser. Mobile version is located at [http://localhost:3040/mobile](http://localhost:3040/mobile).
6. Make all necessary changes, and when all is ready, open a PR.

8. Develop! :)
### Code style and formatting

**NOTE**
Make sure your code is complying with the following documents:

Please read through our code style guides:
- [HTML](https://github.com/mercadolibre/html-style-guide)
- [CSS](https://github.com/mercadolibre/css-style-guide)
- [SASS] (https://github.com/mercadolibre/ui-sass_style_guide)
- [JavaScript](https://github.com/mercadolibre/javascript-style-guide)

## How to use Chico Themes

This is the structure and a small file reference guide:

### Base folder (chico/src)

In the "src" folder you'll find all Sass files. From here you can may make changes that affect the UI project in a fast and organized way.

```
src/
|
|– mobile/ # Properties only for Mobile
| |
| |– styles/ # Components list
| |– _autocomplete.scss # Autocomplete rules
| |– _base.scss # Base rules
| |– _boxes.scss # Boxes rules
| `– mobile-theme.scss # Imports the components to show
| ... # Etc…
|
|– shared/ # Properties shared in Mobile and UI
| |
| |– styles/ # Components list
| |– _autocomplete.scss # Autocomplete rules
| |– _base.scss # Base rules
| |– _boxes.scsss # Boxes rules
| ... # Etc…
| |
| `– _variables.scss # Shared theme and structure variables
|
`– ui/ # Properties only for Desktop Browsers
|
`– styles/ # Components list
|– _autocomplete.scss # Autocomplete rules
|– _badges.scss # Badges rules
|– _base.scss # Base rules
|– ui-theme.scss # Imports the components to show
... # Etc…
```

### Styles folder (inside mobile, shared or ui)
## Tests

This folder have a list of each individual component, within each are there unique properties.

Note:

mobile-theme.scss and ui-theme.scss these files are used to choose which components we have available at the final css. You can also edit the file and choose which components you want to render.

### Reset.scss

This file is very important because it handles all the basic css definitions, such as font-family, color, etc...

### Components structure

Example:
Run all tests using:

```sh
$ npm test
```
_autocomplete.scss
`– _autocomplete-variables.scss # Local component's only variables
```

In the example, the first Sass file (_autocomplete.scss) imports the Sass file from the same folder (_autocomplete-variables.scss ) and includes the extra custom properties of the component.

### How to create a new theme
This will run all tests in the terminal using PhantomJS.

* Install `Chico UI` via bower using `npm install [email protected]`
* Create a theme folder and put a theme file into. E.g. `mkdir mytheme && touch mytheme/mytheme-ui.scss`
* Edit the `mytheme/mytheme-ui.scss` and put into a minimal required content
Since tests are executed using the Karma test runner, so feel free to run
them in another browser. For example, If you want to use Google Chrome run:

```
@import '../node_modules/chico/src/shared/styles/mixins';
@import '../node_modules/chico/src/shared/styles/variables';
```sh
./node_modules/.bin/karma start --browsers Chrome
```

* Import all required components

```
...
@import '../node_modules/chico/src/shared/styles/icons';
...
```
## Documentation and live demos

* Compile a theme. The fastest way is using a `sass` command line tool
For more information, documentation, or to see live demos, check our
[official website](http://chico.mercadolibre.com/).

```sass mytheme/mytheme-ui.scss mytheme/mytheme-ui.css```

Strictly recommended to use some task runner such `grunt` or `gulp`. Typical gulp task may look like

```js
gulp.task('sass:ui', function () {
return gulp.src('mytheme/mytheme-ui.scss')
.pipe($.sass())
.pipe(gulp.dest('mytheme/'));
});
```
* If you are not interested in components personalization and just want to override default theme's variables
typical theme file may look like this

```
// File that contain all overrides
@import 'settings';
// Default theme with all components
@import '../node_modules/chico/src/ui/styles/ui-theme';
```

**Note**: Variables reference is pending


## Tests
You can run all tests in a terminal with a PhantomJS headless browser:

$ npm test

Tests are executing using the karma test runner so feel free to run them in your favorite browser. There is the example
for Google Chrome:

./node_modules/.bin/karma start --browsers Chrome


## Get in touch

- E-mail: [chico at mercadolibre dot com](mailto:[email protected])
- Twitter: [@chicoui](https://twitter.com/chicoui)
- Web: http://chico-ui.com.ar/

## Maintained by

- Her Mammana ([@hmammana](https://twitter.com/hmammana))
- Lean Linares ([@lean8086](https://twitter.com/lean8086))

## Thanks to
## Special thanks

- Guille Paz ([@pazguille](https://twitter.com/pazguille)).
- Natan Santolo ([@natos](https://twitter.com/natos)). Creator and former leader, now traveling around the world, drinking beer and looking for the secret of eternal life.
- Nati Devalle ([@taly](https://twitter.com/taly)). Because we love her. She is awesome!


## Credits

![MercadoLibre](http://static.mlstatic.com/org-img/chico/img/logo-mercadolibre-new.png)

## License
Licensed under the MIT license.

Copyright (c) 2015 [MercadoLibre](http://github.com/mercadolibre).
- Her Mammana ([@hmammana](https://twitter.com/hmammana)).
- Lean Linares ([@lean8086](https://twitter.com/lean8086)).
- Natan Santolo ([@natos](https://twitter.com/natos)). *Creator and former
leader, now traveling around the world, drinking beer and looking for
the secret of eternal life.*
- Nati Devalle ([@taly](https://twitter.com/taly)). *Because we love her.
She is awesome!*
- Oleh Burkhay ([@atmaworks](https://twitter.com/atmaworks)).

## License

© 2012-2017 Mercado Libre. Licensed under the [MIT license](LICENSE.txt).
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "chico",
"description": "Chico UI is a free and open source collection of easy-to-use web components for developers and designers.",
"version": "2.0.11",
"description": "A collection of easy-to-use UI components",
"version": "2.0.12",
"keywords": [
"css",
"js",
Expand Down
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog

All notable changes to this project are documented on the [releases]
(https://github.com/mercadolibre/chico/releases) section.
All notable changes to this project are documented on the
[releases](https://github.com/mercadolibre/chico/releases) section.
2 changes: 1 addition & 1 deletion dist/mobile/chico.css

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

10 changes: 5 additions & 5 deletions dist/mobile/chico.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chico UI v2.0.11
* Chico UI v2.0.12
* http://chico-ui.com.ar/
*
* Copyright (c) 2017, MercadoLibre.com
Expand Down Expand Up @@ -180,7 +180,7 @@
}
}

ch.version = '2.0.11';
ch.version = '2.0.12';
window.ch = ch;
}(this));
(function (ch) {
Expand Down Expand Up @@ -3953,12 +3953,12 @@
* @event ch.Form#success
* @example
* // Subscribe to "success" event.
* form.on("submit",function () {
* form.on("success",function () {
* // Some code here!
* });
* @example
* // Subscribe to "success" event and prevent the submit event.
* form.on("submit",function (event) {
* form.on("success",function (event) {
* event.preventDefault();
* // Some code here!
* });
Expand Down Expand Up @@ -4638,7 +4638,7 @@
* @event ch.Validation#success
* @example
* // Subscribe to "success" event.
* validation.on("submit",function () {
* validation.on("success",function () {
* // Some code here!
* });
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/mobile/chico.min.css

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

8 changes: 4 additions & 4 deletions dist/mobile/chico.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ui/chico.css

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

Loading

0 comments on commit 402c7dd

Please sign in to comment.