@iyulab/components 2.29.0 → 2.30.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/UFloatingElement.d.ts +7 -0
  3. package/dist/components/UFloatingElement.js +23 -3
  4. package/dist/components/UFormControlElement.d.ts +6 -0
  5. package/dist/components/UFormControlElement.js +4 -0
  6. package/dist/components/badge/UBadge.d.ts +1 -1
  7. package/dist/components/date-picker/UDatePicker.js +1 -0
  8. package/dist/components/date-range-picker/UDateRangePicker.js +1 -0
  9. package/dist/components/field/UField.d.ts +7 -3
  10. package/dist/components/field/UField.js +24 -3
  11. package/dist/components/field/UField.styles.js +2 -0
  12. package/dist/components/file-input/UFileInput.js +1 -0
  13. package/dist/components/input/UInput.js +1 -0
  14. package/dist/components/radio/URadio.js +1 -0
  15. package/dist/components/rating/URating.js +1 -0
  16. package/dist/components/select/USelect.js +1 -0
  17. package/dist/components/slider/USlider.js +1 -0
  18. package/dist/components/tab/UTab.d.ts +12 -0
  19. package/dist/components/tab/UTab.js +14 -2
  20. package/dist/components/tab/UTab.styles.js +10 -0
  21. package/dist/components/textarea/UTextarea.js +1 -0
  22. package/package.json +1 -1
  23. package/skills/iyulab-components/references/components/date-picker.md +1 -0
  24. package/skills/iyulab-components/references/components/date-range-picker.md +1 -0
  25. package/skills/iyulab-components/references/components/field.md +8 -4
  26. package/skills/iyulab-components/references/components/file-input.md +1 -0
  27. package/skills/iyulab-components/references/components/input.md +1 -0
  28. package/skills/iyulab-components/references/components/select.md +1 -0
  29. package/skills/iyulab-components/references/components/tab-panel.md +1 -0
  30. package/skills/iyulab-components/references/components/textarea.md +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.30.1] - 2026-10-20
4
+
5
+ ### Fixed
6
+
7
+ - Open floating elements (`u-select`, `u-popover`, `u-tooltip`, menus, pickers) no longer stay `visibility: hidden` when the
8
+ ancestor that was clipping their anchor changes size. The anchor-hidden check only re-ran on scroll and on anchor/popup
9
+ resizes, so a collapsed section that expanded after the popup opened left the anchor fully visible and the open popup
10
+ invisible. Clipping ancestors are now observed for size changes while a popup is tracked.
11
+
12
+ ## [2.30.0] - 2026-10-17
13
+
14
+ ### Added
15
+
16
+ - Form controls (`u-input`, `u-select`, `u-textarea`, `u-date-picker`, `u-date-range-picker`, `u-file-input`,
17
+ `u-radio`, `u-rating`, `u-slider`) take `description-display` (`inline` · `hint`) for the field they render — empty
18
+ follows the app-wide `UField.descriptionDisplay`. Fold help text into hints app-wide and keep a note about the
19
+ current state (why a field is locked, an input limit) under its control.
20
+ - `u-tab` `count-appearance` — `badge` (the pill, default) or `plain` (no pill: a smaller, weaker number beside the
21
+ label, for a detail page with many tabs where seven pills read before the labels). `UTab.countAppearance` sets the app
22
+ default; a tab's own attribute wins.
23
+
24
+ ### Fixed
25
+
26
+ - `description-display="hint"`: a programmatic `focus()` no longer opens the hint — a drawer or dialog focusing its first
27
+ field on open showed that field's tooltip over the control and blocked clicks on it. The hint opens on Tab (and on
28
+ hover and tap, as before). The open tooltip also lets clicks through to what is under it.
29
+
3
30
  ## [2.29.0] - 2026-10-17
4
31
 
5
32
  ### Added
