@iyulab/components 2.12.0 → 2.13.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,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.13.0] - 2026-10-07
4
+
5
+ ### Changed
6
+
7
+ - **`size="sm"` and `size="lg"` follow the density** (`--u-density`) on `u-button`, `u-input`, `u-select`, `u-textarea`,
8
+ `u-date-picker` and `u-date-range-picker`: sm is 6/7 of it and lg 8/7. They were 12px and 16px whatever the density,
9
+ so a host that raised the density (a field or touch mode) enlarged the default controls and left the small ones
10
+ at 12px. At the default density (14px) nothing changes.
11
+
12
+ ## [2.12.1] - 2026-10-07
13
+
14
+ ### Fixed
15
+
16
+ - **A `chars` field measures again when an inherited font changes** (`u-input`, `u-select`, `u-date-picker`,
17
+ `u-date-range-picker`). The field was measured when it rendered, so a font change coming from outside the
18
+ component — a page switching its density or text size at runtime — left it at the old width: too wide after
19
+ shrinking, cutting the last characters after growing. The field now notices inherited font size, family and
20
+ letter-spacing changes and measures again.
21
+
3
22
  ## [2.12.0] - 2026-10-07
4
23
 
5
24
  ### Added
@@ -143,15 +143,17 @@ var styles = css`
143
143
  * 그리고 아이콘 버튼의 계단(30/32/34)이 글자 버튼(32/37/42)과 기울기가 달라
144
144
  * size 를 올릴수록 어긋남이 커졌다.
145
145
  *
146
- * ⚠**size 미지정 기본값만 --u-density 를 읽는다(위 :host 블록) — sm/lg 는 리터럴로
147
- * 남긴다.** 밀도 스위치가 저자가 명시한 size=sm/lg 를 비례로 덮어써야 하는지는
148
- * 별도 제품 결정이라 이 스코프에 넣지 않았다(Pending Human Decision).
146
+ * sm·lg 도 --u-density 에 비례한다(× 6/7 · × 8/7 — 기본 밀도 14px 에서 12·16px). 종전에는 리터럴이라
147
+ * 밀도를 키운 화면(현장·터치 모드)에서 기본 크기만 커지고 작은 버튼은 12px 에 남았다. 명시한 size 는
148
+ * «단 안의 상대 위치» 를 고른 것이지 절대 크기를 고른 것이 아니다.
149
149
  */
150
150
  :host([size="sm"]) {
151
- font-size: 12px;
151
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 12px. */
152
+ font-size: calc(var(--u-density, 14px) * 6 / 7);
152
153
  }
153
154
  :host([size="lg"]) {
154
- font-size: 16px;
155
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 16px. */
156
+ font-size: calc(var(--u-density, 14px) * 8 / 7);
155
157
  }
156
158
 
157
159
  /* === States === */
@@ -62,7 +62,7 @@ export type { DateDisabledFn } from '../calendar/dates.js';
62
62
  */
63
63
  export declare class UDatePicker extends UFormControlElement<string> {
64
64
  static styles: import('lit').CSSResultGroup[];
65
- /** 크기 — 다른 필드·버튼과 같은 세 단(`sm` 12px · `md` = `--u-density`(14px) · `lg` 16px). */
65
+ /** 크기 — 다른 필드·버튼과 같은 세 단(`md` = `--u-density`(14px) · `sm` = 그 6/7(12px) · `lg` = 8/7(16px) — 밀도 단을 바꾸면 셋이 함께 움직인다). */
66
66
  size: FieldSize;
67
67
  /**
68
68
  * 칸이 담을 글자 수 — 지정하면 폭을 정하지 않은 칸(기본 `inline-block`)이 «N자 + 지우기·달력 버튼 + 패딩» 폭으로 그려지고,
@@ -46,10 +46,12 @@ var styles = css`
46
46
  font-size: var(--u-density, 14px);
47
47
  }
