@iyulab/components 1.3.2 → 1.3.3
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,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.3] - 2026-07-03
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- `UCheckbox`: 클래스 JSDoc에 `@event change` 태그 누락으로 공식 React 래퍼(`@iyulab/components/react`)의 `UCheckbox` props가 빈 `{}`로 생성되어 `onChange`가 노출되지 않던 결함 수정. 런타임은 `this.relay(e)`로 `change`를 정상 발생시키지만, 래퍼 생성기가 `@event` 태그(또는 `this.fire<T>('name')` 리터럴)로만 이벤트 맵을 도출하므로 태그가 없으면 이벤트가 누락된다. (`USwitch`/`UInput`/`UTextarea`는 태그 보유 — `relay()`를 쓰는 폼 컨트롤 중 `UCheckbox`만 누락되어 있었음.) yesung-oms dogfooding에서 발견.
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- `plugins/vite-plugin-react-wrapper.ts`: `@customElement` 컴포넌트가 `this.relay(...)`/`this.dispatchEvent(...)`로 이벤트를 발생시키지만 수집된 이벤트가 0건이면 빌드 시 경고를 출력하도록 개선 — 위 `UCheckbox`류의 "태그 누락으로 이벤트가 조용히 사라지는" 결함 재발 방지. (`this.fire<T>('name')`은 이름이 정적으로 잡히므로 경고 대상이 아님.)
|
|
10
|
+
|
|
3
11
|
## [1.3.2] - 2026-07-02
|
|
4
12
|
|
|
5
13
|
### Documentation
|
package/README.md
CHANGED
|
@@ -100,6 +100,7 @@ Theme.set('system');
|
|
|
100
100
|
| [docs/theming.md](./docs/theming.md) | 테마 및 CSS 변수 |
|
|
101
101
|
| [docs/form-controls.md](./docs/form-controls.md) | 폼 연동 및 검증 API |
|
|
102
102
|
| [docs/icons.md](./docs/icons.md) | 아이콘 등록 및 사용 |
|
|
103
|
+
| [docs/native-event.md](./docs/native-event.md) | 컴포넌트가 다루는 네이티브 DOM 이벤트 목록 |
|
|
103
104
|
|
|
104
105
|
## License
|
|
105
106
|
|
|
@@ -16,6 +16,8 @@ export type CheckboxColor = "blue" | "green" | "red" | "orange" | "teal" | "cyan
|
|
|
16
16
|
* @cssprop --checkbox-color - 체크 표시 색상 (outline variant)
|
|
17
17
|
* @cssprop --checkbox-border-color - 체크박스 테두리 색상
|
|
18
18
|
* @cssprop --checkbox-background-color - 체크박스 배경색 (filled variant)
|
|
19
|
+
*
|
|
20
|
+
* @event change - 체크 상태 변경 시 발생
|
|
19
21
|
*/
|
|
20
22
|
export declare class UCheckbox extends UFormControlElement<string> {
|
|
21
23
|
static styles: import('lit').CSSResultGroup[];
|
|
@@ -3,6 +3,7 @@ import { UCheckbox as UCheckboxElement } from '../components/checkbox/UCheckbox'
|
|
|
3
3
|
|
|
4
4
|
export declare const UCheckbox: React.ForwardRefExoticComponent<
|
|
5
5
|
Partial<UCheckboxElement> & React.HTMLAttributes<UCheckboxElement> & {
|
|
6
|
+
onChange?: (event: CustomEvent) => void;
|
|
6
7
|
}
|
|
7
8
|
>;
|
|
8
9
|
|
package/dist/react/UCheckbox.js
CHANGED
package/package.json
CHANGED
|
@@ -63,6 +63,14 @@ function parseComponent(filePath) {
|
|
|
63
63
|
if (!classMatch)
|
|
64
64
|
return [];
|
|
65
65
|
const events = collectEvents(content);
|
|
66
|
+
// 이벤트를 발생시키지만(relay/dispatchEvent) 정적으로 이름을 도출할 수 없는 컴포넌트가
|
|
67
|
+
// @event 태그도 없으면 events 맵이 빈 채로 생성되어 React 소비자가 이벤트를 구독할 수 없다.
|
|
68
|
+
// (this.fire<T>('name')은 이름이 문자열 리터럴로 잡히므로 이 경고 대상이 아님)
|
|
69
|
+
if (events.length === 0 && /this\.(relay|dispatchEvent)\s*\(/.test(content)) {
|
|
70
|
+
console.warn(`\x1b[33m[react-wrapper]\x1b[0m ${classMatch[1]} (${tagMatch[1]}): ` +
|
|
71
|
+
`이벤트를 발생시키지만(relay/dispatchEvent) @event 태그가 없어 React 래퍼에 이벤트 prop이 노출되지 않습니다. ` +
|
|
72
|
+
`클래스 JSDoc에 '@event <name>'을 추가하세요.`);
|
|
73
|
+
}
|
|
66
74
|
return [{
|
|
67
75
|
className: classMatch[1],
|
|
68
76
|
tagName: tagMatch[1],
|