@@ -130,6 +130,13 @@ export declare class UFloatingElement extends UElement {
130
130
  private untrack;
131
131
  /** 타겟 기준으로 위치를 계산하고, 스크롤·리사이즈를 따라 재배치하도록 추적을 건다. */
132
132
  private track;
133
+ /**
134
+ * 앵커를 가리는 조상(overflow 클리핑)의 크기 변화를 따라 다시 잰다. `autoUpdate` 는 앵커·떠 있는 상자의 크기와
135
+ * 스크롤·리사이즈만 보므로, 클리핑 조상이 커지거나(접힌 절이 펼쳐짐) 줄어 앵커가 가려지거나 드러나도 앵커 자신은
136
+ * 움직이지 않으면 아무 신호가 없다 — 가려진 순간에 붙은 `anchor-hidden` 이 앵커가 다 드러난 뒤에도 남아 열린 팝업이
137
+ * 보이지 않았다.
138
+ */
139
+ private observeClippingAncestors;
133
140
  /**
134
141
  * 현재 엘리먼트를 표시합니다.
135
142
  *
@@ -4,7 +4,7 @@ import { styles } from "./UFloatingElement.styles.js";
4
4
  import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorateMetadata.js";
5
5
  import __decorate from "../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorate.js";
6
6
  import { property, state } from "lit/decorators.js";
7
- import { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, offset, shift } from "@floating-ui/dom";
7
+ import { arrow, autoPlacement, autoUpdate, computePosition, flip, getOverflowAncestors, hide, offset, shift } from "@floating-ui/dom";
8
8
  //#region src/components/UFloatingElement.ts
9
9
  /**
10
10
  * UFloatingElement는 팝오버, 툴팁 등 화면에 떠 있는 엘리먼트를 구현하기 위한 기본 클래스입니다.
@@ -108,11 +108,31 @@ var UFloatingElement = class extends UElement {
108
108
  const seq = this.trackSeq;
109
109
  await this.reposition(target);
110
110
  if (seq !== this.trackSeq) return;
111
- this.cleanup = autoUpdate(target, this, () => {
111
+ const update = () => {
112
112
  this.reposition(target);
113
- });
113
+ };
114
+ const stopAutoUpdate = autoUpdate(target, this, update);
115
+ const stopClipObserve = this.observeClippingAncestors(target, update);
116
+ this.cleanup = () => {
117
+ stopAutoUpdate();
118
+ stopClipObserve();
119
+ };
114
120
  this.targetEl = target;
115
121
  }
122
+ /**
123
+ * 앵커를 가리는 조상(overflow 클리핑)의 크기 변화를 따라 다시 잰다. `autoUpdate` 는 앵커·떠 있는 상자의 크기와
124
+ * 스크롤·리사이즈만 보므로, 클리핑 조상이 커지거나(접힌 절이 펼쳐짐) 줄어 앵커가 가려지거나 드러나도 앵커 자신은
125
+ * 움직이지 않으면 아무 신호가 없다 — 가려진 순간에 붙은 `anchor-hidden` 이 앵커가 다 드러난 뒤에도 남아 열린 팝업이
126
+ * 보이지 않았다.
127
+ */
128
+ observeClippingAncestors(target, update) {
129
+ if (typeof ResizeObserver === "undefined") return () => {};
130
+ const context = target instanceof Element ? target : target.contextElement;
131
+ if (!context) return () => {};
132
+ const observer = new ResizeObserver(update);
133
+ for (const ancestor of getOverflowAncestors(context)) if (ancestor instanceof Element) observer.observe(ancestor);
134
+ return () => observer.disconnect();
135
+ }
116
136
  /**
117
137
  * 현재 엘리먼트를 표시합니다.
118
138
  *
@@ -1,5 +1,6 @@
1
1
  import { CSSResultGroup, PropertyValues } from 'lit';
2
2
  import { UElement } from './UElement.js';
3
+ import { FieldDescriptionDisplay } from './field/UField.js';
3
4
  /**
4
5
  * 폼 컨트롤 컴포넌트의 공통 기반 클래스입니다.
5
6
  * 사용자 입력을 받는 모든 컴포넌트가 이 클래스를 확장합니다.
@@ -32,6 +33,11 @@ export declare abstract class UFormControlElement<T> extends UElement {
32
33
  label?: string;
33
34
  /** 보조 설명 텍스트 */
34
35
  description?: string;
36
+ /**
37
+ * 설명을 보이는 방식(`inline` · `hint`) — 비우면 앱 전역 기본값(`UField.descriptionDisplay`).
38
+ * 칸마다 가를 때 쓴다: 도움말은 `hint` 로 접고, 지금 상태를 말하는 안내(잠긴 이유 · 입력 상한)는 `inline` 으로 늘 보인다.
39
+ */
40
+ descriptionDisplay?: FieldDescriptionDisplay;
35
41
  /** 폼 제출 시 사용되는 이름 */
36
42
  name?: string;
37
43
  /** 폼 제출 시 사용되는 값. attribute 선언 시 기본은 raw 문자열로 해석한다 —
@@ -235,6 +235,10 @@ __decorate([property({
235
235
  __decorate([property({ type: Boolean }), __decorateMetadata("design:type", Boolean)], UFormControlElement.prototype, "novalidate", void 0);
236
236
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UFormControlElement.prototype, "label", void 0);
237
237
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UFormControlElement.prototype, "description", void 0);
238
+ __decorate([property({
239
+ type: String,
240
+ attribute: "description-display"
241
+ }), __decorateMetadata("design:type", Object)], UFormControlElement.prototype, "descriptionDisplay", void 0);
238
242
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UFormControlElement.prototype, "name", void 0);
239
243
  __decorate([property(), __decorateMetadata("design:type", Object)], UFormControlElement.prototype, "value", void 0);
240
244
  __decorate([state(), __decorateMetadata("design:type", Object)], UFormControlElement.prototype, "hasSlottedLabel", void 0);
@@ -27,7 +27,7 @@ export declare class UBadge extends UElement {
27
27
  * 의미가 없는 색(`neutral`·`primary`·장식 축)과 `shape="dot"` 에서는 그리지 않습니다.
28
28
  */
29
29
  icon: boolean;
30
- render(): import('lit-html').TemplateResult<1> | typeof nothing;
30
+ render(): typeof nothing | import('lit-html').TemplateResult<1>;
31
31
  }
