@iyulab/components 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.2] - 2026-10-06
4
+
5
+ ### Fixed
6
+
7
+ - **Space on a `u-select` option selects without scrolling the list.** In a `multiple` select the
8
+ list stays open, and each Space toggled the option *and* scrolled the list, carrying the focused
9
+ option away from the pointer's view. Enter and Space now only select.
10
+ - **Space on a `u-tab` selects the tab without scrolling the page.**
11
+ - **Keys pressed on a tab's close button belong to the button** (`u-tab[removable]` in
12
+ `u-tab-panel`). An arrow key on the close button moved to the next tab, and Enter selected the tab
13
+ being closed before closing it. The tab keyboard model now applies only while the tab itself has
14
+ focus.
15
+
16
+ ### Tests
17
+
18
+ - Keyboard contracts of `u-radio` (arrows move focus and selection together and wrap, Home/End,
19
+ disabled options skipped, one tab stop) and `u-select` (open with Enter, arrows/Home/End on
20
+ options, Enter/Space select, Escape closes and returns focus, search field arrows to the
21
+ first/last visible option) are now pressed with real key input.
22
+
3
23
  ## [2.0.1] - 2026-10-05
4
24
 
5
25
  ### Fixed
@@ -62,6 +62,7 @@ var USelect = class USelect extends UFormControlElement {
62
62
  switch (e.key) {
63
63
  case "Enter":
64
64
  case " ":
65
+ e.preventDefault();
65
66
  currentOption.click();
66
67
  break;
67
68
  case "ArrowDown":
@@ -44,6 +44,7 @@ var UTabPanel = class UTabPanel extends UElement {
44
44
  this.change(tab.value);
45
45
  };
46
46
  this.handleTabKeydown = (e) => {
47
+ if (e.composedPath()[0] !== e.currentTarget) return;
47
48
  const enabledTabs = this.tabs.filter((t) => !t.disabled);
48
49
  const currentIndex = enabledTabs.indexOf(e.currentTarget);
49
50
  if (currentIndex === -1) return;
@@ -63,6 +64,7 @@ var UTabPanel = class UTabPanel extends UElement {
63
64
  break;
64
65
  case "Enter":
65
66
  case " ":
67
+ e.preventDefault();
66
68
  this.change(enabledTabs[currentIndex].value);
67
69
  return;
68
70
  default: return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/components",
3
3
  "description": "web-components library based on lit-element made by iyulab",
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",