Skip to content

Commit 01efdae

Browse files
authored
Merge branch 'dev' into dev
2 parents b4f85dd + ea0273e commit 01efdae

File tree

10 files changed

+23443
-2489
lines changed

10 files changed

+23443
-2489
lines changed

.bundlewatch.config.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
"files": [
33
{
44
"path": "./dist/bootstrap-vue-icons.js",
5-
"maxSize": "75 kB"
5+
"maxSize": "105 kB"
66
},
77
{
88
"path": "./dist/bootstrap-vue-icons.min.js",
9-
"maxSize": "70 kB"
9+
"maxSize": "100 kB"
1010
},
1111
{
1212
"path": "./dist/bootstrap-vue-icons.common.js",
13-
"maxSize": "80 kB"
13+
"maxSize": "110 kB"
1414
},
1515
{
1616
"path": "./dist/bootstrap-vue-icons.common.min.js",
17-
"maxSize": "75 kB"
17+
"maxSize": "105 kB"
1818
},
1919
{
2020
"path": "./dist/bootstrap-vue-icons.esm.js",
21-
"maxSize": "80 kB"
21+
"maxSize": "110 kB"
2222
},
2323
{
2424
"path": "./dist/bootstrap-vue-icons.esm.min.js",
25-
"maxSize": "75 kB"
25+
"maxSize": "105 kB"
2626
},
2727
{
2828
"path": "./dist/bootstrap-vue-icons.css",
@@ -42,19 +42,19 @@
4242
},
4343
{
4444
"path": "./dist/bootstrap-vue.common.js",
45-
"maxSize": "275 kB"
45+
"maxSize": "305 kB"
4646
},
4747
{
4848
"path": "./dist/bootstrap-vue.common.min.js",
49-
"maxSize": "165 kB"
49+
"maxSize": "190 kB"
5050
},
5151
{
5252
"path": "./dist/bootstrap-vue.esm.js",
53-
"maxSize": "270 kB"
53+
"maxSize": "300 kB"
5454
},
5555
{
5656
"path": "./dist/bootstrap-vue.esm.min.js",
57-
"maxSize": "160 kB"
57+
"maxSize": "190 kB"
5858
},
5959
{
6060
"path": "./dist/bootstrap-vue.css",

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,36 +95,36 @@
9595
"vue-functional-data-merge": "^3.1.0"
9696
},
9797
"devDependencies": {
98-
"@babel/cli": "^7.10.3",
99-
"@babel/core": "^7.10.3",
100-
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
101-
"@babel/plugin-transform-runtime": "^7.10.3",
102-
"@babel/preset-env": "^7.10.3",
103-
"@babel/standalone": "^7.10.3",
98+
"@babel/cli": "^7.10.5",
99+
"@babel/core": "^7.10.5",
100+
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
101+
"@babel/plugin-transform-runtime": "^7.10.5",
102+
"@babel/preset-env": "^7.10.4",
103+
"@babel/standalone": "^7.10.5",
104104
"@nuxtjs/google-analytics": "^2.3.0",
105105
"@nuxtjs/pwa": "^3.0.0-beta.20",
106106
"@nuxtjs/robots": "^2.4.2",
107107
"@nuxtjs/sitemap": "^2.4.0",
108-
"@testing-library/jest-dom": "^5.11.0",
108+
"@testing-library/jest-dom": "^5.11.1",
109109
"@vue/test-utils": "^1.0.3",
110-
"autoprefixer": "^9.8.4",
110+
"autoprefixer": "^9.8.5",
111111
"babel-core": "^7.0.0-bridge.0",
112112
"babel-eslint": "^10.1.0",
113113
"babel-jest": "^26.1.0",
114114
"babel-plugin-istanbul": "^6.0.0",
115-
"bootstrap-icons": "^1.0.0-alpha4",
115+
"bootstrap-icons": "^1.0.0-alpha5",
116116
"bundlewatch": "^0.2.7",
117117
"clean-css-cli": "^4.3.0",
118118
"codemirror": "^5.55.0",
119119
"codesandbox": "^2.1.16",
120120
"core-js": ">=2.6.5 <3.0.0",
121121
"cross-env": "^7.0.2",
122-
"eslint": "^7.3.1",
122+
"eslint": "^7.4.0",
123123
"eslint-config-prettier": "^6.11.0",
124124
"eslint-config-standard": "^14.1.1",
125125
"eslint-config-vue": "^2.0.2",
126-
"eslint-plugin-import": "^2.21.2",
127-
"eslint-plugin-jest": "^23.17.1",
126+
"eslint-plugin-import": "^2.22.0",
127+
"eslint-plugin-jest": "^23.18.0",
128128
"eslint-plugin-markdown": "^1.0.2",
129129
"eslint-plugin-node": "^11.1.0",
130130
"eslint-plugin-prettier": "^3.1.4",
@@ -139,22 +139,22 @@
139139
"jest": "^26.1.0",
140140
"lint-staged": "^10.2.11",
141141
"loader-utils": "^2.0.0",
142-
"lodash": "^4.17.15",
143-
"marked": "^1.1.0",
142+
"lodash": "^4.17.19",
143+
"marked": "^1.1.1",
144144
"node-sass": "^4.14.1",
145-
"nuxt": "^2.13.1",
145+
"nuxt": "^2.13.3",
146146
"postcss-cli": "^7.1.1",
147147
"prettier": "1.14.3",
148148
"require-context": "^1.1.0",
149-
"rollup": "^2.18.0",
149+
"rollup": "^2.21.0",
150150
"rollup-plugin-babel": "^4.4.0",
151151
"rollup-plugin-commonjs": "^10.1.0",
152152
"rollup-plugin-node-resolve": "^5.2.0",
153-
"sass-loader": "^9.0.1",
154-
"standard-version": "^8.0.0",
153+
"sass-loader": "^9.0.2",
154+
"standard-version": "^8.0.2",
155155
"terser": "^4.8.0",
156156
"vue": "^2.6.11",
157-
"vue-jest": "^3.0.5",
157+
"vue-jest": "^3.0.6",
158158
"vue-router": "^3.3.4",
159159
"vue-server-renderer": "^2.6.11",
160160
"vue-template-compiler": "^2.6.11"

src/components/form-tags/form-tags.js

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ import identity from '../../utils/identity'
66
import looseEqual from '../../utils/loose-equal'
77
import { arrayIncludes, concat } from '../../utils/array'
88
import { getComponentConfig } from '../../utils/config'
9-
import { attemptBlur, attemptFocus, matches, requestAF, select } from '../../utils/dom'
9+
import {
10+
attemptBlur,
11+
attemptFocus,
12+
closest,
13+
isActiveElement,
14+
matches,
15+
requestAF,
16+
select
17+
} from '../../utils/dom'
1018
import { isEvent, isFunction, isString } from '../../utils/inspect'
1119
import { escapeRegExp, toString, trim, trimLeft } from '../../utils/string'
1220
import idMixin from '../../mixins/id'
@@ -178,6 +186,12 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({
178186
type: Boolean,
179187
default: false
180188
},
189+
ignoreInputFocusSelector: {
190+
// Disable the input focus behavior when clicking
191+
// on element matching the selector (or selectors)
192+
type: [Array, String],
193+
default: () => ['.b-form-tag', 'button', 'input', 'select']
194+
},
181195
value: {
182196
// The v-model prop
183197
type: Array,
@@ -245,6 +259,13 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({
245259
const joiner = this.computedSeparator.charAt(0)
246260
return joiner !== ' ' ? `${joiner} ` : joiner
247261
},
262+
computeIgnoreInputFocusSelector() {
263+
// Normalize to an single selector with selectors separated by `,`
264+
return concat(this.ignoreInputFocusSelector)
265+
.filter(identity)
266+
.join(',')
267+
.trim()
268+
},
248269
disableAddButton() {
249270
// If 'Add' button should be disabled
250271
// If the input contains at least one tag that can
@@ -416,7 +437,13 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({
416437
},
417438
// --- Wrapper event handlers ---
418439
onClick(evt) {
419-
if (!this.disabled && isEvent(evt) && evt.target === evt.currentTarget) {
440+
const ignoreFocusSelector = this.computeIgnoreInputFocusSelector
441+
const { target } = evt
442+
if (
443+
!this.disabled &&
444+
!isActiveElement(target) &&
445+
(!ignoreFocusSelector || !closest(ignoreFocusSelector, target, true))
446+
) {
420447
this.$nextTick(() => {
421448
this.focus()
422449
})
@@ -630,8 +657,7 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({
630657
staticClass: 'list-unstyled mt-n1 mb-0 d-flex flex-wrap align-items-center',
631658
attrs: { id: tagListId }
632659
},
633-
// `concat()` is faster than array spread when args are known to be arrays
634-
concat($tags, $field)
660+
[$tags, $field]
635661
)
636662

637663
// Assemble the feedback
@@ -792,12 +818,12 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({
792818
'aria-describedby': this.safeId('_selected_')
793819
},
794820
on: {
821+
click: this.onClick,
795822
focusin: this.onFocusin,
796-
focusout: this.onFocusout,
797-
click: this.onClick
823+
focusout: this.onFocusout
798824
}
799825
},
800-
concat($output, $removed, $content, $hidden)
826+
[$output, $removed, $content, $hidden]
801827
)
802828
}
803829
})

src/components/form-tags/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@
110110
{
111111
"prop": "noOuterFocus",
112112
"description": "When set, disables the focus styling of the component root element"
113+
},
114+
{
115+
"prop": "ignoreInputFocusSelector",
116+
"version": "2.16.0",
117+
"description": "Ignore certain elements from the click to focus input routine, specified by css selector(s)"
113118
}
114119
],
115120
"slots": [

src/components/input-group/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ wrapped in these components for proper styling.
9797

9898
<b-input-group-append>
9999
<b-button variant="outline-secondary">Button</b-button>
100-
<b-button variant="outline-secondary">Button</b-button>
100+
<b-button variant="outline-primary">Button</b-button>
101+
<b-input-group-text>
102+
<b-icon icon="x" />
103+
</b-input-group-text>
101104
</b-input-group-append>
102105
</b-input-group>
103106
</div>
@@ -107,7 +110,8 @@ wrapped in these components for proper styling.
107110

108111
Set the `is-text` prop on `<b-input-group-prepend>` or `<b-input-group-append>` if the content is
109112
textual in nature to apply proper styling. Alternatively, place the `<b-input-group-text>`
110-
subcomponent inside of the `<b-input-group-prepend>` or `<b-input-group-append>`.
113+
subcomponent inside of the `<b-input-group-prepend>` or `<b-input-group-append>`. This also applies
114+
when you want to use on of [BootstrapVue's icons](/docs/icons).
111115

112116
## Supported form-controls
113117

0 commit comments

Comments
 (0)