Skip to content

Commit

Permalink
Merge pull request #248 from enyojs/2.6.0-dev
Browse files Browse the repository at this point in the history
Merge 2.6.0 dev into master.
  • Loading branch information
webOS101 committed Apr 12, 2016
2 parents 78435fe + 19f2a70 commit 919ea0d
Show file tree
Hide file tree
Showing 217 changed files with 8,579 additions and 11,868 deletions.
43 changes: 43 additions & 0 deletions .enyoconfig
@@ -0,0 +1,43 @@
{
"name": "onyx",
"libDir": "lib",
"paths": [],
"libraries": [],
"sources": {},
"targets": {},
"links": [],
"linkAllLibs": false,
"logLevel": "warn",
"production": false,
"devMode": true,
"cache": true,
"resetCache": false,
"trustCache": false,
"cacheFile": ".enyocache",
"clean": false,
"sourceMaps": true,
"externals": true,
"strict": false,
"skip": [],
"library": true,
"wip": false,
"outdir": "dist",
"lessPlugins": [],
"assetRoots": [],
"lessOnlyLess": false,
"minifyCss": false,
"inlineCss": true,
"outCssFile": "output.css",
"outJsFile": "output.js",
"inlineJs": true,
"templateIndex": "",
"watch": false,
"watchPaths": [],
"polling": false,
"pollingInterval": 100,
"headScripts": [],
"tailScripts": [],
"promisePolyfill": false,
"styleOnly": false,
"lessVars": []
}
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,2 +1,5 @@
.DS_Store
*~
node_modules
dist
.enyocache
1 change: 1 addition & 0 deletions .jshintignore
@@ -0,0 +1 @@
samples/samples.js
44 changes: 24 additions & 20 deletions .jshintrc
@@ -1,22 +1,26 @@
{
"globals": {
"enyo": false,
"$L": false,
"onyx": false,
"ilib": false
},
"es3": true,
"evil": false,
"regexdash": true,
"browser": true,
"wsh": false,
"trailing": false,
"sub": true,
"eqnull": true,
"laxbreak": true,
"curly": true,
"indent": 4,
"newcap": true,
"undef": true,
"unused": "vars"
"globals": {
"global": false,
"require": false,
"exports": true,
"module": true,
"module.exports": true,
"JSON": false
},
"es3": true,
"evil": false,
"regexdash": true,
"browser": true,
"wsh": false,
"trailing": false,
"sub": true,
"eqnull": true,
"laxbreak": true,
"laxcomma": true,
"curly": false,
"indent": 4,
"newcap": false,
"undef": true,
"expr": true,
"unused": "vars"
}
8 changes: 5 additions & 3 deletions .travis.yml
@@ -1,5 +1,7 @@
sudo: false
language: node_js
node_js:
- "0.10"
install: "npm -g install jshint"
script: "jshint ."
- "node"
cache:
directories:
- $HOME/.npm
64 changes: 34 additions & 30 deletions CONTRIBUTING.md
@@ -1,49 +1,53 @@
# Contributions

Contributions are welcome for Enyo and its associated libraries including onyx and layout.
The Enyo team welcomes contributions to Enyo core and its associated libraries.