48
48
  :host([size="sm"]) {
49
- font-size: 12px;
49
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 12px. */
50
+ font-size: calc(var(--u-density, 14px) * 6 / 7);
50
51
  }
51
52
  :host([size="lg"]) {
52
- font-size: 16px;
53
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 16px. */
54
+ font-size: calc(var(--u-density, 14px) * 8 / 7);
53
55
  }
54
56
  `;
55
57
  //#endregion
@@ -76,7 +76,7 @@ export type { DateRangePreset, DateRangePresetName, DateRangePresetOption } from
76
76
  */
77
77
  export declare class UDateRangePicker extends UFormControlElement<string> {
78
78
  static styles: import('lit').CSSResultGroup[];
79
- /** 크기 — 다른 필드·버튼과 같은 세 단(`sm` 12px · `md` = `--u-density`(14px) · `lg` 16px). */
79
+ /** 크기 — 다른 필드·버튼과 같은 세 단(`md` = `--u-density`(14px) · `sm` = 그 6/7(12px) · `lg` = 8/7(16px) — 밀도 단을 바꾸면 셋이 함께 움직인다). */
80
80
  size: FieldSize;
81
81
  /**
82
82
  * 칸이 담을 글자 수 — 지정하면 폭을 정하지 않은 칸(기본 `inline-block`)이 «N자 + 지우기·달력 버튼 + 패딩» 폭으로 그려지고,
@@ -106,10 +106,12 @@ var styles = css`
106
106
  font-size: var(--u-density, 14px);
107
107
  }
108
108
  :host([size="sm"]) {
109
- font-size: 12px;
109
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 12px. */
110
+ font-size: calc(var(--u-density, 14px) * 6 / 7);
110
111
  }
111
112
  :host([size="lg"]) {
112
- font-size: 16px;
113
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 16px. */
114
+ font-size: calc(var(--u-density, 14px) * 8 / 7);
113
115
  }
114
116
  `;
115
117
  //#endregion
@@ -84,7 +84,7 @@ export declare class UInput extends UFormControlElement<string> {
84
84
  /** 자동 완성 기능 설정 */
85
85
  autocomplete?: AutoFill;
86
86
  /**
87
- * 크기 — 버튼의 `size` 와 같은 세 단(`sm` 12px · `md` 기본 = `--u-density`(14px) · `lg` 16px).
87
+ * 크기 — 버튼의 `size` 와 같은 세 단(`md` 기본 = `--u-density`(14px) · `sm` = 그 6/7(12px) · `lg` = 8/7(16px) — 밀도 단을 바꾸면 셋이 함께 움직인다).
88
88
  * 상자 높이는 글자 크기에서 파생된다(1.5em 줄 + 필드 상자 여백 × 2 + 테두리) — 같은 `size` 의 버튼과
89
89
  * 한 줄에 서도록. 테마는 필드 상자 토큰(`--u-field-padding-block`)으로 단마다 높이를 다듬는다.
90
90
  */
@@ -241,10 +241,12 @@ var styles = css`
241
241
  font-size: var(--u-density, 14px);
242
242
  }
243
243
  :host([size="sm"]) {
244
- font-size: 12px;
244
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 12px. */
245
+ font-size: calc(var(--u-density, 14px) * 6 / 7);
245
246
  }
246
247
  :host([size="lg"]) {
247
- font-size: 16px;
248
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 16px. */
249
+ font-size: calc(var(--u-density, 14px) * 8 / 7);
248
250
  }
