Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephusPaye committed Sep 3, 2017
2 parents 68c1f3d + 6d0cc36 commit 463d5a9
Show file tree
Hide file tree
Showing 124 changed files with 28,321 additions and 18,579 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
_del
_deprecated
_older
_reminder
._reminder
/node_modules
Thumbs.db
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## v1.0.1

* Upgrade Vue to `v2.4.2` and fix template warnings. See [#268](https://github.com/JosephusPaye/Keen-UI/issues/268).
* Add `aria-describedby` attribute to UiTooltip
* Fix bug where help and error content provided via slot isn't shown unless the `help` or `error` props are set. Affects UiAutocomplete, UiCheckboxGroup, UiDatepicker, UiRadioGroup, UiSelect, and UiTextbox. See [#204](https://github.com/JosephusPaye/Keen-UI/issues/301).
* Allow `null` for UiAutocomplete and UiTextbox `value` prop. See [#253](https://github.com/JosephusPaye/Keen-UI/issues/253).
* Allow UiTooltip `trigger` prop to be a VueComponent instance. See [#204](https://github.com/JosephusPaye/Keen-UI/issues/204).
* Add `checked` attribute to the `input` element for UiRadio. See [#207](https://github.com/JosephusPaye/Keen-UI/issues/207).
* Fix error being thrown when using UiRippleInk with SVG elements on touch devices. See [#236](https://github.com/JosephusPaye/Keen-UI/issues/236).
* Fix minor errors and dead links in the docs
* Remove Material Icons webfont and use inline SVG icons in the docs
* Update [contributing guidelines](https://github.com/JosephusPaye/Keen-UI/blob/v1.0.1/CONTRIBUTING.md) with information about linting, BEM and using the `next` branch

## v1.0.0

There are several breaking changes in this release, as the components have been re-written from scratch to support Vue 2. However, this release marks a stabilization of the API (hence v1.0) and breaking changes will be avoided in 1.x where possible.
Expand Down
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ Please take care to observe the following when you contribute code to Keen UI:

2. **Before** you put a lot of work into a pull request that could be rejected, create an issue with your proposal for discussion.

3. All Javascript code must pass the ESlint check. Run `npm run lint` to check your code.
3. Pull requests should be made against the `next` branch, which is where development happens for the next release. The `master` branch is for the current stable release only.

4. For HTML, use the following formatting guide:
4. All Javascript code must pass the ESlint check. Run `npm run lint` to check your code.

5. For HTML, use the following formatting guide:

For tags that cross the max line limit (100 characters), open the tag, then drop down to an indented line and place each attribute on a new line, sorted alphabetically and grouped (new line separating groups) according to the following order:

Expand All @@ -25,4 +27,4 @@ Please take care to observe the following when you contribute code to Keen UI:

![Example of HTML formatting](https://i.imgur.com/8v4vkRK.png)

5. For CSS, all selectors must follow the [BEM naming guidelines](http://getbem.com/naming/).
6. For CSS, all selectors must follow the [BEM naming guidelines](http://getbem.com/naming/).
75 changes: 28 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Keen UI

> A lightweight collection of essential UI components written with Vue and inspired by Material Design.
Keen UI is a lightweight [Vue.js](http://vuejs.org) UI library with a simple API. The design is inspired by Google's [Material Design](https://material.io/guidelines). However, Keen UI is not meant to be a full implementation of the Material Design spec.

Keen UI is designed to be a lightweight [Vue.js](http://vuejs.org) UI library with a simple API. Though the design is inspired by Google's [Material Design](https://material.io/guidelines), Keen UI is not meant to be a full implementation of the spec.

Keen UI is **not** a CSS framework, and as such you won't find a grid system or styles for typography in it. Instead, the focus is on creating reusable components that have interactivity.
Keen UI is **not** a CSS framework. As such, it doesn't include a grid system, typography styles, etc. Instead, the focus is on interactive components that require Javascript.

## Documentation and demo
[http://josephuspaye.github.io/Keen-UI/](http://josephuspaye.github.io/Keen-UI/)
Expand All @@ -21,20 +19,11 @@ IE 10+ (due to [Flexbox support](http://caniuse.com/#search=flexbox)).

## Installation

### NPM (recommended)

```bash
npm install keen-ui --save
```

### Bower

```bash
bower install keen-ui --save
```

## Usage
> Make sure to include either the `dist/keen-ui.css` or `dist/keen-ui.min.css` file if you are not using individual components from `lib/` as the styles have been extracted into a single CSS file.

##### CSS Reset

Expand All @@ -52,17 +41,16 @@ html {
}
```

You can add it to your stylesheet manually (before other styles), or, if you are using a CSS framework, check to see if the framework already includes a reset (most CSS frameworks do). The root font size [can be customized](Customization.md#component-sizing) to globally resize the components.
You can add the reset to your stylesheet (before other styles). If you are using a CSS framework, check to see if the framework already includes a reset (most CSS frameworks do). The root font size [can be customized](Customization.md#component-sizing) to globally resize the components.

### ES6

*The following examples can also be used with CommonJS by replacing ES6-specific syntax with CommonJS equivalents.*

Use as a plugin (registers all components with Vue globally):

```js
import Vue from 'vue';
import KeenUI from 'keen-ui';
import 'keen-ui/dist/keen-ui.css';

Vue.use(KeenUI);

Expand Down Expand Up @@ -91,49 +79,42 @@ new Vue({

First, add a stylesheet link to the Keen UI CSS file in `dist/keen-ui.min.css`. Then, add a script tag pointing to `dist/keen-ui.min.js` *after* adding Vue.

If Keen UI detects `Vue` globally, all the components will be registered automatically. The components will also be made available on the global `window.KeenUI` object.
If Keen UI detects `Vue` globally, all the components will be registered automatically. The components will also be made available globally via `window.KeenUI`.

Example:

```html
<html>
<head>
...
<link rel="stylesheet" href="path/to/keen-ui.min.css">
...
</head>
<body>
<div id="app">
<ui-button>Hello world!</ui-button>
</div>

<script src="path/to/vue.js"></script>
<script src="path/to/keen-ui.min.js"></script>
<script>
new Vue({
el: '#app',
components: {
// all Keen UI components already registered
}
});
</script>
</body>
</html>
<!-- Place this in the <head> -->
<link rel="stylesheet" href="path/to/keen-ui.min.css">

<!-- Place this in the <body> -->
<div id="app">
<ui-button>Hello world!</ui-button>
</div>

<script src="path/to/vue.js"></script>
<script src="path/to/keen-ui.min.js"></script>
<script>
new Vue({
el: '#app',
components: {
// all Keen UI components already registered
}
});
</script>
```

## Using *standalone* individual components
## Using standalone components

Each component has been compiled as a self-contained file which you can use without importing the rest of the library. The standalone files are located in the `lib/` folder and they contain their own CSS which will be added as `<style>` tags in `<head>`.
Each component has been built into a standalone file with CSS included. You can use individual standalone components without importing the rest of the library. The standalone components are located in the `lib/` folder.

**NOTE**: Files in the `lib/` folder contain all their own dependencies and a lot them contain overlapping dependencies. As such, using multiple files from `lib/` could significantly increase the size of your bundle due to duplicate code, and is not recommended unless you are using only a handful of components. This *may* be fixed by minification, but I haven't tested.
**NOTE**: Standalone component files each contain their own dependencies and a lot them contain overlapping dependencies. As such, using multiple standalone files could significantly increase the size of your bundle due to duplicate code, and is not recommended unless you are using only a handful of components.

### ES6

*The following examples can also be used with CommonJS by replacing ES6-specific syntax with CommonJS equivalents.*

```js
import Vue from 'vue';
import 'keen-ui/src/bootstrap'; // Required when using components from `lib/`, should be imported only once in your project
import 'keen-ui/src/bootstrap'; // Required when using standlone components, should be imported only once in your project
import UiButton from 'keen-ui/lib/UiButton';

new Vue({
Expand All @@ -154,7 +135,7 @@ new Vue({
* [x] Datepicker
* [x] File upload
* [x] Add customization guide
* [ ] Add unit tests
* [ ] Add automated tests

## Licence
Keen UI is open source and released under the [MIT Licence](LICENCE).
Expand Down
5 changes: 4 additions & 1 deletion build/options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
'use strict';

const path = require('path');
const version = require('../package.json').version;

// Hardcoding here (and not reading from package.json) as the files are built
// before the version is updated in package.json
const version = '1.0.1';

const banner =
'/*!\n' +
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
},
postcss: [
autoprefixer({
browsers: ['last 2 versions', 'ie > 9', 'Firefox ESR']
browsers: ['last 2 versions', 'ie > 9', 'Firefox ESR', 'android >= 4.0']
})
]
}
Expand Down
10 changes: 8 additions & 2 deletions build/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const base = require('./webpack.base.js');

const config = merge(base, {
watch: true,

devtool: '#eval-source-map',

entry: options.paths.resolve('docs-src/index.js'),
Expand All @@ -18,10 +19,15 @@ const config = merge(base, {

devServer: {
contentBase: options.paths.output.docs,
host: '0.0.0.0',

// This is used to allow access for external devices, temporarily disabled here as
// it incorrectly opens http://0.0.0.0:9090 instead of http://localhost:9090 on startup
// host: '0.0.0.0',

port: 9000,
historyApiFallback: true,
noInfo: true
noInfo: true,
clientLogLevel: 'error'
}
});

Expand Down
1 change: 1 addition & 0 deletions build/webpack.lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config = merge(base, {
UiCalendar: ['./src/UiCalendar.vue'],
UiCheckbox: ['./src/UiCheckbox.vue'],
UiCheckboxGroup: ['./src/UiCheckboxGroup.vue'],
UiCloseButton: ['./src/UiCloseButton.vue'],
UiCollapsible: ['./src/UiCollapsible.vue'],
UiConfirm: ['./src/UiConfirm.vue'],
UiDatepicker: ['./src/UiDatepicker.vue'],
Expand Down
Loading

0 comments on commit 463d5a9

Please sign in to comment.