32
32
  declare global {
33
33
  interface HTMLElementTagNameMap {
@@ -186,6 +186,7 @@ var UDatePicker = class UDatePicker extends UFormControlElement {
186
186
  ?invalid=${this.invalid}
187
187
  .label=${this.label}
188
188
  .description=${this.description}
189
+ .descriptionDisplay=${this.descriptionDisplay}
189
190
  .validationMessage=${this.validationMessage}
190
191
  >
191
192
  <div class="container" part="container" @click=${this.textEntry.handleContainerClick}
@@ -225,6 +225,7 @@ var UDateRangePicker = class UDateRangePicker extends UFormControlElement {
225
225
  ?invalid=${this.invalid}
226
226
  .label=${this.label}
227
227
  .description=${this.description}
228
+ .descriptionDisplay=${this.descriptionDisplay}
228
229
  .validationMessage=${this.validationMessage}
229
230
  >
230
231
  <div class="container" part="container" @click=${this.textEntry.handleContainerClick}
@@ -60,8 +60,8 @@ export declare class UField extends UElement {
60
60
  * `hint` — 라벨 옆 정보 아이콘 + 툴팁. 설명은 컨트롤의 `aria-description` 으로 이미 전달되므로 아이콘은 보조기기에서 숨긴다.
61
61
  * 툴팁은 라벨 «위»(입력 칸을 가리지 않는다) · 아이콘 왼쪽 끝에 맞추고 화면 밖으로 나가면 밀어 넣는다.
62
62
  *
63
- * 여는 길은 셋이다 — 아이콘에 마우스를 올린다 · 필드의 컨트롤에 **키보드로** 들어온다(Tab · 프로그램 `focus()` — 눈으로 보는 키보드
64
- * 사용자는 마우스가 없다) · 아이콘을 **탭**한다(터치에는 오버가 없다). 아이콘을 포커스 가능한 버튼으로 만들지 않는
63
+ * 여는 길은 셋이다 — 아이콘에 마우스를 올린다 · 필드의 컨트롤에 **Tab 으로** 들어온다(눈으로 보는 키보드 사용자는 마우스가
64
+ * 없다 — 프로그램 `focus()` 는 사람이 옮긴 것이 아니라 열지 않는다) · 아이콘을 **탭**한다(터치에는 오버가 없다). 아이콘을 포커스 가능한 버튼으로 만들지 않는
65
65
  * 이유: 칸이 수십 개인 폼에서 탭 정지가 칸마다 하나씩 늘어난다. 닫는 길은 Escape(툴팁이 층이다) · 포커스가 필드를
66
66
  * 떠남 · 바깥 탭.
67
67
  */
@@ -82,7 +82,11 @@ export declare class UField extends UElement {
82
82
  */
83
83
  private focusByPointer;
84
84
  private handleHostPointerDown;
85
- /** 컨트롤에 키보드로 들어오면 설명을 보인다 — 포인터로 누른 포커스에는 열지 않는다(마우스에는 오버가 있다). */
85
+ /**
86
+ * 사람이 Tab 으로 컨트롤에 들어오면 설명을 보인다. 포인터로 누른 포커스(마우스에는 오버가 있다)와 **프로그램 `focus()`**
87
+ * (서랍·대화상자가 연 직후 첫 칸에 주는 초기 포커스 · `autofocus`)에는 열지 않는다 — 사람이 시작하지 않은 포커스에 열면
88
+ * 필요하지 않은 때 화면을 덮고, 덮는 대상이 바로 사람이 다음에 누를 그 칸이다.
89
+ */
86
90
  private handleFocusIn;
87
91
  private handleFocusOut;
88
92
  connectedCallback(): void;
@@ -38,6 +38,26 @@ function isNamedByContent(el) {
38
38
  const role = el.getAttribute("role");
39
39
  return (CONTENT_NAMED.test(el.localName) || !!role && CONTENT_NAMED_ROLES.test(role)) && (el.textContent ?? "").trim() !== "";
40
40
  }
41
+ /**
42
+ * 지금 일어나는 포커스 이동이 사람의 Tab 키인가 — 문서 하나에 감시자 하나. Tab 의 기본 동작(포커스 이동)은 keydown 과
43
+ * 같은 작업 안에서 일어나므로, keydown 에서 켜고 그 작업이 끝나면 끈다. 그 사이의 focusin 만 «Tab 으로 들어옴» 이다.
44
+ * Enter 로 연 서랍이 첫 칸에 `focus()` 하는 것은 Tab 이 아니므로 해당하지 않는다.
45
+ */
46
+ var tabNavigation = {
47
+ active: false,
48
+ installed: false,
49
+ install() {
50
+ if (this.installed || typeof document === "undefined") return;
51
+ this.installed = true;
52
+ document.addEventListener("keydown", (e) => {
53
+ if (e.key !== "Tab") return;
54
+ this.active = true;
55
+ setTimeout(() => {
56
+ this.active = false;
57
+ });
58
+ }, true);
59
+ }
60
+ };
41
61
  var UField = class UField extends UElement {
42
62
  static {
43
63
  _UField = this;
@@ -82,7 +102,7 @@ var UField = class UField extends UElement {
82
102
  const byPointer = this.focusByPointer;
83
103
  this.focusByPointer = false;
84
104
  const hint = this.hintEl;
85
- if (!hint || byPointer) return;
105
+ if (!hint || byPointer || !tabNavigation.active) return;
86
106
  this.hintTooltip?.show(hint);
87
107
  };
88
108
  this.handleFocusOut = (e) => {
@@ -126,8 +146,8 @@ var UField = class UField extends UElement {
126
146
  * `hint` — 라벨 옆 정보 아이콘 + 툴팁. 설명은 컨트롤의 `aria-description` 으로 이미 전달되므로 아이콘은 보조기기에서 숨긴다.
127
147
  * 툴팁은 라벨 «위»(입력 칸을 가리지 않는다) · 아이콘 왼쪽 끝에 맞추고 화면 밖으로 나가면 밀어 넣는다.
128
148
  *
129
- * 여는 길은 셋이다 — 아이콘에 마우스를 올린다 · 필드의 컨트롤에 **키보드로** 들어온다(Tab · 프로그램 `focus()` — 눈으로 보는 키보드
130
- * 사용자는 마우스가 없다) · 아이콘을 **탭**한다(터치에는 오버가 없다). 아이콘을 포커스 가능한 버튼으로 만들지 않는
149
+ * 여는 길은 셋이다 — 아이콘에 마우스를 올린다 · 필드의 컨트롤에 **Tab 으로** 들어온다(눈으로 보는 키보드 사용자는 마우스가
150
+ * 없다 — 프로그램 `focus()` 는 사람이 옮긴 것이 아니라 열지 않는다) · 아이콘을 **탭**한다(터치에는 오버가 없다). 아이콘을 포커스 가능한 버튼으로 만들지 않는
131
151
  * 이유: 칸이 수십 개인 폼에서 탭 정지가 칸마다 하나씩 늘어난다. 닫는 길은 Escape(툴팁이 층이다) · 포커스가 필드를
132
152
  * 떠남 · 바깥 탭.
133
153
  */
@@ -154,6 +174,7 @@ var UField = class UField extends UElement {
154
174
  }
155
175
  connectedCallback() {
156
176
  super.connectedCallback();
177
+ tabNavigation.install();
157
178
  this.addEventListener("pointerdown", this.handleHostPointerDown, true);
158
179
  this.addEventListener("focusin", this.handleFocusIn);
159
180
  this.addEventListener("focusout", this.handleFocusOut);
@@ -58,6 +58,8 @@ var styles = css`
58
58
  white-space: normal;
59
59
  font-weight: 400;
60
60
  line-height: 1.45;
61
+
62
+ pointer-events: none;
61
63
  }
62
64
 
63
65
  .label {
@@ -93,6 +93,7 @@ var UFileInput = class UFileInput extends UFormControlElement {
93
93
  ?invalid=${this.invalid}
94
94
  .label=${this.label}
95
95
  .description=${this.description}
96
+ .descriptionDisplay=${this.descriptionDisplay}
96
97
  .validationMessage=${this.validationMessage}
97
98
  >
98
99
  <div class="container" part="container">
@@ -199,6 +199,7 @@ var UInput = class UInput extends UFormControlElement {
199
199
  ?invalid=${this.invalid}
200
200
  .label=${this.label}
201
201
  .description=${this.description}
202
+ .descriptionDisplay=${this.descriptionDisplay}
202
203
  .validationMessage=${this.validationMessage}
203
204
  >
204
205
  <div class="container" part="container"
@@ -103,6 +103,7 @@ var URadio = class URadio extends UFormControlElement {
103
103
  ?invalid=${this.invalid}
104
104
  .label=${this.label}
105
105
  .description=${this.description}
106
+ .descriptionDisplay=${this.descriptionDisplay}
106
107
  .validationMessage=${this.validationMessage}
107
108
  >
108
109
  <div class="container" part="container"
@@ -114,6 +114,7 @@ var URating = class URating extends UFormControlElement {
114
114
  ?invalid=${this.invalid}
115
115
  .label=${this.label}
116
116
  .description=${this.description}
117
+ .descriptionDisplay=${this.descriptionDisplay}
117
118
  .validationMessage=${this.validationMessage}
118
119
  >
119
120
  <div class="symbols" part="container" role="radiogroup"
@@ -192,6 +192,7 @@ var USelect = class USelect extends UFormControlElement {
192
192
  ?invalid=${this.invalid}
193
193
  .label=${this.label}
194
194
  .description=${this.description}
195
+ .descriptionDisplay=${this.descriptionDisplay}
195
196
  .validationMessage=${this.validationMessage}
196
197
  >
197
198
  <span slot="label-aside" class="count" ?hidden=${!this.multiple || !this.maxCount}>
@@ -143,6 +143,7 @@ var USlider = class USlider extends UFormControlElement {
143
143
  ?invalid=${this.invalid}
144
144
  .label=${this.label}
145
145
  .description=${this.description}
146
+ .descriptionDisplay=${this.descriptionDisplay}
146
147
  .validationMessage=${this.validationMessage}
147
148
  >
148
149
  <span slot="label-aside" ?hidden=${!this.showValue}>
@@ -1,5 +1,7 @@
1
1
  import { PropertyValues, TemplateResult } from 'lit';
2
2
  import { UElement } from '../UElement.js';
3
+ /** `u-tab` 개수의 모양 — `badge` 는 알약 면(눈을 끈다), `plain` 은 면 없는 보조 숫자(정보). */
4
+ export type TabCountAppearance = 'badge' | 'plain';
3
5
  /**
4
6
  * 탭 아이템 — `u-tab-panel` 안에서는 패널을 고르는 탭(`role="tab"`), `href` 를 주면 `u-tab-nav` 안의
5
7
  * 이동 링크(저장된 보기 = URL)다. 링크 탭은 탭 역할을 갖지 않는다 — 다른 쪽으로 이동하는 것은 탭이 아니라
@@ -40,6 +42,16 @@ export declare class UTab extends UElement {
40
42
  rel?: string;
41
43
  /** 레이블 뒤의 조용한 개수(그 보기의 항목 수) — 현재 로캘의 숫자 표기로 그린다. 없으면 그리지 않는다. */
42
44
  count?: number;
45
+ /**
46
+ * 개수의 모양 — `badge`(알약 면, 기본) · `plain`(면 없는 보조 숫자 — 탭이 많아 배지가 레이블보다 먼저 읽힐 때).
47
+ * 비우면 앱 전역 기본값(`UTab.countAppearance`).
48
+ */
49
+ countAppearance?: TabCountAppearance;
50
+ /**
51
+ * 앱 전역 기본값 — 앱 시작 때 한 번 정한다(예: `UTab.countAppearance = 'plain'`). 이미 그려진 탭은 다음 렌더부터 따른다.
52
+ * @default 'badge'
53
+ */
54
+ static countAppearance: TabCountAppearance;
43
55
  connectedCallback(): void;
44
56
  protected willUpdate(changedProperties: PropertyValues): void;
45
57
  protected updated(changedProperties: PropertyValues): void;
@@ -10,7 +10,11 @@ import { html, nothing } from "lit";
10
10
  import { customElement, property } from "lit/decorators.js";
11
11
  import { ifDefined } from "lit/directives/if-defined.js";
12
12
  //#region src/components/tab/UTab.ts
13
+ var _UTab;
13
14
  var UTab = class UTab extends UElement {
15
+ static {
16
+ _UTab = this;
17
+ }
14
18
  constructor(..._args) {
15
19
  super(..._args);
16
20
  this.disabled = false;
@@ -30,6 +34,9 @@ var UTab = class UTab extends UElement {
30
34
  static {
31
35
  this.styles = [super.styles, styles];
32
36
  }
37
+ static {
38
+ this.countAppearance = "badge";
39
+ }
33
40
  connectedCallback() {
34
41
  super.connectedCallback();
35
42
  this.applyRole();
@@ -86,7 +93,8 @@ var UTab = class UTab extends UElement {
86
93
  return html`
87
94
  <slot name="prefix"></slot>
88
95
  <slot></slot>
89
- ${this.count == null || Number.isNaN(this.count) ? nothing : html`<span class="count" part="count">${formatNumber(this.count)}</span>`}
96
+ ${this.count == null || Number.isNaN(this.count) ? nothing : html`<span class="count ${(this.countAppearance ?? _UTab.countAppearance) === "plain" ? "plain" : "badge"}"
97
+ part="count">${formatNumber(this.count)}</span>`}
90
98
  <slot name="suffix"></slot>
91
99
  `;
92
100
  }
@@ -118,6 +126,10 @@ __decorate([property({
118
126
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UTab.prototype, "target", void 0);
119
127
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UTab.prototype, "rel", void 0);
120
128
  __decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UTab.prototype, "count", void 0);
121
- UTab = __decorate([customElement("u-tab")], UTab);
129
+ __decorate([property({
130
+ type: String,
131
+ attribute: "count-appearance"
132
+ }), __decorateMetadata("design:type", Object)], UTab.prototype, "countAppearance", void 0);
133
+ UTab = _UTab = __decorate([customElement("u-tab")], UTab);
122
134
  //#endregion
123
135
  export { UTab };
@@ -73,6 +73,16 @@ var styles = css`
73
73
  font-variant-numeric: tabular-nums;
74
74
  text-align: center;
75
75
  }
76
+
77
+ .count.plain {
78
+ margin-left: 0.35em;
79
+ min-width: 0;
80
+ padding: 0;
81
+ background-color: transparent;
82
+ font-size: 0.9em;
83
+ line-height: inherit;
84
+ font-weight: 400;
85
+ }
76
86
 
77
87
  .remove-btn {
78
88
  flex-shrink: 0;
@@ -52,6 +52,7 @@ var UTextarea = class UTextarea extends UFormControlElement {
52
52
  ?invalid=${this.invalid}
53
53
  .label=${this.label}
54
54
  .description=${this.description}
55
+ .descriptionDisplay=${this.descriptionDisplay}
55
56
  .validationMessage=${this.validationMessage}
56
57
  >
57
58
  <div class="container" part="container">
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.29.0",
4
+ "version": "2.30.1",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -100,6 +100,7 @@ starts from the value. Typing in the text box still commits on Enter or leaving
100
100
  | `name` | `string` | — | — | Form field name |
101
101
  | `label` | `string` | — | — | Field label |
102
102
  | `description` | `string` | — | — | Helper text |
103
+ | `descriptionDisplay` | `'inline' \| 'hint'` | — | — | Attribute `description-display`. This field only — `hint` puts the description in a tooltip beside the label, `inline` under the control. Empty: the app-wide `UField.descriptionDisplay` |
103
104
  | `validationMessage` | `string` | — | — | Custom validation message |
104
105
 
105
106
  ## Events
@@ -155,6 +155,7 @@ picker.addEventListener('change', () => {
155
155
  | `name` | `string` | — | — | Form field name |
156
156
  | `label` | `string` | — | — | Field label |
157
157
  | `description` | `string` | — | — | Helper text |
158
+ | `descriptionDisplay` | `'inline' \| 'hint'` | — | — | Attribute `description-display`. This field only — `hint` puts the description in a tooltip beside the label, `inline` under the control. Empty: the app-wide `UField.descriptionDisplay` |
158
159
  | `validationMessage` | `string` | — | — | Custom validation message |
159
160
 
160
161
  Validation: `required` with no value → `valueMissing`; a value that is not two ISO days joined by `/`
@@ -99,14 +99,18 @@ UField.descriptionDisplay = 'hint'; // once, before the first render — defau
99
99
  ```
100
100
 
101
101
  Sets where every field shows its description, including the fields that `u-input`, `u-select` and the other controls
102
- render inside their own shadow roots. A field's own `description-display` wins. In `hint` mode a validation message
102
+ render inside their own shadow roots. A field's own `description-display` wins — and so does a control's
103
+ (`<u-input description-display="inline">`), for the field it renders: fold help text into hints app-wide and keep a
104
+ note about the current state (why a field is locked, an input limit) always visible. In `hint` mode a validation message
103
105
  still shows under the control, the control keeps the text as `aria-description`, and a field without a label shows the
104
106
  description inline (there is no label to put the icon beside).
105
107
 
106
- The hint opens three ways — hovering the icon, entering the field's control from the keyboard (Tab, or a programmatic
107
- `focus()`; a click into the control does not, the mouse has hover), and tapping the icon (touch has no hover; the tap
108
+ The hint opens three ways — hovering the icon, entering the field's control from the keyboard (Tab; a click into the control
109
+ does not — the mouse has hover — and neither does a programmatic `focus()`, such as a drawer or dialog focusing its first
110
+ field on open), and tapping the icon (touch has no hover; the tap
108
111
  pins it until a tap elsewhere or a second tap). Escape closes it, and so does focus leaving the field. The icon itself
109
- is not a Tab stop — a form of dozens of fields would otherwise double its Tabs.
112
+ is not a Tab stop — a form of dozens of fields would otherwise double its Tabs. The open tooltip lets clicks through: when there is no
113
+ room above and it flips over the control, a click still reaches the control.
110
114
 
111
115
  ## CSS Parts
112
116
 
@@ -45,6 +45,7 @@ No drag-and-drop in this version — it is a minimal wrapper (trigger + status +
45
45
  | `name` | `string` | — | — | Form field name |
46
46
  | `label` | `string` | — | — | Label text |
47
47
  | `description` | `string` | — | — | Helper text below the control |
48
+ | `descriptionDisplay` | `'inline' \| 'hint'` | — | — | Attribute `description-display`. This field only — `hint` puts the description in a tooltip beside the label, `inline` under the control. Empty: the app-wide `UField.descriptionDisplay` |
48
49
  | `validationMessage` | `string` | — | — | Custom validation message |
49
50
 
50
51
  ## Methods
@@ -83,6 +83,7 @@ the library does not infer one from field meaning.
83
83
  | `value` | `string` | — | — | Current value |
84
84
  | `label` | `string` | — | — | Field label |
85
85
  | `description` | `string` | — | — | Helper text |
86
+ | `descriptionDisplay` | `'inline' \| 'hint'` | — | — | Attribute `description-display`. This field only — `hint` puts the description in a tooltip beside the label, `inline` under the control. Empty: the app-wide `UField.descriptionDisplay` |
86
87
  | `validationMessage` | `string` | — | — | Custom validation message |
87
88
 
88
89
  ## Events
@@ -57,6 +57,7 @@ Options of different kinds can be grouped under headings with [`u-option-group`]
57
57
  | `name` | `string` | — | — | Form field name |
58
58
  | `label` | `string` | — | — | Field label |
59
59
  | `description` | `string` | — | — | Helper text |
60
+ | `descriptionDisplay` | `'inline' \| 'hint'` | — | — | Attribute `description-display`. This field only — `hint` puts the description in a tooltip beside the label, `inline` under the control. Empty: the app-wide `UField.descriptionDisplay` |
60
61
  | `validationMessage` | `string` | — | — | Custom validation message |
61
62
 
62
63
  ## Events
@@ -124,6 +124,7 @@ panel tab or a link tab. It is part of the tab's name.
124
124
  | `target` | `string` | — | | Link target (with `href`) |
125
125
  | `rel` | `string` | — | | Link relationship (with `href`) |
126
126
  | `count` | `number` | — | | Quiet count after the label, in the active locale's digits |
127
+ | `countAppearance` | `'badge' \| 'plain'` | — | | Attribute `count-appearance`. `badge` (a pill) or `plain` (no pill — a smaller, weaker number, for a row of many tabs where pills would read before the labels). Empty: the app-wide `UTab.countAppearance` (default `badge`) |
127
128
 
128
129
  ### Events
129
130
 
@@ -47,6 +47,7 @@ Multi-line text input with auto-resize and optional character counter. Form-asso
47
47
  | `name` | `string` | — | — | Form field name |
48
48
  | `label` | `string` | — | — | Field label |
49
49
  | `description` | `string` | — | — | Helper text |
50
+ | `descriptionDisplay` | `'inline' \| 'hint'` | — | — | Attribute `description-display`. This field only — `hint` puts the description in a tooltip beside the label, `inline` under the control. Empty: the app-wide `UField.descriptionDisplay` |
50
51
  | `validationMessage` | `string` | — | — | Custom validation message |
51
52
 
52
53
  ## Events