249
251
  `;
250
252
  //#endregion
@@ -45,7 +45,7 @@ export declare class USelect extends UFormControlElement<string | string[]> {
45
45
  /** 외형 정도 */
46
46
  appearance: FieldAppearance;
47
47
  /**
48
- * 크기 — 버튼의 `size` 와 같은 세 단(`sm` 12px · `md` 기본 = `--u-density`(14px) · `lg` 16px).
48
+ * 크기 — 버튼의 `size` 와 같은 세 단(`md` 기본 = `--u-density`(14px) · `sm` = 그 6/7(12px) · `lg` = 8/7(16px) — 밀도 단을 바꾸면 셋이 함께 움직인다).
49
49
  * 상자 높이는 글자 크기에서 파생된다(1.5em 줄 + 필드 상자 여백 × 2 + 테두리) — 같은 `size` 의 버튼과
50
50
  * 한 줄에 서도록. 테마는 필드 상자 토큰(`--u-field-padding-block`)으로 단마다 높이를 다듬는다.
51
51
  */
@@ -262,10 +262,12 @@ var styles = css`
262
262
  font-size: var(--u-density, 14px);
263
263
  }
264
264
  :host([size="sm"]) {
265
- font-size: 12px;
265
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 12px. */
266
+ font-size: calc(var(--u-density, 14px) * 6 / 7);
266
267
  }
267
268
  :host([size="lg"]) {
268
- font-size: 16px;
269
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 16px. */
270
+ font-size: calc(var(--u-density, 14px) * 8 / 7);
269
271
  }
270
272
  `;
271
273
  //#endregion
@@ -24,7 +24,7 @@ export declare class UTextarea extends UFormControlElement<string> {
24
24
  /** 외형 정도 */
25
25
  appearance: FieldAppearance;
26
26
  /**
27
- * 크기 — 버튼의 `size` 와 같은 세 단(`sm` 12px · `md` 기본 = `--u-density`(14px) · `lg` 16px).
27
+ * 크기 — 버튼의 `size` 와 같은 세 단(`md` 기본 = `--u-density`(14px) · `sm` = 그 6/7(12px) · `lg` = 8/7(16px) — 밀도 단을 바꾸면 셋이 함께 움직인다).
28
28
  * 상자 높이는 글자 크기에서 파생된다(1.5em 줄 + 필드 상자 여백 × 2 + 테두리) — 같은 `size` 의 버튼과
29
29
  * 한 줄에 서도록. 테마는 필드 상자 토큰(`--u-field-padding-block`)으로 단마다 높이를 다듬는다.
30
30
  */
@@ -176,10 +176,12 @@ var styles = css`
176
176
  font-size: var(--u-density, 14px);
177
177
  }
178
178
  :host([size="sm"]) {
179
- font-size: 12px;
179
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 12px. */
180
+ font-size: calc(var(--u-density, 14px) * 6 / 7);
180
181
  }
181
182
  :host([size="lg"]) {
182
- font-size: 16px;
183
+ /* 밀도 단에 비례 — 기본 밀도 14px 에서 16px. */
184
+ font-size: calc(var(--u-density, 14px) * 8 / 7);
183
185
  }
