bones_ui_bootstrap 5.3.0
bones_ui_bootstrap: ^5.3.0 copied to clipboard
Adds Bootstrap 5 support to Dart package bones_ui, allowing use of Bootstrap components and CSS.
5.3.0 #
-
BSDateRangePicker: no JQuery anymore.- The bundled date range picker (
lib/components/daterangepicker) is now vanilla-datetimerange-picker (commit32608b3): Dan Grossman'sdaterangepicker3.1 (the previous one) without JQuery. Same options, behavior and CSS (the open picker renders identically). It still uses Moment. load: doesn't load JQuery.- The picker is created with
new DateRangePicker(element, config, callback). - New
jsPicker: the JSDateRangePickerinstance. - The JS picker is removed (its container in
document.body, and its listeners) on a new render,clearanddispose(it used to be left there). Deferred, so a render triggered by the picker callback (e.g.onChange→refresh) doesn't break the picker while it's applying. - If
daterangepicker.jsfailed to load, renders only the date text (no error). daterangepicker.jslocal patches: the 2 previous ones, plus:clickApply/clickCancel: theapply/cancelevents dispatched on the picker element, as in the original (the port failed when called without an event).remove: removes the picker container from the document and the windowresizelistener, and setsisShowing = false, as in the original.outsideClick: "inside the picker" by element identity, as in the original (the port matched any element with the same tag and classes, e.g. another picker field, keeping two pickers open).
- The bundled date range picker (
-
JQuery is no longer loaded by this package (only with
JQuery.load()): callJQuery.load()if the app uses it. -
README: JQuery and Date Range Picker in the bundled libraries; new "See also" section with the related projects.
-
Tests:
- New
bones_ui_bootstrap_daterangepicker_test.dart:BSDateRangePickerwithout JQuery, two pickers in the page (loading, JS selection calling back into Dart, opening on click, a click on the other picker field closing the open one, a click inside keeping it open, a new render orclearremoving the JS picker, a render fromonChangewhile applying). - Integration tests use
BSDateRangePicker.jsPicker(not JQuerydata). - Consistency: the new
daterangepicker.jslocal patches, and no JQuery in it.
- New
5.2.1 #
- Bundled libraries:
- Bootstrap: 5.3.8 (was 5.3.7): CSS, JS (
lib/bootstrap-5.3.8) and SCSS (lib/bootstrap-5/scss, the import path doesn't change), unmodified from the officialbootstrap5.3.8 npm package.- Upstream changes:
color-contrast()accepts a contrast ratio equal to$min-contrast-ratio,.spinner-*flex-shrink: 0, search inputs cancel button style.
- Upstream changes:
- Bootstrap Icons: 1.13.1 (already the latest).
- Bootstrap: 5.3.8 (was 5.3.7): CSS, JS (
5.2.0 #
-
New Bootstrap 4 compatibility SCSS (
lib/bootstrap-5/bs4-compat), for apps moving from4.x: Bootstrap 5 normalized to look like Bootstrap 4.@import "package:bones_ui_bootstrap/bootstrap-5/bs4-compat/bootstrap";_variables.scss: Bootstrap 4 values for the variables whose defaults changed (border radius, no responsive font sizes, links without underline,<small>/<code>,<hr>,.badge,.card,.form-control,.table,.navbar, accordion), all!default._rules.scss: checkboxes and radios without padding, date inputs height, lists indent, inherited.badge/.cardcolors,.form-controlappearance,.tableborders (keeping.table-borderedand.table-borderless),.navbar-brand, and the accordion (BSAccordion) with the look of the Bootstrap 4BSAccordion(.card,.card-header,.btn-linkwith its hover,.card-body)._class-aliases.scss(optional): the Bootstrap 4 class names (float-right,text-left,ml-2,font-weight-bold,sr-only,badge-pill,badge-primary,no-gutters,form-group,btn-block, ...).
-
Bootstrap:- New
defaultLoadCss: theloadloadCsswhen not passed, including the calls made by this package (e.g.enableTooltip), so noloadcall, whoever makes it first, loads the bundled CSS. load:loadCssis now nullable (defaults todefaultLoadCss).
- New
-
Tests:
- New
bones_ui_bootstrap_bs4_compat_vm_test.dart: compiles the compatibility SCSS through itspackage:URL: variables, rules (after the Bootstrap rules they override), app variables override, class aliases. - New
bones_ui_bootstrap_default_no_css_test.dart:Bootstrap.defaultLoadCss = falsewithenableTooltipmaking the firstload.
- New
5.1.0 #
-
Bundled the Bootstrap 5.3.7 SCSS sources (
lib/bootstrap-5/scss, unmodified from the officialbootstrap5.3.7 npm package), for apps that compile their own Bootstrap theme:@import "package:bones_ui_bootstrap/bootstrap-5/scss/bootstrap";- Only the major version in the path: Bootstrap 5.x updates don't change the import.
(The CSS and JS stay in
lib/bootstrap-<version>, which busts the browser cache on updates.)
- Only the major version in the path: Bootstrap 5.x updates don't change the import.
(The CSS and JS stay in
-
Bootstrap:load: new parameterloadCss(defaulttrue). Withfalseonly the Bootstrap JS is loaded, for apps that compile their own Bootstrap CSS.- New
PATH_SCSSandisCssLoaded.
-
pubspec.yaml:- New dev_dependencies:
sass: ^1.105.1package_config: ^3.0.0
- New dev_dependencies:
-
Tests:
- New
bones_ui_bootstrap_scss_vm_test.dart: compiles the bundled SCSS through itspackage:URL, with the default variables and with a custom theme; the variables/mixins imports don't output CSS. - New
bones_ui_bootstrap_no_css_test.dart:Bootstrap.load(loadCss: false)loads only the JS, no Bootstrap CSS applied, later calls keep the first options. Bootstrap.isCssLoadedafter the defaultload.
- New
5.0.1 #
-
Moment.locale: returnsfalseinstead of throwing when Moment is not loaded yet. -
BSDateRangePicker: removed debugprints (config on each render and the selected range on each change). -
Tests:
- New
bones_ui_bootstrap_unloaded_test.dart:Moment.localewith Moment not loaded. - VM: no debug prints in
BSDateRangePicker; stale-library check ignores directories with only hidden files (e.g..DS_Storeleft by git when switching branches).
- New
5.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 withdata-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 with
TimePicker.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 theh2with 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/
4.0.1 #
BSAccordion:- Document the
idparameter:null(default) auto-generates a unique ID; empty/blank IDs are rejected. - Clearer
ArgumentErrorfor an empty/blankid, explaining to passnull(or omit it) or a non-empty ID.
- Document the
4.0.0 #
-
Maintenance release for Bootstrap 4 (
package:web/ JS interop migration, from3.0.0-beta.x).- The Bootstrap 5 work (published as
2.4.0-beta.1) moved to branchbootstrap-5, for a future5.0.0.
- The Bootstrap 5 work (published as
-
pubspec.yaml:- sdk: from
>=3.6.0 <4.0.0to>=3.10.0 <4.0.0 - Updated dependencies:
bones_ui: from^3.0.12to^3.1.4amdjs: from^3.0.0-beta.2to^3.0.0dom_tools: from^3.0.0to^3.1.0dom_builder: from^3.0.7to^3.2.0intl_messages: from^3.0.0to^3.0.2web_utils: from^1.0.23to^1.1.0
- Updated dev_dependencies:
build_runner: from^2.11.1to^2.16.2build_web_compilers: from^4.4.13to^4.8.11lints: from^5.1.1to^6.1.0dependency_validator: from^3.2.3to^5.1.0test: from^1.30.0to^1.32.0
- sdk: from
-
BSAccordion:- Fix: a blank
idnow throwsArgumentError(was silently set to'null').
- Fix: a blank
-
Tests:
- More unit tests:
BSAccordion,BootstrapIcons,Moment,BSDateRangePicker. - New browser integration tests (
bones_ui_bootstrap_integration_test.dart): loading of JQuery/Bootstrap/Moment,JQuerycalls,Momentconversions/locale,BSAccordioncollapse via Bootstrap JS andBSDateRangePickerJS selection → Dart callback.
- More unit tests:
3.0.0-beta.7 #
pubspec.yaml:- Updated dependencies:
bones_ui: from^3.0.0-beta.19to^3.0.12swiss_knife: from^3.3.3to^3.3.14dom_tools: from^3.0.0-beta.15to^3.0.0dom_builder: from^3.0.0-beta.8to^3.0.7intl_messages: from^3.0.0-beta.1to^3.0.0web_utils: from^1.0.19to^1.0.23
- Updated dev_dependencies:
build_runner: from^2.10.4to^2.11.1build_web_compilers: from^4.4.6to^4.4.13test: from^1.28.0to^1.30.0
- Updated dependencies:
3.0.0-beta.6 #
-
Moment:moment(DateTime): changed to construct moment object from ISO 8601 string instead ofdateTime.toJSDeepconversion.
-
dom_tools: ^3.0.0-beta.15
-
dom_builder: ^3.0.0-beta.8
-
build_web_compilers: ^4.4.6
3.0.0-beta.5 #
-
BSDateRangePicker:_jsQueryCallback: change parameters toJSArray argsto avoid a bug passing a JS string to a JSObject in a Dart function.
-
bones_ui: ^3.0.0-beta.19
-
dom_tools: ^3.0.0-beta.13
-
dom_builder: ^3.0.0-beta.7
-
web_utils: ^1.0.19
-
build_runner: ^2.10.4
-
build_web_compilers: ^4.4.3
-
test: ^1.28.0
-
Removed dev dependency
sass_builder.
3.0.0-beta.4 #
-
BSDateRangePicker:_configureDatePicker:- Fix
JQuery.$(_textElement).call(), pass fallback as_jsQueryCallback.toJS, avoidingjsifyissues.
- Fix
-
bones_ui: ^3.0.0-beta.7
-
swiss_knife: ^3.3.3
-
dom_tools: ^3.0.0-beta.12
-
dom_builder: ^3.0.0-beta.4
-
web: ^1.1.1
-
web_utils: ^1.0.16
-
build_runner: ^2.10.0
-
build_web_compilers: ^4.3.0
-
sass_builder: ^2.4.0
-
test: ^1.26.3
3.0.0-beta.3 #
- bones_ui: ^3.0.0-beta.5
- swiss_knife: ^3.3.0
- dom_tools: ^3.0.0-beta.5
- intl_messages: ^3.0.0-beta.1
- web_utils: ^1.0.9
3.0.0-beta.2 #
-
Using
JSDatefromjs_interop_utils: ^1.0.6. -
bones_ui: ^3.0.0-beta.4
-
web_utils: ^1.0.8
3.0.0-beta.1 #
-
Migrate
dart:html(deprecated) to packageweb. -
sdk: '>=3.6.0 <4.0.0'
-
bones_ui: ^3.0.0-beta.2
-
amdjs: ^3.0.0-beta.2
-
dom_tools: ^3.0.0-beta.4
-
dom_builder: ^3.0.0-beta.2
-
web: ^1.1.0
-
web_utils: ^1.0.6
2.3.1 #
-
sdk: '>=3.5.0 <4.0.0'
-
bones_ui: ^2.5.13
-
swiss_knife: ^3.2.3
-
amdjs: ^2.0.4
-
dom_tools: ^2.3.2
-
dom_builder: ^2.2.7
-
intl_messages: ^2.3.4
-
build_runner: ^2.4.15
-
build_web_compilers: ^4.1.1
-
lints: ^5.1.1
-
test: ^1.25.15
2.3.0 #
-
sdk: '>=3.3.0 <4.0.0'
-
bones_ui: ^2.5.0
-
swiss_knife: ^3.2.0
-
dom_tools: ^2.3.0
-
intl_messages: ^2.3.0
-
build_runner: ^2.4.8
-
build_web_compilers: ^4.0.9
-
test: ^1.25.2
2.2.0 #
- sdk: '>=3.0.0 <4.0.0'
- bones_ui: ^2.4.0
- swiss_knife: ^3.1.6
- dom_tools: ^2.2.0
- dom_builder: ^2.2.2
- intl_messages: ^2.2.3
- build_runner: ^2.4.7
- lints: ^3.0.0
- dependency_validator: ^3.2.3
- test: ^1.24.9
2.1.2 #
- update icons
1.10.4. - bones_ui: ^2.1.20
- swiss_knife: ^3.1.5
- dom_tools: ^2.1.14
- dom_builder: ^2.1.6
- intl_messages: ^2.0.7
- test: ^1.23.1
2.1.1 #
- bones_ui: ^2.1.7
- test: ^1.22.2
2.1.0 #
- sdk: '>=2.18.0 <3.0.0'
- bones_ui: ^2.1.3
- swiss_knife: ^3.1.3
- dom_tools: ^2.1.9
- intl_messages: ^2.0.5
- build_runner: ^2.3.3
- build_web_compilers: ^3.2.7
- sass_builder: ^2.2.1
- lints: ^2.0.1
- test: ^1.22.1
2.0.8 #
AccordionItem:- Added
classes,style,headClasses,headStyle,bodyClasses,bodyStyle.
- Added
- bones_ui: ^2.0.14
- dom_tools: ^2.1.3
- dom_builder: ^2.1.0
- intl_messages: ^2.0.3
- build_runner: ^2.2.0
- build_web_compilers: ^3.2.4
- dependency_validator: ^3.2.2
- test: ^1.21.4
2.0.7 #
- bones_ui: ^2.0.13
- build_runner: ^2.1.11
- build_web_compilers: ^3.2.3
- lints: ^2.0.0
- dependency_validator: ^3.2.0
- test: ^1.21.3
2.0.6 #
- bones_ui: ^2.0.11
- intl_messages: ^2.0.2
2.0.5 #
- Improve GitHub CI.
- bones_ui: ^2.0.10
- swiss_knife: ^3.1.1
- amdjs: ^2.0.3
- dom_tools: ^2.1.1
- dom_builder: ^2.0.9
2.0.4 #
- Upgrade Bootstrap to
v4.6.1. - Upgrade Bootstrap Icons to
v1.8.1. - Improved Web Example.
- Added icons, date range picker and accordion.
- Added SCSS file.
- sdk: '>=2.15.0 <3.0.0'
- bones_ui: ^2.0.8
- amdjs: ^2.0.2
- dom_tools: ^2.1.0
- dom_builder: ^2.0.8
- lints: ^1.0.1
- sass_builder: ^2.1.3
- dependency_validator: ^3.1.0
2.0.3 #
Bootstrap.enableTooltipnow using named parameters.JQuery:- Added
openWindow.
- Added
- bones_ui: ^2.0.3
- swiss_knife: ^3.0.8
2.0.2 #
- Upgrade Bootstrap to
v4.6.0. - Upgrade Bootstrap Icons to
v1.5.0. - bones_ui: ^2.0.2
- swiss_knife: ^3.0.7
- sdk: '>=2.13.0 <3.0.0'
2.0.1 #
- bones_ui: ^2.0.1
- swiss_knife: ^3.0.6
- amdjs: ^2.0.1
- dom_tools: ^2.0.1
- intl_messages: ^2.0.1
1.2.0 #
- bones_ui: ^1.2.0
- swiss_knife: ^2.5.24
- dom_tools: ^1.3.20
- intl_messages: ^1.1.13
1.1.1 #
- Bootstrap 4.5.3
- Bootstrap Icons 1.1.0
- swiss_knife: ^2.5.18
- amdjs: ^1.0.7
- dom_tools: ^1.3.15
- intl_messages: ^1.1.12
1.1.0 #
- bones_ui: ^1.1.0
- swiss_knife: ^2.5.16
- dom_tools: ^1.3.14
1.0.6 #
- bones_ui: ^1.0.20
- swiss_knife: ^2.5.13
1.0.5 #
- Update Bootstrap icons.
- Moved
UISVGto packagebones_ui. - bones_ui: ^1.0.17
- swiss_knife: ^2.5.12
- amdjs: ^1.0.6
- dom_tools: ^1.3.10
- intl_messages: ^1.1.10
- pedantic: ^1.9.2
- test: ^1.15.3
1.0.4 #
- Upgrade to
Bootstrap4.5.0. - bones_ui: ^1.0.13
- swiss_knife: ^2.5.5
- amdjs: ^1.0.5
- dom_tools: ^1.3.4
1.0.3 #
- BSDateRangePicker: Fix a Dart issue with JS calling a Dart Object method: Circumvent using lambda with optional parameters as callback.
- dartfmt.
1.0.2 #
- bones_ui: ^1.0.12
- dom_tools: ^1.3.2
1.0.1 #
- Add API Documentation.
- Added example for BootstrapIcons.
1.0.0 #
- Initial version, created by Stagehand