Please see [Contributing to Enyo](http://enyojs.com/community/contribute/) for details
on our contribution policy and guidelines for use of the Enyo-DCO-1.0-Signed-off-by
line in your commits and pull requests.
Please see [Contributing to Enyo](http://enyojs.com/community/contribute/) for
details on our contribution policy and guidelines covering the use of the
`Enyo-DCO-1.0-Signed-off-by` line in your commits and pull requests.

If you're interested in introducing new kinds, you might also consider hosting your own repo
and contributing to the [Enyo community gallery](http://enyojs.com/gallery).
If you're interested in introducing new kinds, you might also consider hosting
your own repo and contributing to the [Enyo Community
Gallery](http://enyojs.com/gallery).

## Modifications to CSS
## New Controls

Onyx CSS is defined using parameterized LESS files. Whenever you make changes to LESS files in Onyx, you'll also need to re-generate and check-in the top-level .css file as well, to maintain backward-compatibility for environments that don't wish to use LESS.
When contributing new controls, please adhere to the following guidelines to
ensure compatibility with the Enyo framework's theming support:

You can re-generate the top-level onyx.css file as follows:
If the control is implemented in a single `.js` file, place that `.js` file in `onyx/lib`.

cd lib/onyx/css
../../../enyo/tools/lessc.sh ./package.js
If the control has multiple files (`.js`, `.less`, or both):

NOTE: Since LESS generates relative URLs, it's important to run the `lessc.sh` script from the onyx css folder.
* Create a directory matching the control's name within `onyx/lib` (e.g., `onyx/lib/MyNewControl`).

Also note you only need to generate the .css file when you're ready to check in your changes. During development, you can do all your testing modifying just LESS files if you include "less-xyz.min.js" in your app's debug.html file, which compiles the LESS client-side during loading:
* Place the control's `.js` file(s) and `.less` file(s) in the new directory.

<script src="enyo/tools/minifier/node_modules/less/dist/less-1.3.0.min.js"></script>

Alternatively, there is also a "watch" mode for `lessc.sh`, which will automatically re-compile CSS based on any LESS dependency changes:
* When possible, use existing variables from
[`lib/onyx/css/onyx-variables.less`](https://github.com/enyojs/onyx/blob/master/css/onyx-variables.less)
in your control's LESS files. If your control needs new variables, add them
(along with their default definitions) to `onyx-variables.less`.

cd lib/onyx/css
../../../enyo/tools/lessc.sh -w ./package.js
* Create a `package.json` file with the necessary references to the `.js` and
`.less` file(s).

Additionally, any new controls contributed should follow this basic pattern to ensure proper themability support:
For more details, please refer to the [UI Theming Guide](https://github.com/enyojs/enyo/wiki/UI-Theming).

* Place control's .js file(s) in `lib/onyx/source` and add to `lib/onyx/source/package.js`
* Place control's .less file(s) in `lib/onyx/css`
* @import .less file(s) into [`lib/onyx/css/onyx-rules.less`](https://github.com/enyojs/onyx/blob/master/css/onyx-rules.less)
* Use existing variables from [`lib/onyx/css/onyx-variables.less`](https://github.com/enyojs/onyx/blob/master/css/onyx-variables.less) in your control's LESS files when available, add any new variables your particular control needs along with their default definitions to onyx-variables.less.
## Samples

Refer to the [UI Theming Guide](https://github.com/enyojs/enyo/wiki/UI-Theming) for more details.
Each new control should be accompanied by at least one sample, to be plugged
into the library's internal sampler located at `samples/src/index.js`.

## Samples
The following are some basic guidelines regarding samples:

* Place samples in `onyx/samples/src`.

Every new control should be accompanied by at least one sample in the [Enyo 2 Sampler](http://enyojs.com/sampler). Read the [Sampler readme](https://github.com/enyojs/sampler) for details on how to go about adding new samples to the Sampler.
* In your sample, be sure to exercise useful APIs and events from the new
control.

Guidelines for samples:
* When multiple interesting or significantly different configurations of the
control are available, include multiple instances of the control in the
sample.

* Samples should live in a folder named `samples`, as a peer to the source
* Be sure to exercise useful API's and events of the control in the sample
* When one or more significantly different or interesting configurations of the control are available, include more than one instance in the sample to exhibit use of the different API's
* When resolving a bug, update the sample to ensure that the original bug and
its resolution are testable.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -28,6 +28,11 @@ Please do not edit the top-level `onyx.css` file manually. It should be
treated as an output file; we should make changes to `.less` files only, then
generate the `onyx.css` file using the above command.

## Samples

All samples reside in a consolidated sample app for Enyo and its libraries:
[enyo-strawman](https://github.com/enyojs/enyo-strawman)

## Copyright and License Information

Unless otherwise specified, all content, including all source code files and
Expand Down
39 changes: 39 additions & 0 deletions bower.json
@@ -0,0 +1,39 @@
{
"name": "enyo-onyx",
"main": [
"index.js",
"lib"
],
"version": "2.6.0",
"homepage": "https://github.com/enyojs/enyo",
"authors": [
{"name": "EnyoJS Framework Team", "homepage": "http://enyojs.com/"}
],
"description": "",
"moduleType": [
"node"
],
"keywords": [
"JavaScript",
"framework",
"js",
"javascript",
"library",
"enyo",
"enyojs",
"Enyo",
"EnyoJS",
"webos",
"WebOS",
"toolkit",
"components",
"mobile"
],
"license": "Apache-2.0",
"ignore": [
"**/.*",
"node_modules",
"test",
"docs"
]
}
25 changes: 0 additions & 25 deletions css/ButtonColors.less

This file was deleted.

7 changes: 0 additions & 7 deletions css/TabButton.less

This file was deleted.

84 changes: 25 additions & 59 deletions css/onyx-rules.less
Expand Up @@ -10,71 +10,37 @@
background-color: @onyx-background;
/* remove automatic tap highlight color */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* prevent IE from inheriting line-height for these elements */
.onyx-button, .onyx label, .onyx input {
line-height: normal;
}

.onyx-selected {
background-color: @onyx-selected-background;
}

/* LESS pre-calculations */
@onyx-disabled-opacity-ie: @onyx-disabled-opacity*100;

/* prevent IE from inheriting line-height for these elements */
.onyx-button, .onyx label, .onyx input {
line-height: normal;
}

/* Individual Widget CSS */
.onyx-selected {
background-color: @onyx-selected-background;
}

@import "Icon.less";
@import "Button.less";
@import "Checkbox.less";
@import "Grabber.less";
@import "Popup.less";
@import "Groupbox.less";
@import "Input.less";
@import "Menu.less";
@import "Submenu.less";
@import "Picker.less";
@import "TextArea.less";
@import "RichText.less";
@import "RadioButton.less";
@import "TabButton.less";
@import "TabBar.less";
@import "TabBarItem.less";
@import "ToggleButton.less";
@import "Toolbar.less";
@import "Tooltip.less";
@import "ProgressBar.less";
@import "ProgressButton.less";
@import "Slider.less";
@import "RangeSlider.less";
@import "Item.less";
@import "Spinner.less";
@import "MoreToolbar.less";
@import "DatePicker.less";
@import "TimePicker.less";
@import "ButtonColors.less";
@import "ContextualPopup.less";
/* some default colors */
.onyx-dark {
background-color: @onyx-dark-background;
}

/* some default colors */
.onyx-dark {
background-color: @onyx-dark-background;
}
.onyx-light {
background-color: @onyx-light-background;
}

.onyx-light {
background-color: @onyx-light-background;
}
.onyx-green {
background-color: #91BA07;
}

.onyx-green {
background-color: #91BA07;
}
.onyx-red {
background-color: #C51616;
}

.onyx-red {
background-color: #C51616;
.onyx-blue {
background-color: #35A8EE;
}
}

.onyx-blue {
background-color: #35A8EE;
}
/* LESS pre-calculations */
@onyx-disabled-opacity-ie: @onyx-disabled-opacity*100;
3 changes: 3 additions & 0 deletions css/onyx-variables.less
Expand Up @@ -142,3 +142,6 @@
@onyx-spinner-light-image: url("@{onyx-image-path}/spinner-light.gif");
@onyx-spinner-image-width: 59px;
@onyx-spinner-image-height: 58px;

@onyx-close-inactive-image: url("@{onyx-image-path}/close-inactive.png");
@onyx-close-active-image: url("@{onyx-image-path}/close-active.png");

0 comments on commit 919ea0d

Please sign in to comment.