diff --git a/.eslintignore b/.eslintignore index 5ea910b62c5..5fac5c84925 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,6 @@ .nuxt/ +dist/ +docs-dist/ +es/ node_modules/ nuxt/plugin.template.js diff --git a/.eslintrc.js b/.eslintrc.js index 31f1494b664..4e441528c24 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { extends: ['standard', 'plugin:vue/recommended', 'plugin:prettier/recommended'], - plugins: ['jest', 'node', 'promise'], + plugins: ['jest', 'markdown', 'node', 'promise'], parserOptions: { parser: 'babel-eslint', sourceType: 'module' @@ -14,6 +14,16 @@ module.exports = { Vue: true }, rules: { + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'never', + normal: 'never', + component: 'never' + } + } + ], 'vue/max-attributes-per-line': ['error', { singleline: 4 }], 'vue/no-template-shadow': 'off', 'vue/no-use-v-if-with-v-for': 'off', diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index c86f19f64be..d3c61a9669a 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,3 +1,8 @@ + + **Before opening an issue:** - [Search for duplicate or closed issues](https://github.com/bootstrap-vue/bootstrap-vue/issues?utf8=%E2%9C%93&q=is%3Aissue) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c58c7675fc..34da0644e85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,68 @@ guidelines. +## [v2.0.0-rc.16](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.0.0-rc.15...v2.0.0-rc.16) + +Released 2019-03-28 + +### Bug Fixes v2.0.0-rc.16 + +- **collapse/toggle:** persist toggle state on element and prevent multiple state emits (closes + [#2923](https://github.com/bootstrap-vue/bootstrap-vue/issues/2923)) + ([#2924](https://github.com/bootstrap-vue/bootstrap-vue/issues/2924)) + ([6f899fc](https://github.com/bootstrap-vue/bootstrap-vue/commit/6f899fc)) +- **docs:** drop self-closing tags + build system improvements (fixes + [#2882](https://github.com/bootstrap-vue/bootstrap-vue/issues/2882)) + ([#2893](https://github.com/bootstrap-vue/bootstrap-vue/issues/2893)) + ([310c7dc](https://github.com/bootstrap-vue/bootstrap-vue/commit/310c7dc)) +- **dropdown:** fix `no-caret` prop when dropleft (fixes + [#2909](https://github.com/bootstrap-vue/bootstrap-vue/issues/2909)) + ([#2910](https://github.com/bootstrap-vue/bootstrap-vue/issues/2910)) + ([3bef981](https://github.com/bootstrap-vue/bootstrap-vue/commit/3bef981)) +- **table:** fix broken aria-labels for sortable columns + break out code into additional mixins + + tests ([#2884](https://github.com/bootstrap-vue/bootstrap-vue/issues/2884)) + ([ddc2006](https://github.com/bootstrap-vue/bootstrap-vue/commit/ddc2006)) +- **table:** fix range selection + ([#2865](https://github.com/bootstrap-vue/bootstrap-vue/issues/2865)) + ([da49558](https://github.com/bootstrap-vue/bootstrap-vue/commit/da49558)) +- **table:** fix SSR mismatch errors + ([#2897](https://github.com/bootstrap-vue/bootstrap-vue/issues/2897)) + ([6c1940d](https://github.com/bootstrap-vue/bootstrap-vue/commit/6c1940d)) +- **utils/dom:** update closest routine to support SVG + ([#2901](https://github.com/bootstrap-vue/bootstrap-vue/issues/2901)) + ([9d4408d](https://github.com/bootstrap-vue/bootstrap-vue/commit/9d4408d)) + +### Features v2.0.0-rc.16 + +- add BOOTSTRAP_VUE_NO_WARN environment variable to hide warnings + ([#2826](https://github.com/bootstrap-vue/bootstrap-vue/issues/2826)) + ([44d0351](https://github.com/bootstrap-vue/bootstrap-vue/commit/44d0351)) +- **alert:** remove need for custom CSS for fade transition + ([#2925](https://github.com/bootstrap-vue/bootstrap-vue/issues/2925)) + ([0910b22](https://github.com/bootstrap-vue/bootstrap-vue/commit/0910b22)) +- **carousel:** add no-hover-pause prop + ([#2888](https://github.com/bootstrap-vue/bootstrap-vue/issues/2888)) + ([8a503ec](https://github.com/bootstrap-vue/bootstrap-vue/commit/8a503ec)) +- **core:** create configurable base global configuration + ([#2905](https://github.com/bootstrap-vue/bootstrap-vue/issues/2905)) + ([8018bdf](https://github.com/bootstrap-vue/bootstrap-vue/commit/8018bdf)) +- **form-checkbox/radio:** allow no label in plain mode (fixes + [#2911](https://github.com/bootstrap-vue/bootstrap-vue/issues/2911)) + ([#2912](https://github.com/bootstrap-vue/bootstrap-vue/issues/2912)) + ([6f38d9d](https://github.com/bootstrap-vue/bootstrap-vue/commit/6f38d9d)) +- **form-file:** add in prop and scoped slot for formatting selected file names + ([#2902](https://github.com/bootstrap-vue/bootstrap-vue/issues/2902)) + ([f53b5f8](https://github.com/bootstrap-vue/bootstrap-vue/commit/f53b5f8)) +- **forms:** new b-form-datalist helper component + ([#2899](https://github.com/bootstrap-vue/bootstrap-vue/issues/2899)) + ([e9a8e85](https://github.com/bootstrap-vue/bootstrap-vue/commit/e9a8e85)) +- **table:** add basic keyboard nav when table has row-clicked handler or is selctable (closes + [#2869](https://github.com/bootstrap-vue/bootstrap-vue/issues/2869)) + ([#2870](https://github.com/bootstrap-vue/bootstrap-vue/issues/2870)) + ([ddcd66a](https://github.com/bootstrap-vue/bootstrap-vue/commit/ddcd66a)) + + + ## [v2.0.0-rc.15](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.0.0-rc.14...v2.0.0-rc.15) Released: 2019-03-18 diff --git a/README.md b/README.md index d8ec6eb673c..41b48bbce05 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Thank you to all our backers! 🙏 This project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md). - +

License

diff --git a/babel.config.js b/babel.config.js index 6077262c182..5fd6a01bb25 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,28 +1,20 @@ -module.exports = { - presets: [ - [ - '@babel/env', - { - useBuiltIns: 'entry' +module.exports = api => { + const isDocs = api.env('docs') + + let presets = [] + if (!isDocs) { + presets.push(['@babel/env', { useBuiltIns: 'entry', corejs: { version: 2 } }]) + } + + return { + presets, + env: { + es: { + plugins: [['@babel/plugin-transform-modules-commonjs', { noInterop: true, loose: true }]] + }, + test: { + presets: [['@babel/env', { targets: { node: 'current' } }]] } - ] - ], - env: { - docs: { - plugins: ['@babel/plugin-transform-runtime'] - }, - es: { - plugins: [['@babel/plugin-transform-modules-commonjs', { noInterop: true, loose: true }]] - }, - test: { - presets: [ - [ - '@babel/env', - { - targets: { node: 'current' } - } - ] - ] } } } diff --git a/docs/assets/scss/styles.scss b/docs/assets/scss/styles.scss index bd7c9f77282..555410dbc19 100644 --- a/docs/assets/scss/styles.scss +++ b/docs/assets/scss/styles.scss @@ -23,8 +23,8 @@ } .bd-toc-item.active > .bd-toc-link { - color: #563d7c; - font-weight: bold; + color: #563d7c; + font-weight: bold; } .bd-toc-link, diff --git a/docs/components/anchored-heading.js b/docs/components/anchored-heading.js new file mode 100644 index 00000000000..e391ffef630 --- /dev/null +++ b/docs/components/anchored-heading.js @@ -0,0 +1,24 @@ +export default { + props: { + level: { + type: [Number, String], + default: 2 + }, + id: { + type: String, + default: '' + } + }, + render(h) { + const $anchor = h( + 'b-link', + { + staticClass: 'anchorjs-link', + attrs: { to: { hash: `#${this.id}` }, 'aria-label': 'Anchor' } + }, + [h(false)] + ) + const $content = h('span', { staticClass: 'bd-content-title' }, [this.$slots.default, $anchor]) + return h(`h${this.level}`, { attrs: { id: this.id, tabindex: '-1' } }, [$content]) + } +} diff --git a/docs/components/codemirror.vue b/docs/components/codemirror.vue index b5e2a27dd0c..623c8418831 100644 --- a/docs/components/codemirror.vue +++ b/docs/components/codemirror.vue @@ -1,5 +1,5 @@ + + +``` + +### File name formatting via scoped slot + +Alternatively, you can use the scoped slot `file-name` to render the file names. The scoped slot +will receive the following properties: + +| Property | Type | Description | +| -------- | ----- | ----------------------- | +| `files` | Array | Array of `File` objects | +| `names` | Array | Array of file names | + +Both properties are always arrays, regardless of the setting of the `multiple` prop. + +```html + + + +``` + +When using the `file-name` slot, the `file-name-formatter` prop is ignored. Also, the slot will not +be rendered when there are no file(s) selected. + ## Non custom file input You can have `` render a browser native file input by setting the `plain` prop. Note @@ -159,7 +226,7 @@ input. To take advantage of the `reset()` method, you will need to obtain a refe ```html