diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json new file mode 100644 index 00000000000..04027852ea9 --- /dev/null +++ b/.bundlewatch.config.json @@ -0,0 +1,71 @@ +{ + "files": [ + { + "path": "./dist/bootstrap-vue-icons.js", + "maxSize": "60 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.min.js", + "maxSize": "55 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.common.js", + "maxSize": "65 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.common.min.js", + "maxSize": "60 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.esm.js", + "maxSize": "65 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.esm.min.js", + "maxSize": "60 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.css", + "maxSize": "1.5 kB" + }, + { + "path": "./dist/bootstrap-vue-icons.min.css", + "maxSize": "1 kB" + }, + { + "path": "./dist/bootstrap-vue.js", + "maxSize": "230 kB" + }, + { + "path": "./dist/bootstrap-vue.min.js", + "maxSize": "100 kB" + }, + { + "path": "./dist/bootstrap-vue.common.js", + "maxSize": "260 kB" + }, + { + "path": "./dist/bootstrap-vue.common.min.js", + "maxSize": "145 kB" + }, + { + "path": "./dist/bootstrap-vue.esm.js", + "maxSize": "260 kB" + }, + { + "path": "./dist/bootstrap-vue.esm.min.js", + "maxSize": "145 kB" + }, + { + "path": "./dist/bootstrap-vue.css", + "maxSize": "15 kB" + }, + { + "path": "./dist/bootstrap-vue.min.css", + "maxSize": "10 kB" + } + ], + "ci": { + "trackBranches": ["master", "dev"] + } +} diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 68c15216797..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,114 +0,0 @@ -version: 2 - -defaults: &defaults - working_directory: ~/project - docker: - - image: circleci/node:latest - environment: - NODE_ENV: test - NODE_OPTIONS: --max_old_space_size=4096 - -jobs: - # -------------------------------------------------------------------------- - # Phase 1: Setup - # -------------------------------------------------------------------------- - setup: - <<: *defaults - steps: - # Checkout repository - - checkout - - # Restore cache - - restore_cache: - key: lock-{{ checksum "yarn.lock" }} - - # Install dependencies - - run: - name: Install dependencies - command: yarn --frozen-lockfile --non-interactive - - # Save cache - - save_cache: - key: lock-{{ checksum "yarn.lock" }} - paths: - - node_modules - - # Persist workspace - - persist_to_workspace: - root: ~/project - paths: - - node_modules - - # -------------------------------------------------------------------------- - # Phase 2: Lint + Audit + Build Nuxt and fixtures - # -------------------------------------------------------------------------- - lint: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Lint - command: yarn lint - - audit: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Security audit - command: yarn audit - - build: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Build - command: yarn build - - # -------------------------------------------------------------------------- - # Phase 3: Tests - # -------------------------------------------------------------------------- - test: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Tests - command: yarn test -w=2 --coverage && yarn codecov - - # -------------------------------------------------------------------------- - # Phase 4: Publish docs (master branch only) - # -------------------------------------------------------------------------- - docs: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - run: - name: Publish docs - command: yarn docs-publish - -# Workflow definition -workflows: - version: 2 - - # Build and test after each commit - commit: - jobs: - - setup - - lint: { requires: [setup] } - # - audit: { requires: [setup] } - - build: { requires: [setup] } - - lint: { requires: [setup] } - - test: { requires: [setup] } - - docs: { requires: [setup], filters: { branches: { only: [master] } } } diff --git a/.eslintignore b/.eslintignore index 9348be6b01b..d4f1f0b75d8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1,8 @@ .nuxt/ +coverage/ dist/ docs-dist/ esm/ -es/ node_modules/ nuxt/plugin.*.js +sw.js diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md b/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md index 959612282b1..2c8a731ed4c 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md @@ -37,7 +37,7 @@ A clear and concise description of what you expected to happen. If applicable, add a minimal demo link to help explain your problem. Some options for that are [CodePen](https://codepen.io/), [CodeSandbox](https://codesandbox.io/), [JS Bin](https://jsbin.com/) or [JSFiddle](https://jsfiddle.net/). -You can also export markup from the [Online Playground](https://bootstrap-vue.js.org/play) to _CodePen_, _CodeSandbox_ or _JSFiddle_. +You can also export markup from the [Online Playground](https://bootstrap-vue.org/play) to _CodePen_, _CodeSandbox_ or _JSFiddle_. ### Additional context diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0cf04588611..b07f6a1582b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,32 +8,33 @@ A clear and concise description of what the pull request does. **What kind of change does this PR introduce?** (check at least one) -- [ ] Bugfix -- [ ] Feature -- [ ] Enhancement -- [ ] ARIA accessibility -- [ ] Documentation update +- [ ] Bugfix (fixes a boo-boo in the code) - `fix(...)`, requires a patch version update +- [ ] Feature (adds a new feature to BootstrapVue) - `feat(...)`, requires a minor version update +- [ ] Enhancement (augments an existing feature) - `feat(...)`, requires a minor version update +- [ ] ARIA accessibility (fixes or improves ARIA accessibility) - `fix(...)`, requires a patch or minor version update +- [ ] Documentation update (improves documentation or typo fixes) - `chore(docs)`, requires a patch version update - [ ] Other (please describe) **Does this PR introduce a breaking change?** (check one) - [ ] No -- [ ] Yes (please describe) +- [ ] Yes (please describe since breaking changes require a minor version update) **The PR fulfills these requirements:** - [ ] It's submitted to the `dev` branch, **not** the `master` branch - [ ] When resolving a specific issue, it's referenced in the PR's title (i.e. `[...] (fixes #xxx[,#xxx])`, where "xxx" is the issue number) - [ ] It should address only one issue or feature. If adding multiple features or fixing a bug and adding a new feature, break them into separate PRs if at all possible. -- [ ] The title should follow the [**Conventional Commits**](https://www.conventionalcommits.org/) naming convention (i.e. `fix(alert): not alerting during SSR render`, `docs(badge): update pill examples`, `chore(docs): fix typo in README`, etc). **This is very important, as the `CHANGELOG` is generated from these messages.** +- [ ] The title should follow the [**Conventional Commits**](https://www.conventionalcommits.org/) naming convention (i.e. `fix(alert): not alerting during SSR render`, `docs(badge): update pill examples`, `chore(docs): fix typo in README`, etc). **This is very important, as the `CHANGELOG` is generated from these messages, and determines the next version type (patch or minor).** **If new features/enhancement/fixes are added or changed:** -- [ ] Includes documentation updates (including updating the component's `package.json` for slot and event changes) +- [ ] Includes documentation updates +- [ ] Includes component package.json meta section updates (prop, slot and event changes/updates) - [ ] Includes any needed TypeScript declaration file updates -- [ ] New/updated tests are included and passing (if required) +- [ ] New/updated tests are included and passing (required for new features and enhancements) - [ ] Existing test suites are passing -- [ ] CodeCov for patch has met target +- [ ] CodeCov for patch has met target (all changes/updates have been tested) - [ ] The changes have not impacted the functionality of other components or directives - [ ] ARIA Accessibility has been taken into consideration (Does it affect screen reader users or keyboard only users? Clickable items should be in the tab index, etc.) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..ca8e8197411 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,238 @@ +name: Tests + +on: + push: + branches: + - dev + - master + pull_request: + branches: + - dev + - master + +jobs: + setup: + runs-on: ${{ matrix.os }} + if: github.event_name == 'push' || !(github.base_ref == 'master' && github.head_ref == 'dev') + + strategy: + matrix: + os: [ubuntu-latest] + node: [10, 12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache node_modules + uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('yarn.lock') }} + ${{ runner.OS }}-node-v${{ matrix.node }}- + ${{ runner.OS }}- + + - name: Install dependencies + run: yarn install --check-files --frozen-lockfile --non-interactive + + - name: Cache workspace + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + lint: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Lint + run: yarn run test:lint + + audit: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Audit + run: yarn run audit + + test-unit: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [10, 12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Test unit + run: yarn run test:unit --coverage --maxWorkers=2 + + - name: CodeCov + uses: codecov/codecov-action@v1 + if: matrix.node == '10' + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + + build: + needs: setup + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Build + run: yarn run build + + - name: Upload build files + uses: actions/upload-artifact@v1 + with: + name: build-files + path: dist + + bundlewatch: + needs: build + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Download build files + uses: actions/download-artifact@v1 + with: + name: build-files + path: dist + + - name: BundleWatch + run: yarn run bundlewatch + env: + BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}" + CI_BRANCH_BASE: "${{ github.base_ref }}" + + docs: + needs: setup + runs-on: ${{ matrix.os }} + if: github.event_name == 'push' && github.ref == 'master' + + strategy: + matrix: + os: [ubuntu-latest] + node: [12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Restore workspace cache + uses: actions/cache@v1 + with: + path: ${{ github.workspace }} + key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} + + - name: Publish docs + run: yarn run docs-publish diff --git a/.gitignore b/.gitignore index 25ce638276c..3910aea3ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -*.iml -*.log -*.swp -.DS_Store .idea/ .nuxt/ .vscode/ @@ -9,7 +5,10 @@ coverage/ dist/ docs-dist/ esm/ -es/ node_modules/ +*.iml +*.log +*.swp +.DS_Store sw.js workbox*.js* diff --git a/.prettierignore b/.prettierignore index 41ded7ff67a..0febdfb7bd5 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,8 +1,8 @@ .nuxt/ +coverage/ dist/ docs-dist/ esm/ -es/ node_modules/ nuxt/plugin.template.js nuxt/plugin.prod.js diff --git a/CHANGELOG-OLD.md b/CHANGELOG-OLD.md index fb4cab34e9c..5c95794070d 100644 --- a/CHANGELOG-OLD.md +++ b/CHANGELOG-OLD.md @@ -2454,8 +2454,7 @@ Notable changes: v1.0.0 introduces a new source code structure. For those users that are importing individual components, the path to the individual components has changed. Please reference the [GitHub repo](https://github.com/bootstrap-vue/bootstrap-vue/) and -[documentation](https://bootstrap-vue.js.org/docs) for the new structure and information on -importing. +[documentation](https://bootstrap-vue.org/docs) for the new structure and information on importing. ### Bug Fixes v1.0.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a38b92d55b..dff6fe666ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,68 @@ > All notable changes to this project will be documented in this file. + + +## [v2.12.0](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.11.0...v2.12.0) + +Released: 2020-04-20 + +### Features v2.12.0 + +- **b-avatar:** add support for badges on avatars + ([#5124](https://github.com/bootstrap-vue/bootstrap-vue/issues/5124)) + ([a2e465b](https://github.com/bootstrap-vue/bootstrap-vue/commit/a2e465b6457cabb88e42bcefd86a86e36c4602de)) +- **b-avatar:** if `variant` is empty string, then remove spacing around image (closes + [#5154](https://github.com/bootstrap-vue/bootstrap-vue/issues/5154)) + ([#5156](https://github.com/bootstrap-vue/bootstrap-vue/issues/5156)) + ([7ff87fc](https://github.com/bootstrap-vue/bootstrap-vue/commit/7ff87fc560a2ad005bdca394cccf1fafa9d5e696)) +- **b-calendar, b-form-datepicker:** add prop `weekday-header-format` to specify weekday header + length (closes [#5171](https://github.com/bootstrap-vue/bootstrap-vue/issues/5171)) + ([#5175](https://github.com/bootstrap-vue/bootstrap-vue/issues/5175)) + ([8241644](https://github.com/bootstrap-vue/bootstrap-vue/commit/8241644477b174042bb163ba1741c3066165d9f9)) +- **b-calendar, b-form-datepicker:** add scoped slots for date navigation buttons (closes + [#5117](https://github.com/bootstrap-vue/bootstrap-vue/issues/5117)) + ([#5147](https://github.com/bootstrap-vue/bootstrap-vue/issues/5147)) + ([5f69864](https://github.com/bootstrap-vue/bootstrap-vue/commit/5f69864497a13a9b18a96b508af6b9ba89a43add)) +- **b-form-datepicker:** add pass through prop `date-info-fn` (closes + [#4826](https://github.com/bootstrap-vue/bootstrap-vue/issues/4826)) + ([#5150](https://github.com/bootstrap-vue/bootstrap-vue/issues/5150)) + ([bf35f80](https://github.com/bootstrap-vue/bootstrap-vue/commit/bf35f80d1c4619cf4494dc8a6256d093140d4052)) +- **b-form-rating:** new `b-form-rating` custom component + ([#5132](https://github.com/bootstrap-vue/bootstrap-vue/issues/5132)) + ([30ad7fe](https://github.com/bootstrap-vue/bootstrap-vue/commit/30ad7fe746cd6187311c86319abf6e9519b81f15)) +- **b-sidebar:** add optional backdrop support + ([#5182](https://github.com/bootstrap-vue/bootstrap-vue/issues/5182)) + ([c6375e5](https://github.com/bootstrap-vue/bootstrap-vue/commit/c6375e5513cb0ec33a9bc9fc894a123d74cf7768)) +- **custom components:** avoid using padding/margin utility classes where possible (closes + [#5117](https://github.com/bootstrap-vue/bootstrap-vue/issues/5117)) + ([#5121](https://github.com/bootstrap-vue/bootstrap-vue/issues/5121)) + ([8c6cfe0](https://github.com/bootstrap-vue/bootstrap-vue/commit/8c6cfe0af919a4e54667bcb4b29d2ba6b6576b67)) +- **icons:** new `throb` and `fade` animations + ([#5122](https://github.com/bootstrap-vue/bootstrap-vue/issues/5122)) + ([bc0117c](https://github.com/bootstrap-vue/bootstrap-vue/commit/bc0117cc794c948b202daf2e17f22eb4c36235cc)) + +### Bug Fixes v2.12.0 + +- **b-alert:** fix memory leak by using the correct method to clear the countdown timeout + ([#5158](https://github.com/bootstrap-vue/bootstrap-vue/issues/5158)) + ([7a7f33d](https://github.com/bootstrap-vue/bootstrap-vue/commit/7a7f33d74f906e5feecf2bf177636c7f85bc4537)) +- **b-avatar:** fix button type font size inheritance + ([#5177](https://github.com/bootstrap-vue/bootstrap-vue/issues/5177)) + ([441ebdc](https://github.com/bootstrap-vue/bootstrap-vue/commit/441ebdc8a262c6c6ed494ddc6a6c0c06604045ef)) +- **b-calendar:** use `Intl.NumberFormat` for formatting the number in the date buttons (closes + [#5171](https://github.com/bootstrap-vue/bootstrap-vue/issues/5171)) + ([#5179](https://github.com/bootstrap-vue/bootstrap-vue/issues/5179)) + ([cbf2cd0](https://github.com/bootstrap-vue/bootstrap-vue/commit/cbf2cd007cce81a5f664fa649b08af6735fe16e4)) +- **b-form-datepicker:** make datepicker respect `no-highlight-today` prop + ([#5159](https://github.com/bootstrap-vue/bootstrap-vue/issues/5159)) + ([c4ead33](https://github.com/bootstrap-vue/bootstrap-vue/commit/c4ead3302b176e4a90fbfcfe6380de0edc22640f)) + +### Other v2.12.0 + +- documentation updates +- dev dependency updates + ## [v2.11.0](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.10.1...v2.11.0) @@ -901,8 +963,8 @@ Read the following migration guide for more details. `$bv-popover-color-level` have been removed. Use variables `$b-popover-bg-level`, `$b-popover-border-level`, and `$b-popover-color-level` (respectively) instead. -Please refer to the [documentation](https://bootstrap-vue.js.org/) for the latest usage and -examples, and below for a list of fixes and new features. +Please refer to the [documentation](https://bootstrap-vue.org/) for the latest usage and examples, +and below for a list of fixes and new features. ### Bug Fixes v2.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab7bc6ccc0b..3f2fe93edb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ ## Playground & Issue reports If you want to play with BootstrapVue components without any local setup just head to our -[Online Playground](https://bootstrap-vue.js.org/play) and you can interactively play and test +[Online Playground](https://bootstrap-vue.org/play) and you can interactively play and test components with a fresh Vue instance. If you want to keep your changes or make PRs reporting a component's misbehaviour you can save them to _CodePen_, _CodeSandbox_ or _JSFiddle_ and provide that link in issues. diff --git a/README.md b/README.md index 14f94efb4ab..3912462cebc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

