@iyulab/components 2.25.0 → 2.26.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.26.0] - 2026-10-14
4
+
5
+ ### Added
6
+
7
+ - `u-field` parts `header`, `label`, `required` and `footer` — a theme can draw the label row and the line under the
8
+ control (description, or the validation message while `invalid`) its own way. Before, only the hint icon and its
9
+ tooltip were reachable.
10
+
3
11
  ## [2.25.0] - 2026-10-14
4
12
 
5
13
  ### Added
@@ -15,6 +15,10 @@ export type FieldDescriptionDisplay = 'inline' | 'hint';
15
15
  *
16
16
  * @slot - 폼 컨트롤 (input, select, textarea 등)
17
17
  * @slot label-aside - 라벨 오른쪽 슬롯 영역 (숫자 표시, 알림 등)
18
+ * @csspart header - 라벨 줄(라벨 · 정보 아이콘 · `label-aside`)
19
+ * @csspart label - 라벨
20
+ * @csspart required - 필수 표시
21
+ * @csspart footer - 컨트롤 아래 줄(설명, 또는 `invalid` 일 때 검증 문구 — `u-field[invalid]::part(footer)` 로 가른다)
18
22
  * @csspart hint - `description-display="hint"` 의 정보 아이콘 감싸개
19
23
  * @csspart hint-tooltip - 그 툴팁
20
24
  */
@@ -108,9 +108,9 @@ var UField = class UField extends UElement {
108
108
  }
109
109
  render() {
110
110
  return html`
111
- <div class="header" ?hidden=${!this.label}>
112
- <label class="label" @click=${this.handleLabelClick}>
113
- <span class="required" ?hidden=${!this.required}>*</span>
111
+ <div class="header" part="header" ?hidden=${!this.label}>
112
+ <label class="label" part="label" @click=${this.handleLabelClick}>
113
+ <span class="required" part="required" ?hidden=${!this.required}>*</span>
114
114
  ${this.label}
115
115
  </label>
116
116
  ${this.renderHint()}
@@ -168,7 +168,7 @@ var UField = class UField extends UElement {
168
168
  renderFooter() {
169
169
  const message = this.invalid && this.validationMessage ? this.validationMessage : this.effectiveDescriptionDisplay === "inline" ? this.description : void 0;
170
170
  if (!message) return nothing;
171
- return html`<div class="footer">${message}</div>`;
171
+ return html`<div class="footer" part="footer">${message}</div>`;
172
172
  }
173
173
  /** 슬롯에 꽂힌 첫 포커스 가능 자식으로 위임한다 — 라벨 클릭과 같은 대상 탐색 로직을
174
174
  * 공개 API로도 노출해, 소비자가 임의의 폼 컨트롤(자체 웹 컴포넌트가 아닌 것 포함)을
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.25.0",
4
+ "version": "2.26.0",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -112,6 +112,10 @@ is not a Tab stop — a form of dozens of fields would otherwise double its Tabs
112
112
 
113
113
  | Part | Description |
114
114
  |------|-------------|
115
+ | `header` | The label row (label · info icon · `label-aside`) |
116
+ | `label` | The label |
117
+ | `required` | The required marker |
118
+ | `footer` | The line under the control — the description, or the validation message while `invalid` (tell them apart with `u-field[invalid]::part(footer)`) |
115
119
  | `hint` | The info icon beside the label (`description-display="hint"`) |
116
120
  | `hint-tooltip` | The tooltip that holds the description |
117
121