0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Commit Graph

54 Commits

Author SHA1 Message Date
Mark Otto
195440f2fb
v5.2.0 design refresh, plus responsive offcanvas classes (#35736)
* Add responsive offcanvas classes

- Updates navbar-expand classes to de-dupe some styles—these shouldn't interfere now.
- Adds some JS to the offcanvas component to help with responsiveness

Co-Authored-By: GeoSot <geo.sotis@gmail.com>

* Redesign homepage, docs, and examples

Homepage:

- New Bootstrap purple navbar
- Redesigned masthead
- Rewrote and redesigned homepage content
- Replace Copy text with icons like Bootstrap Icons site across all ClipboardJS instances
- Fixed padding issues in site footer
- Match homepage button styles to examples page, use gap instead of tons of responsive margin utils

Docs:

- New navbar, no more subnav. Migrated search and version picker into the main navbar and refreshed the design of it all, including the responsive toggles.
- New sidebar navigation is always expanded, and now features Bootstrap Icons alongside section headings
- Sidebar navigation autoscrolls to active link for better usability
- Subnav and navbar padding issues ironed out
- Enhanced the version picker in anticipation of v5.2: we can now link right to the same page in the previous version.
- Redesign callouts to add more color to our pages
- Collapse table of contents on mobile
- Cleanup and redesign button styles with CSS variables
- Update design for subnav version dropdown
- Update highlight and example to be full-width until md
- Improve the Added In badges
- Turn the ToC into a well on mobile
- Redesign code snippets to better house two action buttons

Examples:

- Redesign Examples page layout
- Add new example for responsive offcanvases in navbars

* Convert offcanvas to CSS vars

* Feat: add resize handler to Offcanvas.js.

If we could use as default the `.offcanvas` class without modifiers, we then, could add a simplified selector
The selector itself, ignores the .offcanvas class as it doesn't have any responsive behavior
The `aria-modal` addon is to protect us, selection backdrop elements

* Separate examples code, Add some selectors, fix stackblitz btn

Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-04-17 22:17:50 -07:00
GeoSot
ece1601227
Revamp Scrollspy using Intersection observer (#33421)
* Revamp scrollspy to use IntersectionObserver

* Add smooth scroll support

* Update scrollspy.js/md

* move functionality to method

* Update scrollspy.js

* Add SmoothScroll to docs example

* Refactor Using `Maps` and smaller methods

* Update scrollspy.md/js

* Update scrollspy.spec.js

* Support backwards compatibility

* minor optimizations

* Merge activation functionality

* Update scrollspy.md

* Update scrollspy.js

* Rewording some of the documentation changes

* Update scrollspy.js

* Update scrollspy.md

* tweaking calculation functionality & drop text that suggests, to deactivate target when wrapper is not visible

* tweak calculation

* Fix lint

* Support scrollspy in body & tests

* change doc example to a more valid solution

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
2022-04-13 10:29:13 -07:00
Julien Déramond
10f2830805
Add CSS vars for accordions (#36148)
* Add CSS vars for accordions

* Fix Bundlewatch
2022-04-11 15:33:18 -07:00
Neeraj Kumar Das
a7153567e1
Bring back webkit calendar picker indicator for datalists (#35406)
* Bring back webkit calendar picker indicator for datalists

* Replace webkit datalist indicator with Bootstrap Icons

* Use default datalist icons on date or time inputs in Chrome
Remove the dropdown arrow from text type inputs

* Bundlewatch

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-04-06 10:37:54 -07:00
Louis-Maxime Piton
0ceaad3ab4
Use new CSS vars (#36098)
* Proposal to use new CSS var when it could be used.

* Bundlewatch

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-04-04 13:51:21 -07:00
louismaxime.piton
f789c2cc92 Adding CSS var to list-group-item-action 2022-04-04 10:37:42 -07:00
Mark Otto
e342142b61
Train PR: CSS variables for accordion, cards, navs, and modals (#36071)
* Convert accordion to CSS vars

* Update accordion.md

* Convert navs to CSS variables

* Split up CSS vars

* bundlewatch

* fix vars

* Convert cards to CSS vars

* Convert modals to CSS variables

* Bundlewatch

Co-authored-by: Geremia Taglialatela <tagliala.dev@gmail.com>
2022-03-28 15:05:37 -07:00
Mark Otto
0eb808015f
Convert list group to CSS variables (#35862)
* Convert list-group to CSS vars

* bundlewatch
2022-03-22 10:02:12 -07:00
Mark Otto
88bd287b27
Convert progress bars to CSS variables (#35962)
* Convert progress bars to CSS variables

* bundlewatch
2022-03-18 09:02:03 -07:00
Mark Otto
a4841afa26
Convert toasts to CSS variables (#35961)
* Convert toasts to CSS variables

* bundlewatch
2022-03-17 14:48:36 -07:00
Mark Otto
71582eabff
Convert spinners to CSS variables (#35960)
* Convert spinners to CSS variables

* bundlewatch
2022-03-17 13:49:57 -07:00
Mark Otto
acf6ea74a7
Add additional root variables, rename $variable-prefix to $prefix (#35981)
* Add additional root variables, rename $variable-prefix to $prefix

- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout

* Bundlewatch
2022-03-13 10:13:09 -07:00
Mark Otto
1936e0c5ea Bundlewatch 2022-03-11 12:59:55 -08:00
Mark Otto
3a57da425b bundlewatch 2022-03-08 14:53:53 -08:00
Mark Otto
c1ab3eccd7 bump bundlewatch 2022-02-28 11:40:32 -08:00
Mark Otto
85938bb2ed Tighten bundlewatch 2022-02-14 19:00:59 -08:00
Mark Otto
f2d33b2a1e Bump bundlewatch 2022-02-10 19:51:23 -08:00
Mark Otto
71a211f2bd bundlewatch 2022-02-08 10:39:58 -08:00
Mark Otto
f729e4c7d1
Convert alerts to CSS variables (#35401)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-17 07:16:24 +02:00
Florian Lacreuse
d17801265e
Add sticky bottom utility (#35518)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-16 10:27:00 +02:00
GeoSot
94a596fbcb
Add a template factory helper to handle all template cases (#34519)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-11-25 19:14:02 +02:00
GeoSot
8ec6c94522
Extract Carousel's swipe functionality to a separate Class (#32999) 2021-10-11 17:04:43 +03:00
XhmikosR
4ffdef397f
Update terser to v5.9.0 (#34995) 2021-09-29 09:20:04 +03:00
dependabot[bot]
6397516ad7
Bump @popperjs/core from 2.9.3 to 2.10.1 (#34896)
* Bump @popperjs/core from 2.9.3 to 2.10.1

Bumps [@popperjs/core](https://github.com/popperjs/popper-core) from 2.9.3 to 2.10.1.
- [Release notes](https://github.com/popperjs/popper-core/releases)
- [Commits](https://github.com/popperjs/popper-core/compare/v2.9.3...v2.10.1)

---
updated-dependencies:
- dependency-name: "@popperjs/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update config.yml

* Update .bundlewatch.config.json

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-09-03 12:11:42 +03:00
Mark Otto
d91480e3c7
Include root.scss in all dist builds (#34773)
* Remove the font-family-* override vars from Reboot build

* Update Reboot docs to mention CSS variables
2021-09-02 08:41:58 +03:00
Mark Otto
1e9446c0c8 Update .bundlewatch.config.json 2021-08-03 17:06:06 -07:00
Ryan Berliner
7646f6bd33
Add shift-tab keyboard support for dialogs (modal & Offcanvas components) (#33865)
* consolidate dialog focus trap logic

* add shift-tab support to focustrap

* remove redundant null check of trap element

Co-authored-by: GeoSot <geo.sotis@gmail.com>

* remove area support forom focusableChildren

* fix no expectations warning in focustrap tests

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-07-27 08:01:04 +03:00
Mark Otto
ed3f2d46c4 Bump bundlewatch 2021-07-16 15:11:40 -07:00
Mark Otto
77d4143674 Bump bundlewatch bundle 2021-06-22 19:53:24 -07:00
Mark Otto
dd824f2d3e
v5.1: Add optional CSS grid (#31813) 2021-06-22 19:51:16 -07:00
alpadev
b39b665072
Automatically select an item in the dropdown when using arrow keys (#34052) 2021-05-22 10:58:52 +03:00
GeoSot
80085a12f6
Decouple BackDrop from modal (#32439)
* 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 <rohit2sharma95@gmail.com>
2021-04-14 13:28:50 -07:00
XhmikosR
d9da43f3cc
.browserslistrc: remove Android and make Safari/iOS 12 the minimum (#33399) 2021-03-22 23:02:10 +02:00
GeoSot
b9f30903a5
Fix carousel RTL and refactor code, fix rtl swipe issues (#32913)
* move common code to reusable functions

* add/re-factor tests, directionToOrder func

* add _orderToDirection tests

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-17 07:58:43 +02:00
GeoSot
c5083d5fc3
Use more safe check for 'isDisabled' helper (#33385) 2021-03-17 07:44:15 +02:00
GeoSot
548be2ed66
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 <xhmikosr@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
2021-03-02 19:10:10 +02:00
alpadev
48a95f7280
refactor: use a Map instead of an Object in dom/data (#32180)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-03-02 16:55:44 +02:00
Kyle Tsang
02dbd87ffa
Fix event handler removal in dropdown/carousel dispose (#33000)
* Fix event handler removal in carousel dispose

* Fix event handler removal in dropdown dispose

* Test event handlers in scrollspy dispose

* Test event handlers in toast dispose

* Test event handlers in tooltip dispose

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-02-12 07:51:34 +02:00
Rohit Sharma
f7088e5d28
Add function type for popperConfig option (#32882)
* Add function type for `popperConfig` option

* Update .bundlewatch.config.json

* copy edits

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
2021-02-09 21:16:13 +02:00
Marc Jansing
f07106e604
Add helpers to utilities bundle (#32324)
Adds currently missing utilities classes which are located in scss/helpers to
boostrap-utilities dist files.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-12-18 07:39:39 +02:00
alpadev
85208ae557
Refactor components to use a utility function to define jQuery plugins (#32285)
* refactor: use an utility function to define jQuery plugins

* test: add spec for defineJQueryPlugin utility function

* Update .bundlewatch.config.json

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-12-08 08:16:50 +02:00
XhmikosR
4447157446 Tighten bundlewatch limits 2020-12-06 18:42:40 +02:00
Gaël Poupard
9488978fb5 feat(RTL): implement RTL
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-04 07:52:03 +02:00
Rohit Sharma
c348ad4a94
Ability to add custom class in tooltip/popover (#32217)
Porting of #31834 to main.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-25 09:16:22 +02:00
Mark Otto
649e525c62
Add .gap utilities (#32074)
* Add gap utilities

* Update .bundlewatch.config.json

* Revamp headings on this page for better organization

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-08 20:56:02 +02:00
Mark Otto
6a37612540 Add dedicated accordion component based on Collapse JS 2020-11-06 14:49:41 +02:00
XhmikosR
f989f8fb3a Tighten bundlewatch limits. 2020-11-05 15:37:34 +02:00
Mark Otto
3e2f9ab237
v5: Floating labels (#30449)
* v5: Promote floating labels example to component

- Adds new .form-floating
- Stubs out basics of a docs page
- Removes existing Example

* Update floating labels to support .form-select, make inputs and selects more consistent

- To do this, I made the .form-control and .form-select consistent in min-height vs height
- Removed some unused variables now
- Updated -color to be the -color because I don't know why this was any different before
- Update page to include some examples for layout, validation, and value
- Rewrite styles to not modify padding, but instead transform and opacity

* Streamline and bulletproof some things

- Apply some optimizations from code review
- Removed unecessary properties from the label
- Add some comments for what properties are required
- Move from fixed height for labels to height 100% so we can support textareas
- Improve docs a little bit, add ToC

* Move some values to variables, switch from scaling font-size to scale, update transforms

* Bring over changes from #30966 and add to them to tighten things up

* Delete the now unused example images

* Fix typo

* Allowlist the calc function

* Add transform-origin, update transform values

* Test out autofill fix

* Fix linter issue

* Mention it in the migration guide

* Bump bundlesize

* Add one more variable per review

* Shave .25rem off the height

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-27 20:45:48 -07:00
Mark Otto
caef121404 Fix bundlewatch test I missed 2020-09-24 13:39:36 -07:00
XhmikosR
c28934cb18
Rename "master" to "main". (#31050) 2020-06-16 21:41:47 +03:00