Skip to content

Commit c33e26e

Browse files
authored
Merge branch 'dev' into avatar-shadow
2 parents 26a5b14 + 582560f commit c33e26e

34 files changed

+302
-119
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
.now/
12
.nuxt/
3+
.vercel/
24
coverage/
35
dist/
46
docs-dist/

.github/renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"packageNames": ["core-js"],
1111
"allowedVersions": "<3.0.0"
1212
},
13+
{
14+
"packageNames": ["highlight.js"],
15+
"allowedVersions": "<10.0.0"
16+
},
1317
{
1418
"packageNames": ["prettier"],
1519
"allowedVersions": "<=1.14.3"

.github/workflows/test.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -208,31 +208,3 @@ jobs:
208208
env:
209209
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
210210
CI_BRANCH_BASE: "${{ github.base_ref }}"
211-
212-
docs:
213-
needs: setup
214-
runs-on: ${{ matrix.os }}
215-
if: github.event_name == 'push' && github.ref == 'master'
216-
217-
strategy:
218-
matrix:
219-
os: [ubuntu-latest]
220-
node: [12]
221-
222-
steps:
223-
- name: Clone repository
224-
uses: actions/checkout@v2
225-
226-
- name: Set Node.js version
227-
uses: actions/setup-node@v1
228-
with:
229-
node-version: ${{ matrix.node }}
230-
231-
- name: Restore workspace cache
232-
uses: actions/cache@v1
233-
with:
234-
path: ${{ github.workspace }}
235-
key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
236-
237-
- name: Publish docs
238-
run: yarn run docs-publish

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.idea/
2+
.now/
23
.nuxt/
4+
.vercel/
35
.vscode/
46
coverage/
57
dist/

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
.now/
12
.nuxt/
3+
.vercel/
24
coverage/
35
dist/
46
docs-dist/

docs/components/componentdoc.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
variant="secondary"
1212
target="_blank"
1313
href="https://vuejs.org/v2/guide/render-function.html#Functional-Components"
14+
class="mb-3 mb-sm-0"
1415
>
1516
Functional component
1617
</b-badge>

docs/components/footer.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444

4545
<hr>
4646

47-
<template v-if="isZeitNow && false">
47+
<template v-if="isVercel && false">
4848
<p class="mb-4 text-center">
4949
<strong class="d-block mx-auto mb-2">Hosting provided by</strong>
50-
<a href="https://zeit.co/?utm_campaign=bootstrap-vue" target="_blank" rel="noopener">
50+
<a href="https://vercel.com/?utm_campaign=bootstrap-vue" target="_blank" rel="noopener">
5151
<svg
5252
xmlns="http://www.w3.org/2000/svg"
5353
role="img"
@@ -98,12 +98,12 @@
9898
Currently v{{ version }}. Code licensed
9999
<a href="https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE" target="_blank">MIT</a>.
100100
Docs generated with
101-
<a href="https://nuxtjs.org/" target="_blank">Nuxt.js</a><template v-if="!isNetlify && !isZeitNow">.</template>
101+
<a href="https://nuxtjs.org/" target="_blank">Nuxt.js</a><template v-if="!isNetlify && !isVercel">.</template>
102102
<template v-if="isNetlify">
103103
and proudly hosted on <a href="https://www.netlify.com" target="_blank">Netlify</a>.
104104
</template>
105-
<template v-else-if="isZeitNow">
106-
and proudly hosted on <a href="https://zeit.co/?utm_campaign=bootstrap-vue" target="_blank">Zeit</a>.
105+
<template v-else-if="isVercel">
106+
and proudly hosted on <a href="https://vercel.com/?utm_campaign=bootstrap-vue" target="_blank">Vercel</a>.
107107
</template>
108108
</p>
109109
</b-container>
@@ -146,8 +146,8 @@ export default {
146146
isNetlify() {
147147
return Boolean(process.env.NETLIFY)
148148
},
149-
isZeitNow() {
150-
return Boolean(process.env.ZEIT_NOW)
149+
isVercel() {
150+
return Boolean(process.env.VERCEL_NOW)
151151
}
152152
}
153153
}

docs/components/header.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,30 +199,35 @@ export default {
199199
isNetlify() {
200200
return Boolean(process.env.NETLIFY)
201201
},
202-
isZeitNow() {
203-
return Boolean(process.env.ZEIT_NOW)
202+
isVercel() {
203+
return Boolean(process.env.VERCEL_NOW)
204204
},
205205
branchName() {
206-
return this.isZeitNow ? process.env.ZEIT_BRANCH || '' : ''
206+
// Netlify doesn't support providing the branch name
207+
return this.isVercel ? process.env.VERCEL_BRANCH || '' : ''
207208
},
208209
isDev() {
209210
// In our case, `production` is the dev branch preview (Netlify)
210211
return (
211212
(this.isNetlify && process.env.NETLIFY_CONTEXT === 'production') ||
212-
(this.isZeitNow && this.branchName === 'dev')
213+
(this.isVercel && this.branchName === 'dev')
213214
)
214215
},
215216
isPR() {
216217
return (
217218
(this.isNetlify && process.env.PULL_REQUEST && process.env.REVIEW_ID) ||
218-
(this.isZeitNow && !this.isDev && this.branchName !== 'master')
219+
(this.isVercel && !this.isDev && this.branchName !== 'master')
219220
)
220221
},
221222
prId() {
223+
// Vercel doesn't currently support returning the PR number
224+
// `REVIEW_ID` is provided by Netlify
222225
return this.isPR ? process.env.REVIEW_ID : ''
223226
},
224227
dropdownText() {
228+
// Dropdown button text
225229
if (this.isPR) {
230+
// Vercel doesn't currently support returning the PR number
226231
return this.prId ? `Pull #${this.prId}` : 'Pull Request'
227232
} else if (this.isLocal) {
228233
return 'Local Copy'

docs/constants.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,14 @@ export const NETLIFY_URL = 'https://bootstrap-vue.netlify.app'
55
export const GA_TRACKING_ID = 'UA-89526435-1'
66

77
export const TWITTER_HANDLE = '@BootstrapVue'
8+
9+
// --- Google Webmaster tools google-site-verification codes ---
10+
// bootstrap-vue.js.org
11+
// <meta name="google-site-verification" content="H9Mn7ie5Z5KJSjRfsn9nilLn5kFgn7BMEqL_sUhVpzg" />
12+
export const GWT_JS_ORG = 'H9Mn7ie5Z5KJSjRfsn9nilLn5kFgn7BMEqL_sUhVpzg'
13+
// *.bootstrap-vue.org
14+
// <meta name="google-site-verification" content="5E0vyG9CXTfY7McIt2aQppkNA6FQ3b0JJRZzhQ16HW4" />
15+
export const GWT_BV_ORG = '5E0vyG9CXTfY7McIt2aQppkNA6FQ3b0JJRZzhQ16HW4'
16+
// bootstrap-vue.netlify.app (legacy dev site)
17+
// <meta name="google-site-verification" content="Ba1MOy9bRa-r-8eLhSTEkayGbGrT3HhbNuqNiY60uzo" />
18+
export const GWT_BV_NETLIFY = 'Ba1MOy9bRa-r-8eLhSTEkayGbGrT3HhbNuqNiY60uzo'

docs/layouts/default.js

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BASE_URL } from '~/constants'
1+
import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG, GWT_BV_NETLIFY } from '~/constants'
22
import Footer from '~/components/footer'
33
import Header from '~/components/header'
44

@@ -8,15 +8,35 @@ export default {
88
return h('div', [h(Header), h('nuxt'), h(Footer)])
99
},
1010
head() {
11-
// Add canonical URL so all site variations are
12-
// indexed to the same primary URL
1311
return {
1412
link: [
13+
// Add canonical URL so all site variations are
14+
// indexed to the same primary URL
1515
{
1616
hid: 'canonical',
1717
rel: 'canonical',
1818
href: `${BASE_URL}${this.$route.path}`
1919
}
20+
],
21+
meta: [
22+
// Add GWT site verification for *.bootstrap-vue.org
23+
{
24+
hid: 'google-site-verification-bv-org',
25+
name: 'google-site-verification',
26+
content: GWT_BV_ORG
27+
},
28+
// Add GWT site verification for bootstrap-vue.js.org (legacy)
29+
{
30+
hid: 'google-site-verification-js-org',
31+
name: 'google-site-verification',
32+
content: GWT_JS_ORG
33+
},
34+
// Add GWT site verification for bootstrap-vue.netlify.app (legacy)
35+
{
36+
hid: 'google-site-verification-netlify',
37+
name: 'google-site-verification',
38+
content: GWT_BV_NETLIFY
39+
}
2040
]
2141
}
2242
}

docs/layouts/docs.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BASE_URL } from '~/constants'
1+
import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG } from '~/constants'
22
import BVBreadcrumbs from '~/components/breadcrumbs'
33
import BVFeedback from '~/components/feedback'
44
import BVFooter from '~/components/footer'
@@ -76,15 +76,29 @@ export default {
7676
return h('div', [$header, $container, $footer])
7777
},
7878
head() {
79-
// Add canonical URL so all site variations are
80-
// indexed to the same primary URL
8179
return {
8280
link: [
81+
// Add canonical URL so all site variations are
82+
// indexed to the same primary URL
8383
{
8484
hid: 'canonical',
8585
rel: 'canonical',
8686
href: `${BASE_URL}${this.$route.path}`
8787
}
88+
],
89+
meta: [
90+
// Add GWT site verification for *.bootstrap-vue.org
91+
{
92+
hid: 'google-site-verification-bv-org',
93+
name: 'google-site-verification',
94+
content: GWT_BV_ORG
95+
},
96+
// Add GWT site verification for bootstrap-vue.js.org
97+
{
98+
hid: 'google-site-verification-js-org',
99+
name: 'google-site-verification',
100+
content: GWT_JS_ORG
101+
}
88102
]
89103
}
90104
}

docs/nuxt.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,20 @@ module.exports = {
151151
PULL_REQUEST: process.env.NETLIFY ? process.env.PULL_REQUEST : null,
152152
// - If the previous is `true`, this will be the PR number
153153
REVIEW_ID: process.env.NETLIFY && process.env.PULL_REQUEST ? process.env.REVIEW_ID : null,
154-
// ENV vars provided by Zeit Now build
154+
// ENV vars provided by Vercel/Zeit Now build
155155
// https://zeit.co/docs/v2/build-step#system-environment-variables
156156
// - `true` if on Zeit Now (dev or PR)
157-
ZEIT_NOW: process.env.NOW_GITHUB_DEPLOYMENT,
157+
VERCEL_NOW: process.env.VERCEL_GITHUB_DEPLOYMENT || process.env.NOW_GITHUB_DEPLOYMENT,
158158
// - The branch name used for the deploy (i.e. `dev`, `master`, `patch-1`, etc)
159-
ZEIT_BRANCH: process.env.NOW_GITHUB_COMMIT_REF,
159+
VERCEL_BRANCH: process.env.VERCEL_GITHUB_COMMIT_REF || process.env.NOW_GITHUB_COMMIT_REF,
160160
// - The Commit SHA hash
161-
ZEIT_COMMIT_SHA: process.env.NOW_GITHUB_COMMIT_SHA,
161+
VERCEL_COMMIT_SHA: process.env.VERCEL_GITHUB_COMMIT_SHA || process.env.NOW_GITHUB_COMMIT_SHA,
162162
// - The deployment URL
163-
ZEIT_URL: process.env.NOW_URL,
163+
VERCEL_URL: process.env.VERCEL_URL || process.env.NOW_URL,
164164
// - The Github Organization (ie. bootstrap-vue)
165-
ZEIT_GITHUB_ORG: process.env.NOW_GITHUB_ORG,
165+
VERCEL_GITHUB_ORG: process.env.VERCEL_GITHUB_ORG || process.env.NOW_GITHUB_ORG,
166166
// - The repo is the organization (i.e. bootstrap-vue)
167-
ZEIT_GITHUB_REPO: process.env.NOW_GITHUB_REPO
167+
VERCEL_GITHUB_REPO: process.env.VERCEL_GITHUB_REPO || process.env.NOW_GITHUB_REPO
168168
},
169169

170170
build: {

now.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"headers": [
3+
{
4+
"source": "/(.*)",
5+
"headers": [{ "key": "X-Robots-Tag", "value": "" }]
6+
}
7+
]
8+
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@
114114
"bootstrap-icons": "^1.0.0-alpha3",
115115
"bundlewatch": "^0.2.6",
116116
"clean-css-cli": "^4.3.0",
117-
"codemirror": "^5.53.0",
117+
"codemirror": "^5.53.2",
118118
"codesandbox": "^2.1.14",
119119
"core-js": ">=2.6.5 <3.0.0",
120120
"cross-env": "^7.0.2",
121121
"eslint": "^6.8.0",
122-
"eslint-config-prettier": "^6.10.1",
122+
"eslint-config-prettier": "^6.11.0",
123123
"eslint-config-standard": "^14.1.1",
124124
"eslint-config-vue": "^2.0.2",
125125
"eslint-plugin-import": "^2.20.2",
@@ -138,16 +138,16 @@
138138
"improved-yarn-audit": "^2.0.0",
139139
"jest": "^25.4.0",
140140
"jest-environment-jsdom-fourteen": "^1.0.1",
141-
"lint-staged": "^10.1.6",
141+
"lint-staged": "^10.1.7",
142142
"loader-utils": "^2.0.0",
143143
"lodash": "^4.17.15",
144144
"marked": "^1.0.0",
145-
"node-sass": "^4.13.1",
145+
"node-sass": "^4.14.0",
146146
"nuxt": "^2.12.2",
147147
"postcss-cli": "^7.1.0",
148148
"prettier": "1.14.3",
149149
"require-context": "^1.1.0",
150-
"rollup": "^2.6.1",
150+
"rollup": "^2.7.2",
151151
"rollup-plugin-babel": "^4.4.0",
152152
"rollup-plugin-commonjs": "^10.1.0",
153153
"rollup-plugin-node-resolve": "^5.2.0",

src/_custom-controls.scss

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,19 @@
3232
// Shared BVFormBtnLabelControl styling
3333
// Currently used by BFormTimepicker and BFormDatepicker
3434
// Does not apply to button-only styling
35-
.b-form-btn-label-control {
36-
// Remove background validation images from main wrapper
35+
.b-form-btn-label-control.form-control {
36+
// Remove background validation images and padding from
37+
// main wrapper as they will be present in the inner label element
3738
background-image: none;
3839
padding: 0;
3940

41+
@at-root {
42+
// Handle input-group padding overrides
43+
.input-group & {
44+
padding: 0;
45+
}
46+
}
47+
4048
@at-root {
4149
// Prevent the button/label from reversing order on in horizontal RTL mode
4250
[dir="rtl"] &,
@@ -77,6 +85,7 @@
7785
padding-left: 0.25rem;
7886
margin: 0;
7987
border: 0;
88+
font-size: inherit;
8089
@if $enable-pointer-cursor-for-buttons {
8190
cursor: pointer;
8291
}
@@ -92,6 +101,21 @@
92101
&.form-control-lg {
93102
min-height: calc(#{$input-height-lg} - #{$input-height-border});
94103
}
104+
105+
@at-root {
106+
// Handle input group sizing
107+
.input-group.input-group-sm & {
108+
min-height: calc(#{$input-height-sm} - #{$input-height-border});
109+
padding-top: $input-padding-y-sm;
110+
padding-bottom: $input-padding-y-sm
111+
}
112+
113+
.input-group.input-group-lg & {
114+
min-height: calc(#{$input-height-lg} - #{$input-height-border});
115+
padding-top: $input-padding-y-lg;
116+
padding-bottom: $input-padding-y-lg
117+
}
118+
}
95119
}
96120

97121
// Disabled and read-only styling

src/components/avatar/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,19 @@ appearance, or if using custom icons or SVGs e.g.:
142142
<b-avatar><custom-icon></custom-icon></b-avatar>
143143
```
144144

145+
**Multi-line text example:**
146+
147+
```html
148+
<template>
149+
<div class="mb-2">
150+
<b-avatar size="4em">Hello<br>World</b-avatar>
151+
<b-avatar size="4em">你好<br>世界</b-avatar>
152+
</div>
153+
</template>
154+
155+
<!-- b-avatar-default-slot-multi-line.vue -->
156+
```
157+
145158
**Notes:**
146159

147160
- The default slot takes precedence over the `text`, `src` and `icon` props.

0 commit comments

Comments
 (0)