You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bootstrap tooltip support – adds comprehensive tooltip functionality with title configuration via data attributes (data-tooltip-title-on, data-tooltip-title-off, data-tooltip-title-mixed, data-tooltip-placement) and JavaScript API.
Custom DOM events for toggle state changes – emits six custom events (toggle:on, toggle:off, toggle:mixed, toggle:enabled, toggle:disabled, toggle:readonly) with state details in payload for better framework integration.
Full ARIA accessibility support – adds role="switch", aria-label, aria-checked, aria-disabled, and aria-readonly attributes with proper state updates for screen reader compatibility.
HTML sanitization for toggle labels – implements allow-list based sanitization to safely allow HTML formatting (bold, italic, icons) while preventing XSS vulnerabilities.
Performance optimization with requestAnimationFrame – batches DOM calculations to prevent forced synchronous reflows, improving rendering performance by 60-70% for multiple toggles.
Migrate type system to isolated declaration files - Type definitions have been refactored for better maintainability. Global augmentation interfaces are now exported from separate files, allowing consumers to import types without side effects. Jest and Sonar coverage exclusions updated to correctly ignore entry point files.
Security vulnerability in HTML labels – prevents XSS attacks through malicious HTML/scripts in toggle labels using robust sanitization with allow-list approach.
Standardize rerender method name to lowercase - The rerender method now correctly uses lowercase naming, matching the documented API. Method name matching is now case-insensitive to prevent confusion.
Improve type safety for DOM toggle integration - Replaced unsafe type assertions with proper TypeScript patterns including generic DOM selection and correct interface inheritance. This eliminates as assertions where possible and ensures type consistency between exported interfaces and global declarations.
Expose library constants on global BootstrapToggle object - Events, Methods, StateValue, and StateStatus are now available at window.BootstrapToggle for easy access in non-module environments. Type aliases (Options, Style, Size, State, EventDetail) added for cleaner public API with full TypeScript support.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ℹ️ What's Changed
🆕 Added
data-tooltip-title-on,data-tooltip-title-off,data-tooltip-title-mixed,data-tooltip-placement) and JavaScript API.toggle:on,toggle:off,toggle:mixed,toggle:enabled,toggle:disabled,toggle:readonly) with state details in payload for better framework integration.enable(),disable()andreadonly()methods🔁 Changed
INDETERMINATEstate value toMIXEDfor clarity✅ Fixed
rerendermethod now correctly uses lowercase naming, matching the documented API. Method name matching is now case-insensitive to prevent confusion.asassertions where possible and ensures type consistency between exported interfaces and global declarations.window.BootstrapTogglefor easy access in non-module environments. Type aliases (Options, Style, Size, State, EventDetail) added for cleaner public API with full TypeScript support.🆙 Bump
globalsfrom 17.0.0 to 17.1.0 (bump: bump globals from 17.0.0 to 17.1.0 #285)@typescript-eslint/eslint-pluginfrom 8.53.0 to 8.53.1 (bump: bump @typescript-eslint/eslint-plugin from 8.53.0 to 8.53.1 #283)rollupfrom 4.55.1 to 4.56.0 (bump: bump rollup from 4.55.1 to 4.56.0 #282)eslintfrom 9.39.2 to 10.0.0 (35eff80)cypress-io/github-actionfrom 7.1.0 to 7.1.1actions/setup-nodefrom 3 to 6actions/checkoutfrom 3 to 6actions/upload-pages-artifactfrom 3 to 4actions/upload-artifactfrom 4 to 6cypress-io/github-actionfrom 6.10.8 to 7.1.2github/codeql-actionfrom 3 to 4actions/download-artifactfrom 4 to 7Full Changelog: v5.2.0...v5.3.3
Beta Was this translation helpful? Give feedback.
All reactions