@iyulab/components 1.32.0 → 1.33.0
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 +11 -0
- package/dist/components/radio/URadio.d.ts +5 -0
- package/dist/components/radio/URadio.js +9 -0
- package/dist/components/rating/URating.d.ts +7 -0
- package/dist/components/rating/URating.js +12 -0
- package/package.json +1 -1
- package/skills/iyulab-components/references/components/radio.md +2 -0
- package/skills/iyulab-components/references/components/rating.md +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.33.0] - 2026-08-21
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`u-radio` and `u-rating` now support `.focus()`/`.blur()` on the host element too**,
|
|
8
|
+
completing the same contract added to the rest of the form controls in `1.32.0`. Both are
|
|
9
|
+
option/symbol *groups* rather than a single target, so `.focus()` delegates to the first
|
|
10
|
+
option (`u-radio`) or the first symbol (`u-rating`) regardless of the current selection —
|
|
11
|
+
the same "one fixed delegation target" contract every other control in this library now
|
|
12
|
+
shares, rather than adding value-aware branching.
|
|
13
|
+
|
|
3
14
|
## [1.32.0] - 2026-08-21
|
|
4
15
|
|
|
5
16
|
### Added
|
|
@@ -31,6 +31,11 @@ export declare class URadio extends UFormControlElement<string> {
|
|
|
31
31
|
render(): import('lit-html').TemplateResult<1>;
|
|
32
32
|
protected setValidity(): void;
|
|
33
33
|
reset(): void;
|
|
34
|
+
/** 그룹의 첫 포커스 가능 옵션으로 위임한다(선택된 값과 무관 — 나머지 폼 컨트롤과
|
|
35
|
+
* 같은 "위임 대상이 하나로 고정된 단순 계약"을 유지한다). 옵션 자신이 host에
|
|
36
|
+
* 실제 tabindex를 갖는 커스텀 엘리먼트라 `UOption.focus()`가 이미 동작한다. */
|
|
37
|
+
focus(options?: FocusOptions): void;
|
|
38
|
+
blur(): void;
|
|
34
39
|
private setup;
|
|
35
40
|
private cleanup;
|
|
36
41
|
private onChangeValue;
|
|
@@ -108,6 +108,15 @@ var URadio = class URadio extends UFormControlElement {
|
|
|
108
108
|
this.value = void 0;
|
|
109
109
|
this.invalid = false;
|
|
110
110
|
}
|
|
111
|
+
/** 그룹의 첫 포커스 가능 옵션으로 위임한다(선택된 값과 무관 — 나머지 폼 컨트롤과
|
|
112
|
+
* 같은 "위임 대상이 하나로 고정된 단순 계약"을 유지한다). 옵션 자신이 host에
|
|
113
|
+
* 실제 tabindex를 갖는 커스텀 엘리먼트라 `UOption.focus()`가 이미 동작한다. */
|
|
114
|
+
focus(options) {
|
|
115
|
+
this.options.find((o) => !o.disabled)?.focus(options);
|
|
116
|
+
}
|
|
117
|
+
blur() {
|
|
118
|
+
(this.shadowRoot?.activeElement)?.blur();
|
|
119
|
+
}
|
|
111
120
|
setup(options) {
|
|
112
121
|
for (const option of options) {
|
|
113
122
|
option.removeEventListener("click", this.handleOptionClick);
|
|
@@ -37,6 +37,13 @@ export declare class URating extends UFormControlElement<number> {
|
|
|
37
37
|
protected setValidity(): void;
|
|
38
38
|
private isStepMismatch;
|
|
39
39
|
reset(): void;
|
|
40
|
+
/** 첫(최저 점수) 심볼로 위임한다(선택된 값과 무관 — 나머지 폼 컨트롤과 같은
|
|
41
|
+
* "위임 대상이 하나로 고정된 단순 계약"을 유지한다). 심볼은 shadow DOM 안의
|
|
42
|
+
* `<span>`이라 disabled/readonly일 때 `tabindex="-1"`(=`!interactive`)이고,
|
|
43
|
+
* 다른 컴포넌트의 `.container`/thumb와 같은 이유로 프로그램적 focus는 여전히
|
|
44
|
+
* 통과하므로 직접 가드한다. */
|
|
45
|
+
focus(options?: FocusOptions): void;
|
|
46
|
+
blur(): void;
|
|
40
47
|
private onChangeValue;
|
|
41
48
|
/** 사용자 상호작용으로 값이 바뀐 경로에서만 호출한다 — 프로그램적 value 세팅은
|
|
42
49
|
* 네이티브 폼 컨트롤과 동일하게 change를 발화하지 않는다.
|
|
@@ -175,6 +175,18 @@ var URating = class URating extends UFormControlElement {
|
|
|
175
175
|
this.value = 0;
|
|
176
176
|
this.invalid = false;
|
|
177
177
|
}
|
|
178
|
+
/** 첫(최저 점수) 심볼로 위임한다(선택된 값과 무관 — 나머지 폼 컨트롤과 같은
|
|
179
|
+
* "위임 대상이 하나로 고정된 단순 계약"을 유지한다). 심볼은 shadow DOM 안의
|
|
180
|
+
* `<span>`이라 disabled/readonly일 때 `tabindex="-1"`(=`!interactive`)이고,
|
|
181
|
+
* 다른 컴포넌트의 `.container`/thumb와 같은 이유로 프로그램적 focus는 여전히
|
|
182
|
+
* 통과하므로 직접 가드한다. */
|
|
183
|
+
focus(options) {
|
|
184
|
+
if (!this.interactive) return;
|
|
185
|
+
this.renderRoot.querySelector(".symbol")?.focus(options);
|
|
186
|
+
}
|
|
187
|
+
blur() {
|
|
188
|
+
(this.shadowRoot?.activeElement)?.blur();
|
|
189
|
+
}
|
|
178
190
|
onChangeValue() {
|
|
179
191
|
this.buffer = -1;
|
|
180
192
|
this.internals?.setFormValue(this.value?.toString() || "");
|
package/package.json
CHANGED
|
@@ -58,6 +58,8 @@ Radio group built from `u-option` children. Form-associated.
|
|
|
58
58
|
|--------|-------------|
|
|
59
59
|
| `validate()` | Validate; sets `invalid` |
|
|
60
60
|
| `reset()` | Reset selection |
|
|
61
|
+
| `focus(options?)` | Focus the first option (regardless of selection) |
|
|
62
|
+
| `blur()` | Blur the currently focused option, if any |
|
|
61
63
|
|
|
62
64
|
## CSS Parts
|
|
63
65
|
|
|
@@ -56,6 +56,8 @@ Star/custom-symbol rating input. Supports fractional precision and custom symbol
|
|
|
56
56
|
|--------|-------------|
|
|
57
57
|
| `validate()` | Validate; sets `invalid` |
|
|
58
58
|
| `reset()` | Reset value |
|
|
59
|
+
| `focus(options?)` | Focus the first symbol (regardless of value) |
|
|
60
|
+
| `blur()` | Blur the currently focused symbol, if any |
|
|
59
61
|
|
|
60
62
|
## CSS Parts
|
|
61
63
|
|