@iyulab/components 1.34.0 → 1.35.1

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,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.35.1] - 2026-08-30
4
+
5
+ ### Fixed
6
+
7
+ - **`UCheckbox`'s checked-state checkmark icon could intercept clicks aimed at the
8
+ checkbox.** The icon lacked `pointer-events: none`, so once checked it became the
9
+ topmost element at that point — native clicks still reached the control via
10
+ bubbling, but anything that hit-tests the topmost element before acting (browser
11
+ automation, some accessibility tooling) could see it as blocked. Same fix applied
12
+ to `UTreeItem`'s prefix checkbox and expand/collapse toggle icons, which shared the
13
+ identical pattern.
14
+
15
+ ## [1.35.0] - 2026-08-28
16
+
17
+ ### Added
18
+
19
+ - **`USelect` fires a `search` event on every search-input change when
20
+ `searchable`.** The search text was already computed internally to drive
21
+ the built-in local option filtering, but never surfaced — a consumer
22
+ binding `USelect` to a large server-paginated dataset had no way to hook
23
+ into it and had to rebuild the search UI from scratch to do remote
24
+ search. `search` (`detail: { query: string }`, non-cancelable) fires
25
+ alongside the existing local filtering, so a consumer can subscribe and
26
+ drive remote search without losing the built-in search input. Mapped
27
+ through to the React wrapper as `onSearch`.
28
+
3
29
  ## [1.34.0] - 2026-08-28
4
30
 
5
31
  ### Added
@@ -157,11 +157,12 @@ var styles = css`
157
157
  transition: border-color var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1)), background-color var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
158
158
  }
159
159
 
160
- /* 체크박스 아이콘 */
160
+ /* 체크박스 아이콘 — 클릭은 항상 .checkbox 박스가 받아야 한다 */
161
161
  .checkbox u-icon {
162
162
  font-size: 0.85em;
163
163
  transform: scale(0);
164
164
  transition: transform var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
165
+ pointer-events: none;
165
166
  }
166
167
 
167
168
  .label {
@@ -24,6 +24,9 @@ export type SelectVariant = 'outlined' | 'filled' | 'underlined' | 'borderless';
24
24
  *
25
25
  * @event change - 사용자 상호작용(옵션 클릭·칩 제거·지우기)으로 선택 값이 변경될 때 발생.
26
26
  * 네이티브 select와 동일하게 프로그램적 value 세팅·옵션 등록으로는 발화하지 않는다.
27
+ * @event search - `searchable`일 때 검색 입력이 바뀔 때마다 발생(`detail: { query: string }`).
28
+ * 로컬 필터링(이미 렌더된 `u-option`의 `hidden` 토글)과 별개로 발행되므로, 서버/원격 검색이
29
+ * 필요한 소비자는 이 이벤트를 구독해 자체적으로 옵션을 갱신할 수 있다.
27
30
  */
28
31
  export declare class USelect extends UFormControlElement<string | string[]> {
29
32
  static styles: import('lit').CSSResultGroup[];
@@ -86,6 +86,10 @@ var USelect = class USelect extends UFormControlElement {
86
86
  const value = option.value.toLowerCase();
87
87
  option.hidden = !label.includes(query) && !value.includes(query);
88
88
  }
89
+ this.fire("search", {
90
+ detail: { query },
91
+ cancelable: false
92
+ });
89
93
  };
90
94
  this.handleSearchKeydown = (e) => {
91
95
  const options = this.options.filter((o) => !o.hidden && !o.disabled);
@@ -71,6 +71,7 @@ var styles = css`
71
71
  }
72
72
  .prefix-toggler u-icon {
73
73
  font-size: 12px;
74
+ pointer-events: none;
74
75
  }
75
76
  :host(:not([disabled])[trigger="icon"]) .prefix-toggler:hover,
76
77
  :host(:not([disabled])[trigger="icon"]:focus-visible) .prefix-toggler {
@@ -96,6 +97,7 @@ var styles = css`
96
97
  visibility: hidden;
97
98
  font-size: 12px;
98
99
  color: #fff;
100
+ pointer-events: none;
99
101
  }
100
102
  .prefix-checkbox[checked],
101
103
  .prefix-checkbox[indeterminate] {
@@ -3,10 +3,11 @@ import { USelect as USelectElement } from '../components/select/USelect';
3
3
 
4
4
  export declare const USelect: React.ForwardRefExoticComponent<
5
5
  Omit<Partial<USelectElement>, keyof React.HTMLAttributes<USelectElement>>
6
- & Omit<React.HTMLAttributes<USelectElement>, 'onChange'>
6
+ & Omit<React.HTMLAttributes<USelectElement>, 'onChange' | 'onSearch'>
7
7
  & React.RefAttributes<USelectElement>
8
8
  & {
9
9
  onChange?: (event: CustomEvent) => void;
10
+ onSearch?: (event: CustomEvent<{ query: string }>) => void;
10
11
  }
11
12
  >;
12
13
 
@@ -8,5 +8,6 @@ export const USelect = createComponent({
8
8
  elementClass: USelectElement,
9
9
  events: {
10
10
  onChange: 'change',
11
+ onSearch: 'search',
11
12
  },
12
13
  });
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": "1.34.0",
4
+ "version": "1.35.1",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -59,6 +59,7 @@ Dropdown select with single or multiple selection, search, and clear support. Fo
59
59
  | Event | Description |
60
60
  |-------|-------------|
61
61
  | `change` | Fires when selection changes |
62
+ | `search` | Fires on every search input change when `searchable` (`detail: { query: string }`). Fires alongside the built-in local filtering — subscribe to it to drive remote/server-side search instead of (or in addition to) the local filter |
62
63
 
63
64
  ## Methods
64
65