From adfdf7160b5822aae12eea677e7dd3128d2569bf Mon Sep 17 00:00:00 2001 From: Johann-S Date: Fri, 19 Jun 2020 11:17:01 +0300 Subject: Update to popper.js v2.x --- build/build-plugins.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index 7deda49b1..78f76622a 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -14,6 +14,7 @@ const rollup = require('rollup') const { babel } = require('@rollup/plugin-babel') const banner = require('./banner.js') +const rootPath = path.resolve(__dirname, '../js/dist/') const plugins = [ babel({ // Only transpile our source code @@ -39,7 +40,6 @@ const bsPlugins = { Toast: path.resolve(__dirname, '../js/src/toast.js'), Tooltip: path.resolve(__dirname, '../js/src/tooltip.js') } -const rootPath = path.resolve(__dirname, '../js/dist/') const defaultPluginConfig = { external: [ @@ -87,9 +87,9 @@ const getConfigByPluginKey = pluginKey => { if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') { const config = Object.assign(defaultPluginConfig) - config.external.push(bsPlugins.Manipulator, 'popper.js') + config.external.push(bsPlugins.Manipulator, '@popperjs/core') config.globals[bsPlugins.Manipulator] = 'Manipulator' - config.globals['popper.js'] = 'Popper' + config.globals['@popperjs/core'] = 'Popper' return config } -- cgit v1.2.3 From 5538ffb29214be2c946eb846ddbc41ee839b590f Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 7 Dec 2020 19:06:17 +0200 Subject: build-plugins: switch to "bundled" for babel helpers (#32312) --- build/build-plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index 78f76622a..ea7477390 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -19,8 +19,8 @@ const plugins = [ babel({ // Only transpile our source code exclude: 'node_modules/**', - // Inline the required helpers in each file - babelHelpers: 'inline' + // Include the helpers in each file, at most one copy of each + babelHelpers: 'bundled' }) ] const bsPlugins = { -- cgit v1.2.3 From f2c504397e5d5c59c088946cc26da370853673a9 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 7 Jan 2021 12:12:53 +0200 Subject: Bump copyright year to 2021 (#32713) --- build/build-plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index ea7477390..80a010a7f 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -2,8 +2,8 @@ /*! * Script to build our plugins to use them separately. - * Copyright 2020 The Bootstrap Authors - * Copyright 2020 Twitter, Inc. + * Copyright 2020-2021 The Bootstrap Authors + * Copyright 2020-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -- cgit v1.2.3 From 157a27d43d7d785292ca527936ac2932615dea1e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 14 Jan 2021 00:35:57 +0200 Subject: build-plugins: build Base component too (#32313) --- build/build-plugins.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index 80a010a7f..d1930b855 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -29,6 +29,7 @@ const bsPlugins = { Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'), SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'), Alert: path.resolve(__dirname, '../js/src/alert.js'), + Base: path.resolve(__dirname, '../js/src/base-component.js'), Button: path.resolve(__dirname, '../js/src/button.js'), Carousel: path.resolve(__dirname, '../js/src/carousel.js'), Collapse: path.resolve(__dirname, '../js/src/collapse.js'), @@ -44,11 +45,13 @@ const bsPlugins = { const defaultPluginConfig = { external: [ bsPlugins.Data, + bsPlugins.Base, bsPlugins.EventHandler, bsPlugins.SelectorEngine ], globals: { [bsPlugins.Data]: 'Data', + [bsPlugins.Base]: 'Base', [bsPlugins.EventHandler]: 'EventHandler', [bsPlugins.SelectorEngine]: 'SelectorEngine' } @@ -73,6 +76,7 @@ const getConfigByPluginKey = pluginKey => { } if ( + pluginKey === 'Base' || pluginKey === 'Button' || pluginKey === 'Carousel' || pluginKey === 'Collapse' || @@ -112,11 +116,13 @@ const getConfigByPluginKey = pluginKey => { return { external: [ bsPlugins.Data, + bsPlugins.Base, bsPlugins.EventHandler, bsPlugins.Manipulator ], globals: { [bsPlugins.Data]: 'Data', + [bsPlugins.Base]: 'Base', [bsPlugins.EventHandler]: 'EventHandler', [bsPlugins.Manipulator]: 'Manipulator' } -- cgit v1.2.3 From 548be2ed6604ddfc8488cd4a793c6271c2caf485 Mon Sep 17 00:00:00 2001 From: GeoSot Date: Tue, 2 Mar 2021 19:10:10 +0200 Subject: Offcanvas as component (#29017) * Add a new offcanvas component * offcanvas.js: switch to string constants and `event.key` * Remove unneeded code * Sass optimizations * Fixes Make sure the element is hidden and not offscreen when inactive fix close icon negative margins Add content in right & bottom examples Re-fix bottom offcanvas height not to cover all viewport * Wording tweaks * update tests and offcanvas class * separate scrollbar functionality and use it in offcanvas * Update .bundlewatch.config.json * fix focus * update btn-close / fix focus on close * add aria-modal and role return focus on trigger when offcanvas is closed change body scrolling timings * move common code to reusable functions * add aria-labelledby * Replace lorem ipsum text * fix focus when offcanvas is closed * updates * revert modal, add tests for scrollbar * show backdrop by default * Update offcanvas.md * Update offcanvas CSS to better match modals - Add background-clip for borders - Move from outline to border (less clever, more consistent) - Add scss-docs in vars * Revamp offcanvas docs - Add static example to show and explain the components - Split live examples and rename them - Simplify example content - Expand docs notes elsewhere - Add sass docs * Add .offcanvas-title instead of .modal-title * Rename offcanvas example to offcanvas-navbar to reflect it's purpose * labelledby references title and not header * Add default shadow to offcanvas * enable offcanvas-body to fill all the remaining wrapper area * Be more descriptive, on Accessibility area * remove redundant classes * ensure in case of an already open offcanvas, not to open another one * bring back backdrop|scroll combinations * bring back toggling class * refactor scrollbar method, plus tests * add check if element is not full-width, according to #30621 * revert all in modal * use documentElement innerWidth * Rename classes to -start and -end Also copyedit some docs wording * omit some things on scrollbar * PASS BrowserStack tests -- IOS devices, Android devices and Browsers on Mac, hide scrollbar by default and appear it, only while scrolling. * Rename '_handleClosing' to '_addEventListeners' * change pipe usage to comma * change Data.getData to Data.get Co-authored-by: XhmikosR Co-authored-by: Martijn Cuppens Co-authored-by: Mark Otto --- build/build-plugins.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index d1930b855..7175df4dd 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -35,6 +35,7 @@ const bsPlugins = { Collapse: path.resolve(__dirname, '../js/src/collapse.js'), Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'), Modal: path.resolve(__dirname, '../js/src/modal.js'), + OffCanvas: path.resolve(__dirname, '../js/src/offcanvas.js'), Popover: path.resolve(__dirname, '../js/src/popover.js'), ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'), Tab: path.resolve(__dirname, '../js/src/tab.js'), @@ -71,7 +72,7 @@ const getConfigByPluginKey = pluginKey => { } } - if (pluginKey === 'Alert' || pluginKey === 'Tab') { + if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'OffCanvas') { return defaultPluginConfig } -- cgit v1.2.3 From 6ecd1c626e4129daf45a47b44c2e2eae60a09fa3 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Tue, 16 Mar 2021 10:51:04 +0530 Subject: Change the name of the `Offcanvas` constructor (#33261) --- build/build-plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index 7175df4dd..7fd58bcb6 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -35,7 +35,7 @@ const bsPlugins = { Collapse: path.resolve(__dirname, '../js/src/collapse.js'), Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'), Modal: path.resolve(__dirname, '../js/src/modal.js'), - OffCanvas: path.resolve(__dirname, '../js/src/offcanvas.js'), + Offcanvas: path.resolve(__dirname, '../js/src/offcanvas.js'), Popover: path.resolve(__dirname, '../js/src/popover.js'), ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'), Tab: path.resolve(__dirname, '../js/src/tab.js'), @@ -72,7 +72,7 @@ const getConfigByPluginKey = pluginKey => { } } - if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'OffCanvas') { + if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'Offcanvas') { return defaultPluginConfig } -- cgit v1.2.3 From 80085a12f6936bef11aa72631392e3e9b2646f17 Mon Sep 17 00:00:00 2001 From: GeoSot Date: Wed, 14 Apr 2021 23:28:50 +0300 Subject: Decouple BackDrop from modal (#32439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create backdrop.js util * revert breaking changes remove PromiseTimout usage revert class name * one more test | change bundlewatch.config * add config obj to backdrop helper | tests for rootElement | use transitionend helper * Minor tweaks — Renaming Co-authored-by: Rohit Sharma --- build/build-plugins.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build/build-plugins.js') diff --git a/build/build-plugins.js b/build/build-plugins.js index 7fd58bcb6..53093dc41 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -65,7 +65,8 @@ const getConfigByPluginKey = pluginKey => { pluginKey === 'EventHandler' || pluginKey === 'SelectorEngine' || pluginKey === 'Util' || - pluginKey === 'Sanitizer' + pluginKey === 'Sanitizer' || + pluginKey === 'Backdrop' ) { return { external: [] @@ -133,7 +134,8 @@ const getConfigByPluginKey = pluginKey => { const utilObjects = new Set([ 'Util', - 'Sanitizer' + 'Sanitizer', + 'Backdrop' ]) const domObjects = new Set([ -- cgit v1.2.3