Skip to content

Commit

Permalink
Update vex.dialog to 1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatliner committed Apr 4, 2017
1 parent 8341f5c commit 4e85f68
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### [Demo](http://github.hubspot.com/vex/docs/welcome/)    [Documentation](http://github.hubspot.com/vex/)

vex is a modern dialog library which is highly configurable, easily stylable, and gets out of the way. You'll love vex because it's tiny (`5.5kb` minified and gzipped), has a clear and simple API, works on mobile devices, and can be customized to match your style in seconds.
vex is a modern dialog library which is highly configurable, easily stylable, and gets out of the way. You'll love vex because it's tiny (`5.6kb` minified and gzipped), has a clear and simple API, works on mobile devices, and can be customized to match your style in seconds.

![](https://raw.github.com/HubSpot/vex/master/docs/vex.gif)

Expand Down
9 changes: 6 additions & 3 deletions dist/js/vex.combined.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ var buttonsToDOM = function buttonsToDOM (buttons) {
var domButton = document.createElement('button')
domButton.type = button.type
domButton.textContent = button.text
domButton.classList.add(button.className)
domButton.className = button.className
domButton.classList.add('vex-dialog-button')
if (i === 0) {
domButton.classList.add('vex-first')
Expand Down Expand Up @@ -1153,7 +1153,7 @@ var plugin = function plugin (vex) {

// Optionally focus the first input in the form
if (options.focusFirstInput) {
var el = dialogInstance.contentEl.querySelector('button, input, textarea')
var el = dialogInstance.contentEl.querySelector('button, input, select, textarea')
if (el) {
el.focus()
}
Expand Down Expand Up @@ -1199,7 +1199,10 @@ var plugin = function plugin (vex) {
// More closely mimics "window.prompt" in that a single string is returned
var callback = options.callback
options.callback = function promptCallback (value) {
value = value[Object.keys(value)[0]]
if (typeof value === 'object') {
var keys = Object.keys(value)
value = keys.length ? value[keys[0]] : ''
}
callback(value)
}
return this.open(options)
Expand Down
4 changes: 2 additions & 2 deletions dist/js/vex.combined.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/vex.min.js

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vex-js",
"version": "3.1.0",
"version": "3.1.1",
"description": "Beautiful, functional dialogs in vanilla JavaScript",
"contributors": [
"Adam Schwartz <[email protected]>",
Expand All @@ -17,7 +17,7 @@
"classlist-polyfill": "1.0.3",
"domify": "1.4.0",
"es6-object-assign": "1.0.2",
"vex-dialog": "1.0.6"
"vex-dialog": "1.0.7"
},
"devDependencies": {
"grunt": "1.0.1",
Expand Down

0 comments on commit 4e85f68

Please sign in to comment.