Releases: frost-js/ui-switch
Releases · frost-js/ui-switch
Release list
v3.0.0
Major release adopting Frost UI 4 and fQuery 5, adding compiled ESM exports, and improving switch accessibility, transitions, form synchronization, and component cleanup.
Breaking Changes
- Requires
@fr0st/ui4 and@fr0st/query5 as peer dependencies. Browser applications must load compatible builds; Frost UI's all-in-one bundle supplies both dependencies. Load Frost UI 4 CSS alongside the Switch stylesheet. - The package root now resolves to the compiled ESM bundle. Package exports expose the root,
dist/*, andsrc/*; internal prototype modules have been replaced with private component methods. - Declared Node.js support is
^20.19.0 || ^22.13.0 || >=24.
Fixed
- Exposed a single accessible switch by hiding the original checkbox from the accessibility tree while retaining native form submission and required validation. Preserved focus when initializing a focused input and restored its original
aria-hiddenvalue during disposal. - Improved accessible names from explicit labels, wrapping labels, and existing ARIA label references, and preserved existing or application-modified label IDs during cleanup.
- Handled rapid and interrupted state transitions, allowed repeated toggles to reverse the pending target, and prevented stale animation callbacks from changing reset or disposed controls.
- Synchronized the rendered state after native form resets, respected canceled resets and subsequent explicit state changes, and supported inputs associated with external forms.
- Recovered automatic sizing after hidden initialization and fell back to measured widths for invalid width options.
- Canceled active dragging when disabling a switch, suppressed drag-generated clicks, and corrected RTL positioning and drag direction.
- Restored original input visibility and tabindex while preserving unrelated classes, and made repeated disposal safe without affecting replacement instances.
- Removed the demo intro's column divider and corrected its Frost UI version badge.
Improved
- Replaced JavaScript-driven movement with CSS transform transitions, scaled transition duration for partial movement, and respected reduced-motion preferences.
- Updated rendering and demos for Frost UI 4, including semantic styles, five sizes, themes, and RTL layouts.
- Added compiled ESM and UMD bundles with source maps, modernized build tooling, and updated development dependencies.
- Added cross-browser Playwright coverage and CI, including accessibility, focus, form validation, reset, hidden-layout, transition, and disposal regression tests.
- Aligned README installation and development guidance and improved JSDoc option types and state-change documentation.
v2.0.10
v2.0.9
v2.0.8
- Disabled
preventDefaulton mouse drag event. - Modified focus styling to use focus-visible.
v2.0.7
v2.0.6
- Fixed bug where no label generated undefined aria-labelledby attribute.
v2.0.5
v2.0.4
v2.0.3
- Prevented tab focus when disabled.
- Added ARIA attributes.
- Updated NPM.
v2.0.2
- Updated FrostUI in demos.
- Updated NPM.