@@ -22,8 +22,8 @@ Vue.js version - - CircleCI status + + Build status Dependencies status @@ -55,8 +55,8 @@

Links

-- 📘 [Documentation](https://bootstrap-vue.js.org) -- 🔨 [Release Notes](https://bootstrap-vue.js.org/docs/misc/changelog) +- 📘 [Documentation](https://bootstrap-vue.org) +- 🔨 [Release Notes](https://bootstrap-vue.org/docs/reference/changelog) - 💬 [Discord Chat](https://discord.gg/j2Mtcny) - 🐦 [Twitter](https://twitter.com/BootstrapVue) diff --git a/docs/assets/scss/styles.scss b/docs/assets/scss/styles.scss index a929d693424..127fbfa05fe 100644 --- a/docs/assets/scss/styles.scss +++ b/docs/assets/scss/styles.scss @@ -270,8 +270,8 @@ table#table-transition-example { } } -// `` overrides for docs -.b-sidebar { +// `` overrides for docs examples +.b-sidebar-outer { z-index: 1071; } diff --git a/docs/components/bv-logo.vue b/docs/components/bv-logo.vue new file mode 100644 index 00000000000..2345b42e0dd --- /dev/null +++ b/docs/components/bv-logo.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue index f176cf43557..d9efc87f625 100644 --- a/docs/components/componentdoc.vue +++ b/docs/components/componentdoc.vue @@ -97,7 +97,7 @@ diff --git a/docs/plugins/docs-mixin.js b/docs/plugins/docs-mixin.js index 663bfd2bd17..92893c8f94c 100644 --- a/docs/plugins/docs-mixin.js +++ b/docs/plugins/docs-mixin.js @@ -27,8 +27,6 @@ export default { section = 'Directives' } else if (/^docs-reference/.test(routeName)) { section = 'Reference' - } else if (/^docs-misc/.test(routeName)) { - section = 'Miscellaneous' } return [title, section, 'BootstrapVue'].filter(Boolean).join(' | ') }, diff --git a/docs/plugins/docs.js b/docs/plugins/docs.js index b691fd811b2..8bf74c80863 100644 --- a/docs/plugins/docs.js +++ b/docs/plugins/docs.js @@ -1,10 +1,3 @@ -// Extract docs into main chunk -// import '../../components' -// import '../../directives' -// import '../../reference' -// import '../../layout' -// import '../../misc' - // Disable vue global error handler import Vue from 'vue' diff --git a/package.json b/package.json index 433d1a98db0..52ccc19f3dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bootstrap-vue", - "version": "2.11.0", + "version": "2.12.0", "description": "BootstrapVue, with more than 85 custom components, over 45 plugins, several custom directives, and over 300 icons, provides one of the most comprehensive implementations of Bootstrap v4 components and grid system for Vue.js. With extensive and automated WAI-ARIA accessibility markup.", "main": "dist/bootstrap-vue.common.js", "web": "dist/bootstrap-vue.js", @@ -11,7 +11,7 @@ "style": "dist/bootstrap-vue.css", "license": "MIT", "repository": "bootstrap-vue/bootstrap-vue", - "homepage": "https://bootstrap-vue.js.org", + "homepage": "https://bootstrap-vue.org", "types": "src/index.d.ts", "web-types": "dist/web-types.json", "vetur": { @@ -49,32 +49,33 @@ } ], "files": [ - "src", "dist", - "nuxt", "esm", - "es", - "types" + "nuxt", + "src" ], "sideEffects": [ - "**/*.scss", "**/*.css", + "**/*.scss", "**/*.vue", "./docs", "./types" ], "scripts": { + "audit": "improved-yarn-audit --ignore-dev-deps --min-severity moderate -e 1488", "build": "scripts/build.sh", - "watch": "rollup -c scripts/rollup.config.js --watch", + "bundlewatch": "bundlewatch --config .bundlewatch.config.json", + "docs-build": "cross-env NODE_ENV=docs nuxt build -c docs/nuxt.config.js", "docs-dev": "cross-env NODE_ENV=docs nuxt dev -c docs/nuxt.config.js", "docs-gen": "cross-env NODE_ENV=docs nuxt generate -c docs/nuxt.config.js", - "docs-build": "cross-env NODE_ENV=docs nuxt build -c docs/nuxt.config.js", - "docs-publish": "scripts/docs-publish.sh", - "test": "jest", "lint": "eslint --ext .js,.md,.vue ./", + "postinstall": "opencollective || exit 0", "prettify": "prettier --write '**/*.{js,json,md,scss,ts,vue}'", - "release": "npm run prettify && npm run test && npm run build && standard-version", - "postinstall": "opencollective || exit 0" + "release": "yarn run prettify && yarn run test && yarn run build && standard-version", + "test": "yarn run test:lint && yarn run test:unit", + "test:lint": "yarn run lint", + "test:unit": "jest", + "watch": "rollup -c scripts/rollup.config.js --watch" }, "husky": { "hooks": { @@ -108,13 +109,13 @@ "autoprefixer": "^9.7.6", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.1.0", - "babel-jest": "^25.2.6", + "babel-jest": "^25.4.0", "babel-plugin-istanbul": "^6.0.0", "bootstrap-icons": "^1.0.0-alpha3", + "bundlewatch": "^0.2.6", "clean-css-cli": "^4.3.0", - "codecov": "^3.6.5", "codemirror": "^5.52.2", - "codesandbox": "^2.1.12", + "codesandbox": "^2.1.14", "core-js": ">=2.6.5 <3.0.0", "cross-env": "^7.0.2", "eslint": "^6.8.0", @@ -125,7 +126,7 @@ "eslint-plugin-jest": "^23.8.2", "eslint-plugin-markdown": "^1.0.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "eslint-plugin-vue": "^6.2.2", @@ -133,10 +134,11 @@ "gh-pages": "^2.2.0", "highlight.js": "^9.18.1", "html-loader": "^1.1.0", - "husky": "^4.2.3", - "jest": "^25.2.7", + "husky": "^4.2.5", + "improved-yarn-audit": "^2.0.0", + "jest": "^25.4.0", "jest-environment-jsdom-fourteen": "^1.0.1", - "lint-staged": "^10.1.2", + "lint-staged": "^10.1.6", "loader-utils": "^2.0.0", "lodash": "^4.17.15", "marked": "^0.8.2", @@ -145,13 +147,13 @@ "postcss-cli": "^7.1.0", "prettier": "1.14.3", "require-context": "^1.1.0", - "rollup": "^2.3.4", + "rollup": "^2.6.1", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-node-resolve": "^5.2.0", "sass-loader": "^8.0.2", "standard-version": "^7.1.0", - "terser": "^4.6.10", + "terser": "^4.6.11", "vue": "^2.6.11", "vue-jest": "^3.0.5", "vue-router": "^3.1.6", diff --git a/scripts/docs-publish.sh b/scripts/docs-publish.sh deleted file mode 100755 index 7c509ebcb51..00000000000 --- a/scripts/docs-publish.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e - -git config --global user.email vuebootstrap@gmail.com -git config --global user.name BootstrapVue - -# Generate the docs -yarn docs-gen - -# Publish the docs -gh-pages -t -d docs-dist -b master -r git@github.com:bootstrap-vue/bootstrap-vue.github.io.git diff --git a/scripts/icons.scss b/scripts/icons.scss index 22cce96a65d..99a89b8bfee 100644 --- a/scripts/icons.scss +++ b/scripts/icons.scss @@ -1,5 +1,5 @@ /*! - * BootstrapVue Icons Custom CSS (https://bootstrap-vue.js.org) + * BootstrapVue Icons Custom CSS (https://bootstrap-vue.org) */ // Include Bootstrap functions, variables, and mixins diff --git a/scripts/index.scss b/scripts/index.scss index 0d866200141..048cf52cb07 100644 --- a/scripts/index.scss +++ b/scripts/index.scss @@ -1,5 +1,5 @@ /*! - * BootstrapVue Custom CSS (https://bootstrap-vue.js.org) + * BootstrapVue Custom CSS (https://bootstrap-vue.org) */ // Include Bootstrap functions, variables, and mixins diff --git a/src/_custom-controls.scss b/src/_custom-controls.scss index f88e1adeb43..48d85e792ea 100644 --- a/src/_custom-controls.scss +++ b/src/_custom-controls.scss @@ -31,9 +31,11 @@ // Shared BVFormBtnLabelControl styling // Currently used by BFormTimepicker and BFormDatepicker +// Does not apply to button-only styling .b-form-btn-label-control { // Remove background validation images from main wrapper background-image: none; + padding: 0; @at-root { // Prevent the button/label from reversing order on in horizontal RTL mode @@ -51,6 +53,7 @@ line-height: 1; font-size: inherit; box-shadow: none !important; + border: 0; &:disabled { pointer-events: none; @@ -65,10 +68,15 @@ color: $form-feedback-invalid-color; } + > .dropdown-menu { + padding: 0.5rem; + } + > label { - // Unfortunately this is not supported by all browsers :( - // text-align: end; outline: 0; + padding-left: 0.25rem; + margin: 0; + border: 0; @if $enable-pointer-cursor-for-buttons { cursor: pointer; } diff --git a/src/_variables.scss b/src/_variables.scss index 1d1e64ffc17..11aeea711f3 100644 --- a/src/_variables.scss +++ b/src/_variables.scss @@ -64,12 +64,14 @@ $b-custom-file-height-inner-sm: calc( $b-icon-vertical-offset: -0.15em; // Animations +$b-icon-animation-cylon-duration: 0.75s !default; +$b-icon-animation-cylon-vertical-duration: $b-icon-animation-cylon-duration !default; +$b-icon-animation-fade-duration: 0.75s !default; $b-icon-animation-spin-duration: 2s !default; $b-icon-animation-spin-reverse-duration: $b-icon-animation-spin-duration !default; $b-icon-animation-spin-pulse-duration: 1s !default; $b-icon-animation-spin-reverse-pulse-duration: $b-icon-animation-spin-pulse-duration !default; -$b-icon-animation-cylon-duration: 0.75s !default; -$b-icon-animation-cylon-vertical-duration: $b-icon-animation-cylon-duration !default; +$b-icon-animation-throb-duration: 0.75s !default; // --- Sidebar --- diff --git a/src/components/alert/alert.js b/src/components/alert/alert.js index 7b83ff04e92..4cdfd13c4e1 100644 --- a/src/components/alert/alert.js +++ b/src/components/alert/alert.js @@ -65,8 +65,8 @@ export const BAlert = /*#__PURE__*/ Vue.extend({ }, data() { return { - countDownTimerId: null, countDown: 0, + countDownTimeout: null, // If initially shown, we need to set these for SSR localShow: parseShow(this.show) } @@ -77,7 +77,7 @@ export const BAlert = /*#__PURE__*/ Vue.extend({ this.localShow = parseShow(newVal) }, countDown(newVal) { - this.clearTimer() + this.clearCountDownInterval() if (isNumericLike(this.show)) { // Ignore if this.show transitions to a boolean value. this.$emit('dismiss-count-down', newVal) @@ -87,7 +87,7 @@ export const BAlert = /*#__PURE__*/ Vue.extend({ } if (newVal > 0) { this.localShow = true - this.countDownTimerId = setTimeout(() => { + this.countDownTimeout = setTimeout(() => { this.countDown-- }, 1000) } else { @@ -120,18 +120,18 @@ export const BAlert = /*#__PURE__*/ Vue.extend({ this.localShow = parseShow(this.show) }, beforeDestroy() { - this.clearTimer() + this.clearCountDownInterval() }, methods: { dismiss() { - this.clearTimer() + this.clearCountDownInterval() this.countDown = 0 this.localShow = false }, - clearTimer() { - if (this.countDownTimerId) { - clearInterval(this.countDownTimerId) - this.countDownTimerId = null + clearCountDownInterval() { + if (this.countDownTimeout) { + clearTimeout(this.countDownTimeout) + this.countDownTimeout = null } } }, diff --git a/src/components/avatar/README.md b/src/components/avatar/README.md index d7e915f75f3..87f545b7414 100644 --- a/src/components/avatar/README.md +++ b/src/components/avatar/README.md @@ -7,9 +7,8 @@ ## Overview -Avatars are lightweight functional components, which render inline by default, so that they are -vertically centered beside any adjoining plain text. They also can be used as children of other -components. +Avatars are lightweight components, which render inline by default, so that they are vertically +centered beside any adjoining plain text. They also can be used as children of other components. ```html