184
186
  `;
185
187
  //#endregion
@@ -17,12 +17,19 @@ export interface CharsWidthOptions {
17
17
  * 자간(`letter-spacing`)을 주면 N자가 `Nch` 를 넘어, «N자리 숫자 칸» 이 마지막 숫자를 잘랐다(Pretendard 14px 에서 자당
18
18
  * 0.33px — 6자리면 2px). 그래서 글자 요소의 계산된 글꼴을 옮긴 보이지 않는 요소에 `0` N개를 실제로 그리고 그 폭을 쓴다.
19
19
  * 크기는 `ResizeObserver` 로 따른다 — 웹 글꼴이 늦게 실리거나 크기 단(`size`)이 바뀌어 폭이 달라지면 다시 읽는다.
20
+ *
21
+ * 측정 요소는 글꼴을 계산값(px)으로 **복사**하므로, 호스트 밖에서 상속된 글꼴이 바뀌어도(밀도·글자 크기 단을 루트에서
22
+ * 런타임에 전환) 스스로는 달라지지 않는다 — 호스트는 다시 그려지지 않고 복사본은 옛 값을 들고 있다. 그래서 같은 자리에
23
+ * 글꼴을 복사하지 않고 **상속하는** 감시 요소를 하나 더 두고, 그 크기가 바뀌면 다시 복사해 잰다. 복사를 버리지 않는
24
+ * 이유: 글자 요소 자신에 걸린 글꼴(`::part(input)` 의 글꼴 기능 등)은 상속으로 오지 않는다.
20
25
  * 재기 전(첫 그림)에는 `Nch` 로 그린다.
21
26
  */
22
27
  export declare class CharsWidthController implements ReactiveController {
23
28
  private readonly host;
24
29
  private readonly options;
25
30
  private sizer?;
31
+ /** 글꼴을 상속하는 감시 요소 — 상속된 글꼴이 바뀌면 크기가 바뀐다. */
32
+ private watch?;
26
33
  private observer?;
27
34
  private measured?;
28
35
  constructor(host: ReactiveControllerHost & HTMLElement, options: CharsWidthOptions);
@@ -23,6 +23,11 @@ var FONT_PROPS = [
23
23
  * 자간(`letter-spacing`)을 주면 N자가 `Nch` 를 넘어, «N자리 숫자 칸» 이 마지막 숫자를 잘랐다(Pretendard 14px 에서 자당
24
24
  * 0.33px — 6자리면 2px). 그래서 글자 요소의 계산된 글꼴을 옮긴 보이지 않는 요소에 `0` N개를 실제로 그리고 그 폭을 쓴다.
25
25
  * 크기는 `ResizeObserver` 로 따른다 — 웹 글꼴이 늦게 실리거나 크기 단(`size`)이 바뀌어 폭이 달라지면 다시 읽는다.
26
+ *
27
+ * 측정 요소는 글꼴을 계산값(px)으로 **복사**하므로, 호스트 밖에서 상속된 글꼴이 바뀌어도(밀도·글자 크기 단을 루트에서
28
+ * 런타임에 전환) 스스로는 달라지지 않는다 — 호스트는 다시 그려지지 않고 복사본은 옛 값을 들고 있다. 그래서 같은 자리에
29
+ * 글꼴을 복사하지 않고 **상속하는** 감시 요소를 하나 더 두고, 그 크기가 바뀌면 다시 복사해 잰다. 복사를 버리지 않는
30
+ * 이유: 글자 요소 자신에 걸린 글꼴(`::part(input)` 의 글꼴 기능 등)은 상속으로 오지 않는다.
26
31
  * 재기 전(첫 그림)에는 `Nch` 로 그린다.
27
32
  */
28
33
  var CharsWidthController = class {
@@ -60,17 +65,29 @@ var CharsWidthController = class {
60
65
  frame.style.cssText = "position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:0;block-size:0;overflow:hidden;visibility:hidden;pointer-events:none";
61
66
  const sizer = document.createElement("span");
62
67
  sizer.style.cssText = "display:inline-block;white-space:pre";
63
- frame.appendChild(sizer);
68
+ const watch = document.createElement("span");
69
+ watch.style.cssText = "display:inline-block;white-space:pre";
70
+ frame.append(sizer, watch);
64
71
  box.appendChild(frame);
65
72
  this.sizer = sizer;
66
- this.observer = new ResizeObserver((entries) => this.read(entries[entries.length - 1].contentRect.width));
73
+ this.watch = watch;
74
+ this.observer = new ResizeObserver((entries) => {
75
+ let sized;
76
+ let inherited = false;
77
+ for (const entry of entries) if (entry.target === sizer) sized = entry.contentRect.width;
78
+ else inherited = true;
79
+ if (inherited) this.measure();
80
+ if (sized != null) this.read(sized);
81
+ });
67
82
  this.observer.observe(sizer);
83
+ this.observer.observe(watch);
68
84
  }
69
85
  const sizer = this.sizer;
70
86
  const source = getComputedStyle(this.options.text() ?? box);
71
87
  for (const prop of FONT_PROPS) sizer.style.setProperty(prop, source.getPropertyValue(prop));
72
88
  const digits = "0".repeat(n);
73
89
  if (sizer.textContent !== digits) sizer.textContent = digits;
90
+ if (this.watch && this.watch.textContent !== digits) this.watch.textContent = digits;
74
91
  }
75
92
  read(width) {
76
93
  if (!(width > 0)) return;
@@ -84,6 +101,7 @@ var CharsWidthController = class {
84
101
  this.observer = void 0;
85
102
  this.sizer?.parentElement?.remove();
86
103
  this.sizer = void 0;
104
+ this.watch = void 0;
87
105
  this.measured = void 0;
88
106
  }
89
107
  };
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.12.0",
4
+ "version": "2.13.0",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -47,7 +47,7 @@ Versatile button with multiple appearances. Renders as an `<a>` element when `hr
47
47
  |----------|------|---------|---------|-------------|
