Repository navigation
v5.0.0
-
Bootstrap 5 (5.3.7). For Bootstrap 4 use version
4.x(branch4.x). -
Bundled libraries:
- Bootstrap: 5.3.7 (was 4.6.1).
- Bootstrap Icons: 1.13.1 (was 1.10.4).
- JQuery: 3.7.1 (was 3.5.1).
- Moment: 2.30.1 (was 2.25.2).
- Date Range Picker: 3.1 (was 3.0.5).
-
Bootstrap:load: doesn't load JQuery anymore (not needed by Bootstrap 5).enableTooltip: uses the Bootstrap 5 API (bootstrap.Tooltip.getOrCreateInstance) for elements with
data-bs-toggle="tooltip". Returnstrueif any tooltip element was found.
-
JQuery:openWindow: sets the window HTML withinnerHTML(doesn't depend on JQuery).
-
BSAccordion:- Bootstrap 5 accordion markup:
accordion,accordion-item,accordion-header,accordion-button,
accordion-collapseandaccordion-body(was based oncard). - New option
flush(accordion-flush): no outer borders and rounded corners.
- Bootstrap 5 accordion markup:
-
BootstrapIcons:iconsListupdated to Bootstrap Icons 1.13.1 (125 new icons).
-
daterangepicker.js: keeps the local patches (minute rounded totimePickerIncrement; callback with a single array),
now documented in the file header. -
Tests:
- New
bones_ui_bootstrap_bs5_test.dart: Bootstrap 5 without JQuery: load, bundled JS version, CSS loaded first,
Bootstrap 5 CSS utilities, tooltips (instances, shown title,enableTooltipOnRender, nodata-toggle),
BSAccordion(Bootstrap 5 styles, collapse/expand via clicks and theCollapseAPI,flushcomputed styles,
DOM/component content, item classes/styles) andJQuery.openWindow. - Integration: bundled JQuery/Moment versions, Bootstrap 5 JQuery plugins when JQuery is present,
Date Range Picker (minute rounding withTimePicker.hoursMinutesBy15, cancel, ranges). - Unit: new
BSAccordionmarkup (data-bs-*, no Bootstrap 4 attributes),flush, Bootstrap Icons 1.13.1. - New VM tests:
iconsListmatcheslib/icons/*.svg; versions consistent across code, bundled assets,
pubspec.yaml, CHANGELOG and README; no stale bundled libraries;daterangepicker.jslocal patches present;
no Bootstrap 4 data attributes in the library. - CI: also run VM tests.
- New
Migration from 4.x (breaking changes)
Bootstrap.load()no longer loads JQuery. If you useJQuery.$, callJQuery.load()yourself.
(BSDateRangePickerstill loads JQuery, which it needs.)- Bootstrap 5 data attributes:
data-toggle→data-bs-toggle,data-target→data-bs-target,
data-parent→data-bs-parent,data-dismiss→data-bs-dismiss,data-placement→data-bs-placement, etc.- Tooltips are only enabled for
data-bs-toggle="tooltip";data-toggle="tooltip"is not supported.
- Tooltips are only enabled for
BSAccordionmarkup changed (nocard,card-header,card-body,btn-link; the header is now theh2
with the<id>-heading-<index>ID). Update app CSS that targets the old classes. Element IDs
(<id>-heading-<index>,<id>-collapse-<index>) didn't change.JQuery.openWindow(html: ...): scripts insidehtmlare not executed anymore (innerHTMLinstead of JQueryhtml()).- Bootstrap 5 renamed many CSS classes (
ml-*/mr-*→ms-*/me-*,text-left→text-start,
float-right→float-end,font-weight-*→fw-*,badge-*→bg-*,sr-only→visually-hidden, ...).
See the official guide: https://getbootstrap.com/docs/5.3/migration/