@iyulab/components 1.27.0 → 1.27.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
|
+
## [1.27.2] - 2026-08-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`u-input`'s form submission value now stays in sync with `value` across every change
|
|
8
|
+
path**, not just on blur. Previously, `ElementInternals.setFormValue()` was only called from
|
|
9
|
+
the blur handler, so submitting a form before a field lost focus (an initial `value`
|
|
10
|
+
attribute, a programmatic `.value =` assignment, or the clear button from 1.27.1) could send a
|
|
11
|
+
stale or missing value. Sync now happens reactively whenever `value` changes, matching
|
|
12
|
+
`u-select`'s existing contract.
|
|
13
|
+
|
|
14
|
+
## [1.27.1] - 2026-08-11
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`u-input[clearable]`'s built-in clear button now dispatches `change`**, matching the
|
|
19
|
+
existing contract on `u-select` and `u-date-picker`. Previously, clicking the clear icon
|
|
20
|
+
emptied the value visually but fired no event, so consumers binding to `change` (e.g. a
|
|
21
|
+
filter bound to `.value`/`@input`) never saw the reset.
|
|
22
|
+
|
|
3
23
|
## [1.27.0] - 2026-08-08
|
|
4
24
|
|
|
5
25
|
### Added
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
1
2
|
import { UFormControlElement } from '../UFormControlElement.js';
|
|
2
3
|
import { UPopover } from '../popover/UPopover.js';
|
|
3
4
|
export type InputType = 'text' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'number' | 'date' | 'time' | 'datetime-local' | 'month' | 'week';
|
|
@@ -81,6 +82,12 @@ export declare class UInput extends UFormControlElement<string> {
|
|
|
81
82
|
private options;
|
|
82
83
|
disconnectedCallback(): void;
|
|
83
84
|
render(): import('lit-html').TemplateResult<1>;
|
|
85
|
+
/** `value`가 바뀌는 모든 경로(초기 속성 설정 · 프로그램적 대입 · clear 버튼)에서
|
|
86
|
+
* 폼 제출값을 동기화한다 — 종전에는 `handleInputBlur`에서만 수동으로 호출해,
|
|
87
|
+
* blur 전에 폼이 제출되면(다른 컨트롤의 Enter 등) `FormData`가 낡은 값을 돌려줬다.
|
|
88
|
+
* 형제 `USelect`의 `updated()`+`onChangeValue()` 패턴과 같은 경계 — `T`가 이미
|
|
89
|
+
* `string`이라 `valueAsString` 같은 변환 없이 그대로 넘긴다. */
|
|
90
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
84
91
|
protected setValidity(): void;
|
|
85
92
|
reset(): void;
|
|
86
93
|
focus(options?: FocusOptions): void;
|
|
@@ -53,7 +53,6 @@ var UInput = class UInput extends UFormControlElement {
|
|
|
53
53
|
};
|
|
54
54
|
this.handleInputBlur = (_) => {
|
|
55
55
|
this.value = this.inputEl?.value || "";
|
|
56
|
-
this.internals?.setFormValue(this.value);
|
|
57
56
|
if (!this.novalidate) this.validate();
|
|
58
57
|
this.dispatchEvent(new Event("change", {
|
|
59
58
|
bubbles: true,
|
|
@@ -81,6 +80,10 @@ var UInput = class UInput extends UFormControlElement {
|
|
|
81
80
|
this.handleClearButtonClick = (e) => {
|
|
82
81
|
e.stopImmediatePropagation();
|
|
83
82
|
this.reset();
|
|
83
|
+
this.dispatchEvent(new Event("change", {
|
|
84
|
+
bubbles: true,
|
|
85
|
+
composed: true
|
|
86
|
+
}));
|
|
84
87
|
this.focus();
|
|
85
88
|
};
|
|
86
89
|
this.handleOptionClick = (e) => {
|
|
@@ -209,6 +212,15 @@ var UInput = class UInput extends UFormControlElement {
|
|
|
209
212
|
</u-popover>
|
|
210
213
|
`;
|
|
211
214
|
}
|
|
215
|
+
/** `value`가 바뀌는 모든 경로(초기 속성 설정 · 프로그램적 대입 · clear 버튼)에서
|
|
216
|
+
* 폼 제출값을 동기화한다 — 종전에는 `handleInputBlur`에서만 수동으로 호출해,
|
|
217
|
+
* blur 전에 폼이 제출되면(다른 컨트롤의 Enter 등) `FormData`가 낡은 값을 돌려줬다.
|
|
218
|
+
* 형제 `USelect`의 `updated()`+`onChangeValue()` 패턴과 같은 경계 — `T`가 이미
|
|
219
|
+
* `string`이라 `valueAsString` 같은 변환 없이 그대로 넘긴다. */
|
|
220
|
+
updated(changedProperties) {
|
|
221
|
+
super.updated(changedProperties);
|
|
222
|
+
if (changedProperties.has("value")) this.internals?.setFormValue(this.value ?? "");
|
|
223
|
+
}
|
|
212
224
|
setValidity() {
|
|
213
225
|
const v = this.inputEl?.validity;
|
|
214
226
|
let flags = {};
|