48
48
  | `appearance` | `'solid'\|'soft'\|'outlined'\|'plain'\|'link'` | `'solid'` | ✓ | How much chrome: `solid` filled with the colour · `soft` tint, no outline · `outlined` · `plain` no chrome · `link` |
49
49
  | `color` | `'neutral'\|'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | — | ✓ | Color, independent of `appearance`. Unset paints like `primary` (the brand colour) without adding the attribute; `neutral` is an achromatic (grey) button (see notes below). |
50
- | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Button size (12px/14px/16px font-size; padding, spinner, and icon slots scale proportionally). |
50
+ | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Button size (font-size `--u-density` × 6/7 · × 1 · × 8/7 — 12/14/16px at the default density; padding, spinner, and icon slots scale proportionally). |
51
51
  | `rounded` | `boolean` | `false` | ✓ | Pill-shaped border radius |
52
52
  | `disabled` | `boolean` | `false` | ✓ | Disable the button |
53
53
  | `loading` | `boolean` | `false` | ✓ | Show loading spinner; disables interaction |
@@ -81,7 +81,7 @@ starts from the value. Typing in the text box still commits on Enter or leaving
81
81
  | `value` | `string` | — | — | Selected date (ISO `YYYY-MM-DD`), or full ISO-8601 datetime in `mode="datetime"` |
82
82
  | `min` | `string` | — | — | Minimum selectable date (ISO `YYYY-MM-DD`, date-only in both modes) |
83
83
  | `max` | `string` | — | — | Maximum selectable date (ISO `YYYY-MM-DD`, date-only in both modes) |
84
- | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
84
+ | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: `--u-density` (14px) for md, 6/7 of it for sm (12px) and 8/7 for lg (16px) — change the density and all three follow. A field and a button of the same size share a height |
85
85
  | `chars` | `number` | — | ✓ | Characters the field holds. An unsized field draws at N characters + its clear and calendar buttons + padding; a sized one uses it as the text floor, so a narrower box overflows. Give the length of the `format` pattern for a box that fits it exactly. Same axis as `u-input`'s `chars`. N characters are measured as drawn — tabular figures and letter spacing count, which CSS `ch` leaves out |
86
86
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |
87
87
  | `isDateDisabled` | `(date: string) => boolean` | — | — | App rule for days that cannot be chosen (ISO in, `true` = disabled). Property only; see «Disabled days» |
@@ -137,7 +137,7 @@ picker.addEventListener('change', () => {
137
137
  | `end` | `string` (read-only) | — | — | End of the range (ISO day, or date-time in `mode="datetime"`), `undefined` without a complete range |
138
138
  | `min` | `string` | — | — | Earliest selectable day (ISO `YYYY-MM-DD`), inclusive |
139
139
  | `max` | `string` | — | — | Latest selectable day (ISO `YYYY-MM-DD`), inclusive |
140
- | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
140
+ | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: `--u-density` (14px) for md, 6/7 of it for sm (12px) and 8/7 for lg (16px) — change the density and all three follow. A field and a button of the same size share a height |
141
141
  | `chars` | `number` | — | ✓ | Characters the field holds — both dates and the separator (`a – b`). An unsized field draws at N characters + its clear and calendar buttons + padding; a sized one uses it as the text floor, so a narrower box overflows. Same axis as `u-input`'s `chars`. N characters are measured as drawn — tabular figures and letter spacing count, which CSS `ch` leaves out |
142
142
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |
143
143
  | `isDateDisabled` | `(date: string) => boolean` | — | — | App rule for days that cannot start or end a range (ISO in, `true` = disabled). Property only; see «Disabled days» |
@@ -55,7 +55,7 @@ the library does not infer one from field meaning.
55
55
  | Property | Type | Default | Reflect | Description |
56
56
  |----------|------|---------|---------|-------------|
57
57
  | `appearance` | `'outlined'\|'soft'\|'underlined'\|'plain'` | `'outlined'` | ✓ | How much chrome: `outlined` · `soft` tinted face · `underlined` bottom line only · `plain` no chrome |
58
- | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
58
+ | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: `--u-density` (14px) for md, 6/7 of it for sm (12px) and 8/7 for lg (16px) — change the density and all three follow. A field and a button of the same size share a height |
59
59
  | `type` | `'text'\|'password'\|'email'\|'tel'\|'url'\|'search'\|'number'\|'date'\|'time'`… | `'text'` | — | Input type |
60
60
  | `chars` | `number` | — | ✓ | Characters the field holds. An unsized field draws at N characters + its suffix icons + padding; a sized one (`width`, `block`) uses it as the text floor, so a narrower box overflows. Not `size` — that is the sm/md/lg scale. N characters are measured as drawn — tabular figures and letter spacing count, which CSS `ch` leaves out |
61
61
  | `placeholder` | `string` | — | — | Placeholder text |
@@ -38,7 +38,7 @@ Dropdown select with single or multiple selection, search, and clear support. Fo
38
38
  |----------|------|---------|---------|-------------|
39
39
  | `value` | `string \| string[]` | — | — | Selected value(s) |
40
40
  | `appearance` | `'outlined'\|'soft'\|'underlined'\|'plain'` | `'outlined'` | ✓ | How much chrome: `outlined` · `soft` tinted face · `underlined` bottom line only · `plain` no chrome |
41
- | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
41
+ | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: `--u-density` (14px) for md, 6/7 of it for sm (12px) and 8/7 for lg (16px) — change the density and all three follow. A field and a button of the same size share a height |
42
42
  | `chars` | `number` | — | ✓ | Characters the field holds. An unsized field draws at N characters + its clear button and arrow + padding, so it no longer widens and narrows with the chosen option (a longer one ends in an ellipsis); a sized one (`--u-select-width`, `block`) uses it as the text floor, so a narrower box overflows. Same axis as `u-input`'s `chars`. N characters are measured as drawn — tabular figures and letter spacing count, which CSS `ch` leaves out |
43
43
  | `multiple` | `boolean` | `false` | ✓ | Allow multiple selections |
44
44
  | `searchable` | `boolean` | `false` | ✓ | Filter options by text |
@@ -24,7 +24,7 @@ Multi-line text input with auto-resize and optional character counter. Form-asso
24
24
  |----------|------|---------|---------|-------------|
25
25
  | `value` | `string` | — | — | Current text value |
26
26
  | `appearance` | `'outlined'\|'soft'\|'underlined'\|'plain'` | `'outlined'` | ✓ | How much chrome: `outlined` · `soft` tinted face · `underlined` bottom line only · `plain` no chrome |
27
- | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
27
+ | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: `--u-density` (14px) for md, 6/7 of it for sm (12px) and 8/7 for lg (16px) — change the density and all three follow. A field and a button of the same size share a height |
28
28
  | `resize` | `'none'\|'vertical'\|'horizontal'\|'both'\|'auto'` | `'auto'` | ✓ | Resize behavior |
29
29
  | `minRows` | `number` | — | — | Minimum visible rows |
30
30
  | `maxRows` | `number` | — | — | Maximum rows (auto-resize cap) |