Skip to content

Commit 1c5c4dc

Browse files
committed
chore: release v2.4.1
1 parent f30de78 commit 1c5c4dc

36 files changed

Lines changed: 276 additions & 117 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
6+
## [2.4.1] - [26-September-2025]
7+
8+
## Added
9+
10+
* **Dropdown**: `--mega-menu:{boolean}` ensures the Mega Menu remains fully visible on small screens without getting clipped.
11+
* **Advanced Select**: Added support for [Option disabled state](https://flyonui.com/docs/advanced-forms/advanced-select/#option-disabled) [FeatureReq #117].
12+
* **Tooltip**: Reintroduced `--interaction` for [Popover interaction](https://flyonui.com/docs/overlays/popover/#interaction) [Issue #117].
13+
14+
## Fixes and Improvements
15+
16+
* **Dropdown**:
17+
* Fixed issue where the input element in the dropdown couldn't receive focus or allow typing. [Issue #118]
18+
* Resolved placement issue. [Issue #114]
19+
* Fixed non-functioning `OnEnter` behavior.
20+
* **Overlay**: Fixed issue with `data-overlay-keyboard="false"`. [Issue #116]
21+
* **Combo Box**: Fixed keyboard interaction for `Arrow`, `Home`, and `End` keys.
22+
23+
524
## [2.4.0] - [06-August-2025]
625

726
## Added

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Created by [ThemeSelection](https://themeselection.com), with a commitment to em
3636
- [Getting Started 🏁](#getting-started-)
3737
- [Installation via NPM](#installation-via-npm)
3838
- [RTL (Right-to-Left) Language Support](#rtl-right-to-left-language-support)
39+
- [Star History 🌟](#star-history-)
3940
- [Available Components 🧩](#available-components-)
4041
- [Component Examples](#component-examples)
4142
- [Community 🤝](#community-)
@@ -224,7 +225,7 @@ To use FlyonUI, ensure that you have [Node.js](https://nodejs.org/en/) and [Tail
224225
@source "./node_modules/flyonui/dist/accordion.js";
225226
```
226227

227-
3. For enabling interactive components such as accordion, dropdown, modal etc... , include FlyonUI's JavaScript in your HTML file, just before the closing `</body>` tag:
228+
3. For enabling interactive components such as accordion, dropdown, modal etc... , include FlyonUI's JavaScript in your HTML file, just before the closing `</body>` tag:
228229

229230
```html
230231
<script src="../node_modules/flyonui/flyonui.js"></script>

flyonui.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ export declare class HSComboBox extends HSBasePlugin<IComboBoxOptions> implement
383383
private appendItemsToWrapper;
384384
private resultItems;
385385
private destroyOutputPlaceholder;
386-
private getPreparedItems;
387386
private setHighlighted;
388387
private setupAccessibility;
389388
private onEnter;
@@ -1221,6 +1220,7 @@ export declare class HSTooltip extends HSBasePlugin<{}> implements ITooltip {
12211220
readonly eventMode: string;
12221221
private readonly preventFloatingUI;
12231222
private readonly placement;
1223+
private readonly interaction;
12241224
private readonly strategy;
12251225
private readonly scope;
12261226
cleanupAutoUpdate: (() => void) | null;

flyonui.js

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flyonui",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"type": "module",
55
"description": "The easiest, free and open-source Tailwind CSS component library with semantic classes.",
66
"author": "ThemeSelection",
@@ -131,4 +131,4 @@
131131
"dependencies": {
132132
"@floating-ui/dom": "^1.7.1"
133133
}
134-
}
134+
}

src/js/helpers/apexcharts/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* @version: 3.2.2
2+
* @version: 3.2.3
33
* @author: Preline Labs Ltd.
44
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
55
* Copyright 2024 Preline Labs Ltd.

src/js/helpers/clipboard/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* @version: 3.2.2
2+
* @version: 3.2.3
33
* @author: Preline Labs Ltd.
44
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
55
* Copyright 2024 Preline Labs Ltd.

src/js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* @version: 3.2.2
2+
* @version: 3.2.3
33
* @author: Preline Labs Ltd.
44
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
55
* Copyright 2024 Preline Labs Ltd.

src/js/plugins/accessibility-manager/index.ts

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ class HSAccessibilityObserver {
55
private currentlyOpenedComponents: IAccessibilityComponent[] = []
66
private activeComponent: IAccessibilityComponent | null = null
77

8+
private readonly allowedKeybindings = new Set([
9+
'Escape',
10+
'Enter',
11+
' ',
12+
'Space',
13+
'ArrowDown',
14+
'ArrowUp',
15+
'ArrowLeft',
16+
'ArrowRight',
17+
'Tab',
18+
'Home',
19+
'End'
20+
])
21+
822
constructor() {
923
this.initGlobalListeners()
1024
}
@@ -15,6 +29,25 @@ class HSAccessibilityObserver {
1529
document.addEventListener('focusin', evt => this.handleGlobalFocusin(evt))
1630
}
1731

32+
private isAllowedKeybinding(evt: KeyboardEvent): boolean {
33+
if (this.allowedKeybindings.has(evt.key)) {
34+
return true
35+
}
36+
37+
if (
38+
evt.key.length === 1 &&
39+
/^[a-zA-Z]$/.test(evt.key) &&
40+
!evt.metaKey &&
41+
!evt.ctrlKey &&
42+
!evt.altKey &&
43+
!evt.shiftKey
44+
) {
45+
return true
46+
}
47+
48+
return false
49+
}
50+
1851
private getActiveComponent(el: HTMLElement) {
1952
if (!el) return null
2053

@@ -57,6 +90,10 @@ class HSAccessibilityObserver {
5790

5891
if (!this.activeComponent) return
5992

93+
if (!this.isAllowedKeybinding(evt)) {
94+
return
95+
}
96+
6097
switch (evt.key) {
6198
case 'Escape':
6299
if (!this.activeComponent.isOpened) {
@@ -106,14 +143,12 @@ class HSAccessibilityObserver {
106143
evt.stopPropagation()
107144
}
108145
break
109-
case 'Tab':
146+
case 'Tab': {
110147
if (!this.activeComponent.handlers.onTab) break
111-
112148
const handler = evt.shiftKey ? this.activeComponent.handlers.onShiftTab : this.activeComponent.handlers.onTab
113-
114149
if (handler) handler()
115-
116150
break
151+
}
117152
case 'Home':
118153
if (this.activeComponent.handlers.onHome) {
119154
this.activeComponent.handlers.onHome()
@@ -129,6 +164,9 @@ class HSAccessibilityObserver {
129164
}
130165
break
131166
default:
167+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
168+
return
169+
}
132170
if (this.activeComponent.handlers.onFirstLetter && evt.key.length === 1 && /^[a-zA-Z]$/.test(evt.key)) {
133171
this.activeComponent.handlers.onFirstLetter(evt.key)
134172
evt.preventDefault()
@@ -194,6 +232,18 @@ class HSAccessibilityObserver {
194232
this.components = this.components.filter(comp => comp !== component)
195233
this.currentlyOpenedComponents = this.currentlyOpenedComponents.filter(comp => comp !== component)
196234
}
235+
236+
public addAllowedKeybinding(key: string): void {
237+
this.allowedKeybindings.add(key)
238+
}
239+
240+
public removeAllowedKeybinding(key: string): void {
241+
this.allowedKeybindings.delete(key)
242+
}
243+
244+
public getAllowedKeybindings(): string[] {
245+
return Array.from(this.allowedKeybindings)
246+
}
197247
}
198248

199249
export default HSAccessibilityObserver

src/js/plugins/accessibility-manager/interfaces.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ export interface HSAccessibilityObserver {
3030
selector?: string,
3131
context?: HTMLElement
3232
): IAccessibilityComponent
33+
addAllowedKeybinding(key: string): void
34+
removeAllowedKeybinding(key: string): void
35+
getAllowedKeybindings(): string[]
3336
}

0 commit comments

Comments
 (0)