@iyulab/components 1.58.0 → 2.0.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 (197) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/README.md +6 -4
  3. package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +1 -1
  4. package/dist/_virtual/_glob-assets_raw/light.css.637cb2f8.js +1 -1
  5. package/dist/assets/locales/ar.json.js +5 -1
  6. package/dist/assets/locales/de.json.js +5 -1
  7. package/dist/assets/locales/en.json.js +5 -1
  8. package/dist/assets/locales/es.json.js +5 -1
  9. package/dist/assets/locales/fr.json.js +5 -1
  10. package/dist/assets/locales/id.json.js +5 -1
  11. package/dist/assets/locales/ja.json.js +5 -1
  12. package/dist/assets/locales/ko.json.js +5 -1
  13. package/dist/assets/locales/pt-BR.json.js +5 -1
  14. package/dist/assets/locales/ru.json.js +5 -1
  15. package/dist/assets/locales/th.json.js +5 -1
  16. package/dist/assets/locales/vi.json.js +5 -1
  17. package/dist/assets/locales/zh-CN.json.js +5 -1
  18. package/dist/assets/locales/zh-TW.json.js +5 -1
  19. package/dist/components/UElement.styles.js +2 -2
  20. package/dist/components/alert/UAlert.d.ts +12 -7
  21. package/dist/components/alert/UAlert.js +3 -3
  22. package/dist/components/alert/UAlert.styles.js +6 -23
  23. package/dist/components/badge/UBadge.d.ts +5 -5
  24. package/dist/components/badge/UBadge.js +3 -3
  25. package/dist/components/badge/UBadge.styles.js +4 -4
  26. package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +1 -1
  27. package/dist/components/button/UButton.d.ts +32 -16
  28. package/dist/components/button/UButton.js +38 -5
  29. package/dist/components/button/UButton.styles.js +67 -50
  30. package/dist/components/button/forwarded-aria.d.ts +6 -0
  31. package/dist/components/button/forwarded-aria.js +15 -0
  32. package/dist/components/button-group/UButtonGroup.d.ts +4 -4
  33. package/dist/components/button-group/UButtonGroup.js +8 -8
  34. package/dist/components/button-group/UButtonGroup.styles.js +2 -2
  35. package/dist/components/calendar/UCalendar.styles.js +4 -3
  36. package/dist/components/calendar/date-text-controller.d.ts +5 -0
  37. package/dist/components/calendar/date-text-controller.js +7 -0
  38. package/dist/components/calendar/picker.styles.js +7 -2
  39. package/dist/components/card/UCard.d.ts +4 -3
  40. package/dist/components/card/UCard.js +3 -3
  41. package/dist/components/card/UCard.styles.js +2 -1
  42. package/dist/components/carousel/UCarousel.js +2 -2
  43. package/dist/components/carousel/UCarousel.styles.js +17 -6
  44. package/dist/components/checkbox/UCheckbox.d.ts +8 -9
  45. package/dist/components/checkbox/UCheckbox.js +3 -3
  46. package/dist/components/checkbox/UCheckbox.styles.js +22 -18
  47. package/dist/components/chip/UChip.d.ts +2 -2
  48. package/dist/components/chip/UChip.js +4 -4
  49. package/dist/components/copy-button/UCopyButton.d.ts +2 -2
  50. package/dist/components/copy-button/UCopyButton.js +4 -4
  51. package/dist/components/date-picker/UDatePicker.d.ts +3 -0
  52. package/dist/components/date-picker/UDatePicker.js +9 -4
  53. package/dist/components/date-picker/UDatePicker.styles.js +13 -2
  54. package/dist/components/date-range-picker/UDateRangePicker.d.ts +3 -0
  55. package/dist/components/date-range-picker/UDateRangePicker.js +8 -3
  56. package/dist/components/date-range-picker/UDateRangePicker.styles.js +13 -3
  57. package/dist/components/dialog/UDialog.js +1 -1
  58. package/dist/components/divider/UDivider.d.ts +3 -3
  59. package/dist/components/divider/UDivider.js +2 -2
  60. package/dist/components/divider/UDivider.styles.js +5 -5
  61. package/dist/components/drawer/UDrawer.js +1 -1
  62. package/dist/components/expander/UExpander.styles.js +2 -2
  63. package/dist/components/file-input/UFileInput.styles.js +5 -2
  64. package/dist/components/icon-button/UIconButton.d.ts +4 -3
  65. package/dist/components/icon-button/UIconButton.js +16 -6
  66. package/dist/components/icon-button/UIconButton.styles.js +2 -2
  67. package/dist/components/input/UInput.d.ts +12 -5
  68. package/dist/components/input/UInput.js +7 -4
  69. package/dist/components/input/UInput.styles.js +60 -30
  70. package/dist/components/menu/UMenu.d.ts +5 -4
  71. package/dist/components/menu/UMenu.js +3 -3
  72. package/dist/components/menu/UMenu.styles.js +1 -1
  73. package/dist/components/menu-item/UMenuItem.styles.js +1 -1
  74. package/dist/components/option/UOption.d.ts +1 -0
  75. package/dist/components/option/UOption.js +6 -3
  76. package/dist/components/option/UOption.styles.js +1 -1
  77. package/dist/components/progress-bar/UProgressBar.styles.js +11 -0
  78. package/dist/components/radio/URadio.d.ts +27 -6
  79. package/dist/components/radio/URadio.js +48 -12
  80. package/dist/components/radio/URadio.styles.js +47 -13
  81. package/dist/components/rating/URating.styles.js +5 -1
  82. package/dist/components/select/USelect.d.ts +9 -2
  83. package/dist/components/select/USelect.js +7 -2
  84. package/dist/components/select/USelect.styles.js +55 -26
  85. package/dist/components/slider/USlider.styles.js +4 -4
  86. package/dist/components/spinner/USpinner.styles.js +2 -0
  87. package/dist/components/split-panel/USplitPanel.styles.js +2 -1
  88. package/dist/components/steps/USteps.d.ts +57 -0
  89. package/dist/components/steps/USteps.js +58 -0
  90. package/dist/components/steps/USteps.styles.d.ts +1 -0
  91. package/dist/components/steps/USteps.styles.js +110 -0
  92. package/dist/components/switch/USwitch.styles.js +5 -3
  93. package/dist/components/tab/UTab.js +2 -2
  94. package/dist/components/tab/UTab.styles.js +1 -1
  95. package/dist/components/tab-panel/UTabPanel.d.ts +11 -2
  96. package/dist/components/tab-panel/UTabPanel.js +33 -5
  97. package/dist/components/tab-panel/UTabPanel.styles.js +29 -29
  98. package/dist/components/tag/UTag.d.ts +14 -6
  99. package/dist/components/tag/UTag.js +8 -3
  100. package/dist/components/tag/UTag.styles.js +33 -26
  101. package/dist/components/textarea/UTextarea.d.ts +9 -3
  102. package/dist/components/textarea/UTextarea.js +7 -2
  103. package/dist/components/textarea/UTextarea.styles.js +41 -22
  104. package/dist/components/tree-item/UTreeItem.styles.js +7 -5
  105. package/dist/index.d.ts +1 -0
  106. package/dist/index.js +2 -1
  107. package/dist/plugins/vite-plugin-react-wrapper.js +14 -5
  108. package/dist/react/UAlert.d.ts +4 -2
  109. package/dist/react/UAvatar.d.ts +4 -2
  110. package/dist/react/UBadge.d.ts +4 -2
  111. package/dist/react/UBreadcrumb.d.ts +4 -2
  112. package/dist/react/UBreadcrumbItem.d.ts +4 -2
  113. package/dist/react/UButton.d.ts +4 -2
  114. package/dist/react/UButtonGroup.d.ts +4 -2
  115. package/dist/react/UCard.d.ts +4 -2
  116. package/dist/react/UCarousel.d.ts +4 -2
  117. package/dist/react/UCheckbox.d.ts +4 -2
  118. package/dist/react/UChip.d.ts +4 -2
  119. package/dist/react/UCopyButton.d.ts +4 -2
  120. package/dist/react/UDatePicker.d.ts +4 -2
  121. package/dist/react/UDateRangePicker.d.ts +4 -2
  122. package/dist/react/UDialog.d.ts +4 -2
  123. package/dist/react/UDivider.d.ts +4 -2
  124. package/dist/react/UDrawer.d.ts +4 -2
  125. package/dist/react/UExpander.d.ts +4 -2
  126. package/dist/react/UField.d.ts +4 -2
  127. package/dist/react/UFileInput.d.ts +4 -2
  128. package/dist/react/UForm.d.ts +4 -2
  129. package/dist/react/UIcon.d.ts +4 -2
  130. package/dist/react/UIconButton.d.ts +4 -2
  131. package/dist/react/UInput.d.ts +4 -2
  132. package/dist/react/UMenu.d.ts +4 -2
  133. package/dist/react/UMenuItem.d.ts +4 -2
  134. package/dist/react/UOption.d.ts +4 -2
  135. package/dist/react/UPanel.d.ts +4 -2
  136. package/dist/react/UPopover.d.ts +4 -2
  137. package/dist/react/UProgressBar.d.ts +4 -2
  138. package/dist/react/UProgressRing.d.ts +4 -2
  139. package/dist/react/URadio.d.ts +4 -2
  140. package/dist/react/URating.d.ts +4 -2
  141. package/dist/react/USelect.d.ts +4 -2
  142. package/dist/react/USkeleton.d.ts +4 -2
  143. package/dist/react/USlider.d.ts +4 -2
  144. package/dist/react/USpinner.d.ts +4 -2
  145. package/dist/react/USplitPanel.d.ts +4 -2
  146. package/dist/react/USteps.d.ts +14 -0
  147. package/dist/react/USteps.js +10 -0
  148. package/dist/react/USwitch.d.ts +4 -2
  149. package/dist/react/UTab.d.ts +4 -2
  150. package/dist/react/UTabPanel.d.ts +4 -2
  151. package/dist/react/UTag.d.ts +4 -2
  152. package/dist/react/UText.d.ts +4 -2
  153. package/dist/react/UTextarea.d.ts +4 -2
  154. package/dist/react/UTooltip.d.ts +4 -2
  155. package/dist/react/UTree.d.ts +4 -2
  156. package/dist/react/UTreeItem.d.ts +4 -2
  157. package/dist/react/index.d.ts +1 -0
  158. package/dist/react/index.js +1 -0
  159. package/dist/styles/dark.css +42 -0
  160. package/dist/styles/light.css +44 -0
  161. package/dist/utilities/Dialog.d.ts +2 -2
  162. package/dist/utilities/Dialog.js +3 -3
  163. package/dist/utilities/Locale.d.ts +1 -1
  164. package/dist/utilities/Toast.d.ts +2 -2
  165. package/dist/utilities/Toast.js +1 -1
  166. package/dist/utilities/icons.d.ts +12 -3
  167. package/dist/utilities/icons.js +24 -6
  168. package/package.json +1 -1
  169. package/skills/iyulab-components/SKILL.md +3 -3
  170. package/skills/iyulab-components/references/components/alert.md +5 -5
  171. package/skills/iyulab-components/references/components/badge.md +3 -3
  172. package/skills/iyulab-components/references/components/button-group.md +3 -3
  173. package/skills/iyulab-components/references/components/button.md +34 -19
  174. package/skills/iyulab-components/references/components/card.md +3 -3
  175. package/skills/iyulab-components/references/components/checkbox.md +5 -5
  176. package/skills/iyulab-components/references/components/chip.md +2 -2
  177. package/skills/iyulab-components/references/components/copy-button.md +1 -1
  178. package/skills/iyulab-components/references/components/date-picker.md +1 -0
  179. package/skills/iyulab-components/references/components/date-range-picker.md +1 -0
  180. package/skills/iyulab-components/references/components/dialog.md +2 -2
  181. package/skills/iyulab-components/references/components/divider.md +2 -2
  182. package/skills/iyulab-components/references/components/drawer.md +1 -1
  183. package/skills/iyulab-components/references/components/field.md +1 -1
  184. package/skills/iyulab-components/references/components/icon-button.md +8 -2
  185. package/skills/iyulab-components/references/components/input.md +4 -2
  186. package/skills/iyulab-components/references/components/menu.md +1 -1
  187. package/skills/iyulab-components/references/components/radio.md +16 -4
  188. package/skills/iyulab-components/references/components/select.md +2 -1
  189. package/skills/iyulab-components/references/components/steps.md +66 -0
  190. package/skills/iyulab-components/references/components/tab-panel.md +10 -3
  191. package/skills/iyulab-components/references/components/tag.md +11 -7
  192. package/skills/iyulab-components/references/components/textarea.md +2 -1
  193. package/skills/iyulab-components/references/usage.md +1 -1
  194. package/skills/iyulab-components/references/utilities/dialog.md +2 -2
  195. package/skills/iyulab-components/references/utilities/icons.md +2 -2
  196. package/skills/iyulab-components/references/utilities/theme.md +9 -5
  197. package/skills/iyulab-components/references/utilities/toast.md +2 -2
@@ -56,6 +56,11 @@ declare class IconRegistry {
56
56
  private static libs;
57
57
  /** 동일 (lib, name)의 동시 리졸브를 하나의 요청으로 합치는 in-flight 맵입니다. */
58
58
  private static pending;
59
+ /**
60
+ * 라이브러리별 세대 — 교체·해제 때 올라간다. 그 전에 출발한 리졸브는 끝나도 캐시에 쓰지 않는다
61
+ * (옛 리졸버의 결과가 새 리졸버의 자리를 차지하지 않게).
62
+ */
63
+ private static generation;
59
64
  /** 클래스 생성 방지 */
60
65
  private constructor();
61
66
  /**
@@ -64,15 +69,19 @@ declare class IconRegistry {
64
69
  static has(lib: string): boolean;
65
70
  /**
66
71
  * 지정된 아이콘 라이브러리를 등록합니다.
67
- * 이미 등록된 라이브러리 이름인 경우, 기존 등록을 덮어쓰지 않고 무시합니다.
72
+ *
73
+ * 같은 이름이 이미 있으면 **교체**합니다 — 내장 라이브러리(`bootstrap` 등)를 로컬 리졸버로
74
+ * 바꾸는 것(폐쇄망)이 한 호출입니다. 교체하면 그 라이브러리의 캐시와 진행 중인 리졸브가
75
+ * 무효가 되어 옛 리졸버의 결과가 남지 않습니다. 같은 리졸버를 다시 넘기면 아무 일도 없습니다.
68
76
  */
69
77
  static register(lib: string, resolver: IconResolver): void;
70
78
  /**
71
79
  * 지정된 아이콘 라이브러리를 등록 해제합니다.
72
- * 해당 라이브러리의 캐시 항목도 함께 비웁니다 —
73
- * `unregister` 후 다른 리졸버를 재등록할 때 이전 결과가 남지 않도록 하기 위함입니다.
80
+ * 해당 라이브러리의 캐시 항목과 진행 중인 리졸브도 함께 무효가 됩니다.
74
81
  */
75
82
  static unregister(lib: string): void;
83
+ /** 라이브러리의 캐시를 비우고 세대를 올려 진행 중인 리졸브가 결과를 쓰지 못하게 한다. */
84
+ private static invalidate;
76
85
  /**
77
86
  * 지정된 아이콘 라이브러리의 svg 아이콘 소스를 가져옵니다.
78
87
  *
@@ -128,6 +128,9 @@ var IconRegistry = class {
128
128
  static {
129
129
  this.pending = /* @__PURE__ */ new Map();
130
130
  }
131
+ static {
132
+ this.generation = /* @__PURE__ */ new Map();
133
+ }
131
134
  /** 클래스 생성 방지 */
132
135
  constructor() {}
133
136
  /**
@@ -138,19 +141,31 @@ var IconRegistry = class {
138
141
  }
139
142
  /**
140
143
  * 지정된 아이콘 라이브러리를 등록합니다.
141
- * 이미 등록된 라이브러리 이름인 경우, 기존 등록을 덮어쓰지 않고 무시합니다.
144
+ *
145
+ * 같은 이름이 이미 있으면 **교체**합니다 — 내장 라이브러리(`bootstrap` 등)를 로컬 리졸버로
146
+ * 바꾸는 것(폐쇄망)이 한 호출입니다. 교체하면 그 라이브러리의 캐시와 진행 중인 리졸브가
147
+ * 무효가 되어 옛 리졸버의 결과가 남지 않습니다. 같은 리졸버를 다시 넘기면 아무 일도 없습니다.
142
148
  */
143
149
  static register(lib, resolver) {
144
- if (!this.libs.has(lib)) this.libs.set(lib, resolver);
150
+ const current = this.libs.get(lib);
151
+ if (current === resolver) return;
152
+ this.libs.set(lib, resolver);
153
+ if (current) this.invalidate(lib);
145
154
  }
146
155
  /**
147
156
  * 지정된 아이콘 라이브러리를 등록 해제합니다.
148
- * 해당 라이브러리의 캐시 항목도 함께 비웁니다 —
149
- * `unregister` 후 다른 리졸버를 재등록할 때 이전 결과가 남지 않도록 하기 위함입니다.
157
+ * 해당 라이브러리의 캐시 항목과 진행 중인 리졸브도 함께 무효가 됩니다.
150
158
  */
151
159
  static unregister(lib) {
152
160
  this.libs.delete(lib);
161
+ this.invalidate(lib);
162
+ }
163
+ /** 라이브러리의 캐시를 비우고 세대를 올려 진행 중인 리졸브가 결과를 쓰지 못하게 한다. */
164
+ static invalidate(lib) {
153
165
  IconCache.clear(lib);
166
+ this.generation.set(lib, (this.generation.get(lib) ?? 0) + 1);
167
+ const prefix = `${lib}:`;
168
+ for (const key of this.pending.keys()) if (key.startsWith(prefix)) this.pending.delete(key);
154
169
  }
155
170
  /**
156
171
  * 지정된 아이콘 라이브러리의 svg 아이콘 소스를 가져옵니다.
@@ -191,10 +206,11 @@ var IconRegistry = class {
191
206
  const key = `${lib}:${name}`;
192
207
  const inflight = this.pending.get(key);
193
208
  if (inflight) return inflight;
209
+ const generation = this.generation.get(lib) ?? 0;
194
210
  const task = (async () => {
195
211
  try {
196
212
  const svg = (await fn())?.trim();
197
- IconCache.set(lib, name, svg);
213
+ if ((this.generation.get(lib) ?? 0) === generation) IconCache.set(lib, name, svg);
198
214
  return svg;
199
215
  } catch (error) {
200
216
  console.error(`[IconRegistry] Failed to resolve icon '${key}' (will retry):`, error);
@@ -202,7 +218,9 @@ var IconRegistry = class {
202
218
  }
203
219
  })();
204
220
  this.pending.set(key, task);
205
- task.finally(() => this.pending.delete(key));
221
+ task.finally(() => {
222
+ if (this.pending.get(key) === task) this.pending.delete(key);
223
+ });
206
224
  return task;
207
225
  }
208
226
  };
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": "1.58.0",
4
+ "version": "2.0.1",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -4,7 +4,6 @@ description: Web component library built on Lit. Covers all u-* custom elements
4
4
  license: MIT
5
5
  metadata:
6
6
  author: iyulab
7
- version: "1.4.0"
8
7
  ---
9
8
 
10
9
  # @iyulab/components
@@ -57,10 +56,10 @@ import { UButton, UInput } from '@iyulab/components/react';
57
56
 
58
57
  ### Buttons & Actions
59
58
 
60
- - [`u-button`](./references/components/button.md) — Versatile button with multiple variants; renders as `<a>` when `href` is set
59
+ - [`u-button`](./references/components/button.md) — Versatile button with multiple appearances; renders as `<a>` when `href` is set
61
60
  - [`u-icon-button`](./references/components/icon-button.md) — Square icon-only button with built-in tooltip
62
61
  - [`u-copy-button`](./references/components/copy-button.md) — Copies text to the clipboard with a transient confirmation
63
- - [`u-button-group`](./references/components/button-group.md) — Groups buttons with shared variant and disabled state
62
+ - [`u-button-group`](./references/components/button-group.md) — Groups buttons with shared appearance and disabled state
64
63
 
65
64
  ### Form Controls
66
65
 
@@ -121,6 +120,7 @@ carries the control's role, not on the host element. Native nodes use native `di
121
120
  - [`u-tag`](./references/components/tag.md) — Non-interactive label tag
122
121
  - [`u-icon`](./references/components/icon.md) — SVG icon from built-in or external icon library
123
122
  - [`u-text`](./references/components/text.md) — Semantic typography step; optional heading level
123
+ - [`u-steps`](./references/components/steps.md) — Display-only progress line: complete, current, on-hold and upcoming steps
124
124
 
125
125
  ---
126
126
 
@@ -13,9 +13,9 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
13
13
  Your changes have been saved.
14
14
  </u-alert>
15
15
 
16
- <u-alert status="error" variant="outlined" open>
16
+ <u-alert status="error" appearance="outlined" open>
17
17
  Failed to load data.
18
- <u-button slot="footer" variant="solid">Retry</u-button>
18
+ <u-button slot="footer" appearance="solid">Retry</u-button>
19
19
  </u-alert>
20
20
  ```
21
21
 
@@ -34,7 +34,7 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
34
34
  |----------|------|---------|---------|-------------|
35
35
  | `open` | `boolean` | `false` | ✓ | Show/hide the alert |
36
36
  | `closable` | `boolean` | `false` | ✓ | Show close button |
37
- | `variant` | `'solid'\|'filled'\|'outlined'\|'glass'` | `'solid'` | ✓ | Visual style |
37
+ | `appearance` | `'soft'\|'outlined'` | `'soft'` | ✓ | `soft` status-colour tint, no outline · `outlined` status-colour border on a transparent face |
38
38
  | `status` | `'error'\|'warning'\|'success'\|'info'\|'notice'` | — | ✓ | Status type; controls icon and color |
39
39
  | `title` | `string` | `''` | — | Title label. Left empty, the status name in the current locale is shown (`Locale.set('ko')` → 「오류」), not the raw status value |
40
40
  | `duration` | `number` | `0` | — | Auto-dismiss delay in ms; `0` disables |
@@ -69,6 +69,6 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
69
69
 
70
70
  | Property | Description |
71
71
  |----------|-------------|
72
- | `--alert-background-color` | Background color (auto-set by status) |
73
- | `--alert-border-color` | Border color (auto-set by status) |
72
+ | `--alert-background-color` | Background color (auto-set by status; transparent for `appearance="outlined"`) |
73
+ | `--alert-border-color` | Border color (auto-set by status; transparent for `appearance="soft"`) |
74
74
  | `--alert-icon-color` | Icon color (auto-set by status) |
@@ -15,7 +15,7 @@ Status badge for numbers, labels, or dot indicators. Use `anchor` to position it
15
15
  <!-- Anchored on another element -->
16
16
  <div style="position:relative; display:inline-block;">
17
17
  <u-icon lib="tabler" name="bell"></u-icon>
18
- <u-badge variant="dot" color="red" anchor="top-right"></u-badge>
18
+ <u-badge shape="dot" color="red" anchor="top-right"></u-badge>
19
19
  </div>
20
20
  ```
21
21
 
@@ -40,7 +40,7 @@ Status badge for numbers, labels, or dot indicators. Use `anchor` to position it
40
40
 
41
41
  | Property | Type | Default | Reflect | Description |
42
42
  |----------|------|---------|---------|-------------|
43
- | `variant` | `'pill'\|'dot'\|'square'` | `'pill'` | ✓ | Shape variant; `dot` renders no content |
43
+ | `shape` | `'pill'\|'dot'\|'square'` | `'pill'` | ✓ | Shape; `dot` renders no content |
44
44
  | `color` | `'neutral'\|'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'yellow'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'blue'` | ✓ | Badge color (role axis = semantics, decorative axis = the color itself) |
45
45
  | `anchor` | `'top-right'\|'top-left'\|'bottom-right'\|'bottom-left'` | — | ✓ | Absolute anchor position relative to parent |
46
- | `icon` | `boolean` | `false` | ✓ | Adds a status icon so the meaning survives without color (`info`/`success`/`warning`/`danger`; not drawn for `variant="dot"`) |
46
+ | `icon` | `boolean` | `false` | ✓ | Adds a status icon so the meaning survives without color (`info`/`success`/`warning`/`danger`; not drawn for `shape="dot"`) |
@@ -6,10 +6,10 @@ import '@iyulab/components/dist/components/button-group/UButtonGroup.js';
6
6
 
7
7
  **Tag:** `u-button-group`
8
8
 
9
- Groups `u-button` or `u-icon-button` elements. Propagates `variant` and `disabled` to all child buttons automatically.
9
+ Groups `u-button` or `u-icon-button` elements. Propagates `appearance` and `disabled` to all child buttons automatically.
10
10
 
11
11
  ```html
12
- <u-button-group variant="outlined">
12
+ <u-button-group appearance="outlined">
13
13
  <u-button>Left</u-button>
14
14
  <u-button>Center</u-button>
15
15
  <u-button>Right</u-button>
@@ -33,6 +33,6 @@ Groups `u-button` or `u-icon-button` elements. Propagates `variant` and `disable
33
33
 
34
34
  | Property | Type | Default | Reflect | Description |
35
35
  |----------|------|---------|---------|-------------|
36
- | `variant` | `'solid'\|'surface'\|'filled'\|'outlined'\|'ghost'\|'link'` | `'solid'` | ✓ | Variant propagated to all child buttons |
36
+ | `appearance` | `'solid'\|'soft'\|'outlined'\|'plain'\|'link'` | `'solid'` | ✓ | Appearance propagated to all child buttons |
37
37
  | `vertical` | `boolean` | `false` | ✓ | Stack buttons vertically |
38
38
  | `disabled` | `boolean` | `false` | ✓ | Disable all child buttons |
@@ -6,24 +6,25 @@ import '@iyulab/components/dist/components/button/UButton.js';
6
6
 
7
7
  **Tag:** `u-button`
8
8
 
9
- Versatile button with multiple visual variants. Renders as an `<a>` element when `href` is provided.
9
+ Versatile button with multiple appearances. Renders as an `<a>` element when `href` is provided.
10
10
 
11
11
  ```html
12
12
  <u-button>Default</u-button>
13
- <u-button variant="outlined">Outlined</u-button>
14
- <u-button variant="ghost" loading>Loading</u-button>
13
+ <u-button appearance="outlined">Outlined</u-button>
14
+ <u-button appearance="plain" loading>Loading</u-button>
15
15
  <u-button href="https://example.com" target="_blank">Link</u-button>
16
16
 
17
- <!-- Semantic color (independent of variant) -->
18
- <u-button variant="solid" color="red">Delete</u-button>
19
- <u-button variant="surface" color="green">Approve</u-button>
17
+ <!-- Semantic color (independent of appearance) -->
18
+ <u-button appearance="solid" color="red">Delete</u-button>
19
+ <u-button appearance="soft" color="green">Approve</u-button>
20
+ <u-button color="neutral">Cancel</u-button>
20
21
 
21
22
  <!-- Size -->
22
23
  <u-button size="sm">Small</u-button>
23
24
  <u-button size="lg">Large</u-button>
24
25
 
25
26
  <!-- With prefix/suffix icons -->
26
- <u-button variant="solid">
27
+ <u-button appearance="solid">
27
28
  <u-icon slot="prefix" lib="tabler" name="download"></u-icon>
28
29
  Download
29
30
  </u-button>
@@ -44,8 +45,8 @@ Versatile button with multiple visual variants. Renders as an `<a>` element when
44
45
 
45
46
  | Property | Type | Default | Reflect | Description |
46
47
  |----------|------|---------|---------|-------------|
47
- | `variant` | `'solid'\|'surface'\|'filled'\|'outlined'\|'ghost'\|'link'` | `'solid'` | ✓ | Visual style |
48
- | `color` | `'neutral'\|'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'neutral'` | ✓ | Semantic color, independent of `variant`. `ghost` is unaffected (see notes below). |
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
+ | `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). |
49
50
  | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Button size (12px/14px/16px font-size; padding, spinner, and icon slots scale proportionally). |
50
51
  | `rounded` | `boolean` | `false` | ✓ | Pill-shaped border radius |
51
52
  | `disabled` | `boolean` | `false` | ✓ | Disable the button |
@@ -60,9 +61,23 @@ Versatile button with multiple visual variants. Renders as an `<a>` element when
60
61
 
61
62
  ### `color` notes
62
63
 
63
- - `solid`/`surface`/`filled`/`outlined`: background/border switch to the chosen color's scale.
64
- - `link`: text color switches, but only when `color` is set to something other than `"neutral"` — the default `link` look stays blue (backward compatible).
65
- - `ghost`: no visual effect — its hover/active backgrounds use generic surface tokens (`--u-bg-color-hover`/`--u-bg-color-active`), not the neutral color scale.
64
+ - `solid`/`soft`/`outlined`: background/border switch to the chosen color's scale. `neutral` is an achromatic (grey) button — the brand colour is `primary`, which is also how a button with no `color` is painted.
65
+ - `plain`/`link`: these have no fill, so with no `color` or `neutral` they keep body text (`plain`) or link text (`link`); any other `color` switches the text color (e.g. `appearance="link" color="danger"` for a destructive link). A `plain` button with an explicit `color="primary"` draws brand-coloured text; a `link` stays link-coloured.
66
+ - `color` has no default value, so a bare button carries no `color` attribute — `u-button[color="primary"]` matches only buttons that set it.
67
+
68
+ ## Accessibility
69
+
70
+ Set ARIA on the `u-button` host as you would on a native button — the component moves it to the
71
+ inner `<button>`/`<a>` that actually takes focus: `aria-label`, and the button states
72
+ `aria-pressed` (toggle), `aria-expanded` + `aria-controls` (disclosure) and `aria-haspopup`
73
+ (menu button). `aria-pressed` is dropped on a link (`href`), where it is not allowed.
74
+ `aria-controls` is an id reference, which cannot cross the shadow boundary, so it is carried as an
75
+ element reference (`ariaControlsElements`) resolved when the button renders.
76
+
77
+ ```html
78
+ <u-button aria-expanded="false" aria-controls="details">Details</u-button>
79
+ <u-button aria-pressed="true">Bold</u-button>
80
+ ```
66
81
 
67
82
  ## CSS Parts
68
83
 
@@ -77,15 +92,15 @@ Versatile button with multiple visual variants. Renders as an `<a>` element when
77
92
 
78
93
  | Property | Description |
79
94
  |----------|-------------|
80
- | `--u-primary-color` | Base color when `color="neutral"` — set it and hover/active/surface tones auto-derive via `color-mix()` |
95
+ | `--u-primary-color` | Base color for `color="primary"` and for a button with no `color` — set it and hover/active/soft tones auto-derive via `color-mix()` |
81
96
  | `--btn-color` | The button's **fill** color. Every derived token below is `color-mix()`'d from this one — usually the only one you need to override |
82
- | `--btn-txt-color` | Text color on the fill, read by `variant="solid"` (default `#fff`, or `--u-{role}-txt-color` when a semantic `color` is set) |
83
- | `--btn-color-strong` | Text color on the surrounding page background, read by `variant="link"` — opposite contrast need from the fill, so it's a separate token (default: same as `--btn-color`, or `--u-{role}-color-strong` for a semantic `color`) |
97
+ | `--btn-txt-color` | Text color on the fill, read by `appearance="solid"` (default `#fff`, or `--u-{role}-txt-color` when a semantic `color` is set) |
98
+ | `--btn-color-strong` | Text color on the surrounding page background, read by `appearance="link"` and `"plain"` — opposite contrast need from the fill, so it's a separate token (default: same as `--btn-color`, or `--u-{role}-color-strong` for a semantic `color`) |
84
99
  | `--btn-color-hover` / `--btn-color-active` | `solid` background hover/active (default: `--btn-color` at 85%/70% + black) |
85
- | `--btn-color-surface` / `-hover` / `-active` | `surface` background states (default: `--btn-color` at 12%/22%/32%) |
100
+ | `--btn-color-surface` / `-hover` / `-active` | `soft` background states — role colors (`primary`·`info`·`success`·`warning`·`danger`) use `--u-{role}-bg-color` and deepen it with 18%/30% of `--btn-color`; other colors mix `--btn-color` at 12%/22%/32%. A colored `plain` button hovers onto the same surface |
86
101
  | `--btn-color-border` / `-hover` / `-active` | Border states (default: `--btn-color` at 45%/60%/75%) |
87
- | `--btn-color-outline-hover` / `-active` | `outlined`/`ghost` background hover/active (default: 6%/12%) |
102
+ | `--btn-color-outline-hover` / `-active` | `outlined`/`plain` background hover/active (default: 6%/12%) |
88
103
  | `--btn-color-strong-hover` / `-active` | `link` text hover/active — the role value itself doesn't move; hover adds an underline instead (default: `--btn-color-strong` at 85%/70% + black) |
89
- | `--btn-border-color` | Border color read by variant/hover/active rules (default: `transparent`) |
104
+ | `--btn-border-color` | Border color read by appearance/hover/active rules (default: `transparent`) |
90
105
  | `--btn-padding-block` | Vertical inner padding (default `0.5em`) |
91
- | `--btn-padding-inline` | Horizontal inner padding (default `1em`, `0` for `variant="link"`) — overriding it does not change the min-height, which is derived from `--btn-padding-block` instead |
106
+ | `--btn-padding-inline` | Horizontal inner padding (default `1em`, `0` for `appearance="link"`) — overriding it does not change the min-height, which is derived from `--btn-padding-block` instead |
@@ -13,7 +13,7 @@ Content card with optional media, header, body, and footer sections.
13
13
  <img slot="media" src="/cover.jpg" alt="Cover" />
14
14
  <span slot="header">Title</span>
15
15
  <p>Card body content.</p>
16
- <u-button slot="footer" variant="ghost">Read more</u-button>
16
+ <u-button slot="footer" appearance="plain">Read more</u-button>
17
17
  </u-card>
18
18
 
19
19
  <u-card orientation="horizontal" hoverable>
@@ -39,7 +39,7 @@ Content card with optional media, header, body, and footer sections.
39
39
  |----------|------|---------|---------|-------------|
40
40
  | `orientation` | `'vertical'\|'horizontal'` | `'vertical'` | ✓ | Layout direction |
41
41
  | `shadowless` | `boolean` | `false` | ✓ | Remove drop shadow |
42
- | `borderless` | `boolean` | `false` | ✓ | Remove border |
42
+ | `appearance` | `'outlined'\|'plain'` | `'outlined'` | ✓ | `outlined` border and drop shadow · `plain` no border and no shadow (layout only) |
43
43
  | `hoverable` | `boolean` | `false` | ✓ | Lift effect on hover |
44
44
 
45
45
  ## CSS Parts
@@ -57,5 +57,5 @@ Content card with optional media, header, body, and footer sections.
57
57
 
58
58
  | Property | Description |
59
59
  |----------|-------------|
60
- | `--card-border-width` | Border thickness (`0` when `borderless`) |
60
+ | `--card-border-width` | Border thickness (`0` for `appearance="plain"`) |
61
61
  | `--card-border-color` | Border color |
@@ -11,7 +11,7 @@ Checkbox with `indeterminate` state support. Form-associated (`formAssociated =
11
11
  ```html
12
12
  <u-checkbox name="agree" required>I agree to the terms</u-checkbox>
13
13
 
14
- <u-checkbox checked color="green" variant="outline">
14
+ <u-checkbox checked color="green" appearance="outlined">
15
15
  Enabled feature
16
16
  </u-checkbox>
17
17
 
@@ -33,8 +33,8 @@ Checkbox with `indeterminate` state support. Form-associated (`formAssociated =
33
33
  |----------|------|---------|---------|-------------|
34
34
  | `checked` | `boolean` | `false` | ✓ | Checked state |
35
35
  | `indeterminate` | `boolean` | `false` | ✓ | Partial / indeterminate state |
36
- | `variant` | `'filled'\|'outline'` | `'filled'` | ✓ | Visual style |
37
- | `color` | `'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'\|'neutral'` | `'blue'` | ✓ | Accent color — role axis (`primary`…`danger`, follows rebranding) and decorative axis (`blue`…, immune to it) |
36
+ | `appearance` | `'solid'\|'outlined'` | `'solid'` | ✓ | `solid` fills the checked box with the colour · `outlined` colours the border and checkmark |
37
+ | `color` | `'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'\|'neutral'` | `'primary'` | ✓ | Accent color — role axis (`primary`…`danger`, follows rebranding) and decorative axis (`blue`…, the palette colour itself, immune to it). `neutral` is grey |
38
38
  | `disabled` | `boolean` | `false` | ✓ | Disable the control |
39
39
  | `readonly` | `boolean` | `false` | ✓ | Read-only |
40
40
  | `required` | `boolean` | `false` | ✓ | Required field |
@@ -67,6 +67,6 @@ Checkbox with `indeterminate` state support. Form-associated (`formAssociated =
67
67
 
68
68
  | Property | Description |
69
69
  |----------|-------------|
70
- | `--checkbox-color` | Checkmark color |
70
+ | `--checkbox-color` | Checkmark color (`outlined`) |
71
71
  | `--checkbox-border-color` | Border color |
72
- | `--checkbox-background-color` | Fill color when checked |
72
+ | `--checkbox-background-color` | Fill color when checked (`solid`) |
@@ -39,8 +39,8 @@ Interactive chip tag. Supports selectable toggle, removable button, and tooltip.
39
39
 
40
40
  | Property | Type | Default | Reflect | Description |
41
41
  |----------|------|---------|---------|-------------|
42
- | `variant` | `'filled'\|'solid'\|'surface'\|'outlined'` | `'filled'` | ✓ | Visual style |
43
- | `color` | `'neutral'\|'blue'\|'green'\|'yellow'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'neutral'` | ✓ | Color |
42
+ | `appearance` | `'solid'\|'soft'\|'outlined'\|'plain'` | `'soft'` | ✓ | How much chrome (same as [`u-tag`](./tag.md)) |
43
+ | `color` | `'neutral'\|'primary'\|'info'\|'success'\|'warning'\|'danger'\|'blue'\|'green'\|'yellow'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'neutral'` | ✓ | Color — `neutral` (the default) is grey; `primary` is the brand colour |
44
44
  | `rounded` | `boolean` | `false` | ✓ | Pill-shaped |
45
45
  | `removable` | `boolean` | `false` | ✓ | Show remove button |
46
46
  | `selectable` | `boolean` | `false` | ✓ | Can be toggled selected |
@@ -49,7 +49,7 @@ button.addEventListener('copy', (e: ClipboardEvent) => {
49
49
 
50
50
  | Property | Type | Default | Reflect | Description |
51
51
  |----------|------|---------|---------|-------------|
52
- | `variant` | `'solid'\|'outline'\|'ghost'\|'link'` | `'ghost'` | ✓ | Button style |
52
+ | `appearance` | `'solid'\|'soft'\|'outlined'\|'plain'\|'link'` | `'plain'` | ✓ | Button appearance (see [`u-button`](./button.md)) |
53
53
  | `rounded` | `boolean` | `false` | ✓ | Circular shape |
54
54
  | `disabled` | `boolean` | `false` | ✓ | Disabled state |
55
55
  | `copied` | `boolean` | `false` | ✓ | Currently showing the copied state |
@@ -81,6 +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
85
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |
85
86
  | `isDateDisabled` | `(date: string) => boolean` | — | — | App rule for days that cannot be chosen (ISO in, `true` = disabled). Property only; see «Disabled days» |
86
87
  | `placeholder` | `string` | — | — | Placeholder text (defaults to the pattern to type, e.g. `YYYY-MM-DD` or `YYYY-MM-DD HH:mm`) |
@@ -137,6 +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
141
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |
141
142
  | `isDateDisabled` | `(date: string) => boolean` | — | — | App rule for days that cannot start or end a range (ISO in, `true` = disabled). Property only; see «Disabled days» |
142
143
  | `placeholder` | `string` | — | — | Placeholder text (defaults to the pattern to type) |
@@ -15,8 +15,8 @@ For programmatic usage (`Dialog.alert`, `Dialog.confirm`, `Dialog.prompt`), see
15
15
  <span slot="header">Confirm Action</span>
16
16
  <p>Are you sure you want to delete this item?</p>
17
17
  <div slot="footer">
18
- <u-button variant="ghost" @click=${() => dlg.hide()}>Cancel</u-button>
19
- <u-button variant="solid" @click=${handleConfirm}>Delete</u-button>
18
+ <u-button appearance="plain" @click=${() => dlg.hide()}>Cancel</u-button>
19
+ <u-button appearance="solid" @click=${handleConfirm}>Delete</u-button>
20
20
  </div>
21
21
  </u-dialog>
22
22
 
@@ -13,7 +13,7 @@ Horizontal or vertical separator line. Slot content is overlaid as an inline lab
13
13
 
14
14
  <u-divider>OR</u-divider>
15
15
 
16
- <u-divider variant="dashed" align="start">Section</u-divider>
16
+ <u-divider line="dashed" align="start">Section</u-divider>
17
17
 
18
18
  <!-- Vertical -->
19
19
  <div style="display:flex; height:40px;">
@@ -36,7 +36,7 @@ Horizontal or vertical separator line. Slot content is overlaid as an inline lab
36
36
  | Property | Type | Default | Reflect | Description |
37
37
  |----------|------|---------|---------|-------------|
38
38
  | `vertical` | `boolean` | `false` | ✓ | Vertical orientation |
39
- | `variant` | `'solid'\|'dashed'\|'dotted'` | `'solid'` | ✓ | Line style |
39
+ | `line` | `'solid'\|'dashed'\|'dotted'` | `'solid'` | ✓ | Line style |
40
40
  | `align` | `'start'\|'center'\|'end'` | `'center'` | ✓ | Label alignment |
41
41
 
42
42
  ## CSS Parts
@@ -84,7 +84,7 @@ whole contract. Measured in a real browser
84
84
  <u-textarea label="Note"></u-textarea>
85
85
 
86
86
  <div slot="footer">
87
- <u-button variant="ghost" @click=${() => edit.hide()}>Cancel</u-button>
87
+ <u-button appearance="plain" @click=${() => edit.hide()}>Cancel</u-button>
88
88
  <u-button color="primary" @click=${save}>Save</u-button>
89
89
  </div>
90
90
  </u-drawer>
@@ -17,7 +17,7 @@ Layout wrapper for form controls. Renders label, required marker, description te
17
17
  <u-select name="role">
18
18
  <u-option value="admin">Admin</u-option>
19
19
  </u-select>
20
- <u-button slot="label-aside" variant="link">Learn more</u-button>
20
+ <u-button slot="label-aside" appearance="link">Learn more</u-button>
21
21
  </u-field>
22
22
  ```
23
23
 
@@ -13,7 +13,7 @@ Square icon-only button with a built-in tooltip (shown from the default slot). R
13
13
  Delete
14
14
  </u-icon-button>
15
15
 
16
- <u-icon-button variant="outlined" rounded lib="heroicons" name="plus:solid">
16
+ <u-icon-button appearance="outlined" rounded lib="heroicons" name="plus:solid">
17
17
  Add item
18
18
  </u-icon-button>
19
19
 
@@ -34,7 +34,7 @@ Square icon-only button with a built-in tooltip (shown from the default slot). R
34
34
 
35
35
  | Property | Type | Default | Reflect | Description |
36
36
  |----------|------|---------|---------|-------------|
37
- | `variant` | `'solid'\|'surface'\|'filled'\|'outlined'\|'ghost'\|'link'` | `'ghost'` | ✓ | Button variant |
37
+ | `appearance` | `'solid'\|'soft'\|'outlined'\|'plain'\|'link'` | `'plain'` | ✓ | Button appearance (see [`u-button`](./button.md)) |
38
38
  | `rounded` | `boolean` | `false` | ✓ | Circular shape |
39
39
  | `disabled` | `boolean` | `false` | ✓ | Disable the button |
40
40
  | `loading` | `boolean` | `false` | ✓ | Loading state |
@@ -47,6 +47,12 @@ Square icon-only button with a built-in tooltip (shown from the default slot). R
47
47
  | `tooltipPlacement` | `Placement` | `'top'` | — | Tooltip position |
48
48
  | `tooltipOffset` | `OffsetOptions` | `4` | — | Tooltip offset from button |
49
49
 
50
+ ## Accessibility
51
+
52
+ Give every icon button an `aria-label` — the icon has no text. `aria-label` and the button states
53
+ (`aria-pressed`, `aria-expanded`, `aria-controls`, `aria-haspopup`) set on the host reach the
54
+ inner button, as on `u-button`.
55
+
50
56
  ## CSS Parts
51
57
 
52
58
  | Part | Description |
@@ -54,7 +54,8 @@ the library does not infer one from field meaning.
54
54
 
55
55
  | Property | Type | Default | Reflect | Description |
56
56
  |----------|------|---------|---------|-------------|
57
- | `variant` | `'outlined'\|'filled'\|'underlined'\|'borderless'` | `'outlined'` | ✓ | Visual style |
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
59
  | `type` | `'text'\|'password'\|'email'\|'tel'\|'url'\|'search'\|'number'\|'date'\|'time'`… | `'text'` | — | Input type |
59
60
  | `placeholder` | `string` | — | — | Placeholder text |
60
61
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |
@@ -72,7 +73,6 @@ the library does not infer one from field meaning.
72
73
  | `enterkeyhint` | `'enter'\|'done'\|'go'\|'next'\|'previous'\|'search'\|'send'` | — | — | Enter-key label hint |
73
74
  | `autocorrect` | `boolean` | `false` | — | Native autocorrect (Safari/iOS) |
74
75
  | `autocapitalize` | `'off'\|'none'\|'on'\|'sentences'\|'words'\|'characters'` | `'off'` | — | Auto-capitalization behavior |
75
- | `size` | `number` | — | — | Native `size` — visible width in characters |
76
76
  | `disabled` | `boolean` | `false` | ✓ | Disabled |
77
77
  | `readonly` | `boolean` | `false` | ✓ | Read-only |
78
78
  | `required` | `boolean` | `false` | ✓ | Required |
@@ -130,6 +130,8 @@ Call `preventDefault()` on the `keydown` to cancel it. Do not also submit on Ent
130
130
 
131
131
  | Property | Description |
132
132
  |----------|-------------|
133
+ | `--u-input-display` | Host `display` (default `inline-block`); set `block` to fill a form or grid cell |
134
+ | `--u-input-width` | Host `width` (default `auto`); set `100%` where `block` alone does not stretch, such as in a flex container |
133
135
  | `--input-popover-width` | Combobox popover width (fixed to anchor width by default) |
134
136
  | `--input-popover-min-height` | Combobox popover min-height |
135
137
  | `--input-popover-max-height` | Combobox popover max-height |
@@ -45,7 +45,7 @@ Keyboard-navigable menu. Supports single/multiple selection, highlight or checkm
45
45
  | `align` | `'left'\|'center'\|'right'` | `'left'` | ✓ | Item text alignment |
46
46
  | `loop` | `boolean` | `false` | ✓ | Keyboard navigation wraps around |
47
47
  | `inline` | `boolean` | `false` | ✓ | Horizontal layout |
48
- | `borderless` | `boolean` | `false` | ✓ | Remove border |
48
+ | `appearance` | `'outlined'\|'plain'` | `'outlined'` | ✓ | `outlined` bordered box · `plain` no border and no padding |
49
49
 
50
50
  ### Events
51
51
 
@@ -17,11 +17,17 @@ Radio group built from `u-option` children. Form-associated.
17
17
  </u-radio>
18
18
 
19
19
  <!-- Button style, horizontal -->
20
- <u-radio name="plan" type="button" orientation="horizontal" variant="outlined">
20
+ <u-radio name="plan" type="button" orientation="horizontal" appearance="outlined">
21
21
  <u-option value="free">Free</u-option>
22
22
  <u-option value="pro">Pro</u-option>
23
23
  <u-option value="enterprise">Enterprise</u-option>
24
24
  </u-radio>
25
+
26
+ <!-- Segmented control -->
27
+ <u-radio name="view" type="button" orientation="horizontal" appearance="soft" value="list">
28
+ <u-option value="list">List</u-option>
29
+ <u-option value="board">Board</u-option>
30
+ </u-radio>
25
31
  ```
26
32
 
27
33
  ---
@@ -38,7 +44,7 @@ Radio group built from `u-option` children. Form-associated.
38
44
  |----------|------|---------|---------|-------------|
39
45
  | `value` | `string` | — | — | Currently selected value |
40
46
  | `type` | `'default'\|'button'` | `'default'` | ✓ | `button` renders options as toggle buttons |
41
- | `variant` | `'filled'\|'outlined'` | `'filled'` | ✓ | Visual style |
47
+ | `appearance` | `'solid'\|'outlined'\|'soft'` | `'solid'` | ✓ | `solid` fills the picked option · `outlined` · `soft` (`type="button"` only) a segmented control — a quiet track where the picked segment rises onto the surface |
42
48
  | `orientation` | `'vertical'\|'horizontal'` | `'vertical'` | ✓ | Layout direction |
43
49
  | `disabled` | `boolean` | `false` | ✓ | Disable all options |
44
50
  | `readonly` | `boolean` | `false` | ✓ | Read-only |
@@ -50,7 +56,7 @@ Radio group built from `u-option` children. Form-associated.
50
56
 
51
57
  | Event | Description |
52
58
  |-------|-------------|
53
- | `change` | Fires when selection changes |
59
+ | `change` | Fires when the user changes the selection — click, Space/Enter, or an arrow key |
54
60
 
55
61
  ## Methods
56
62
 
@@ -58,9 +64,15 @@ Radio group built from `u-option` children. Form-associated.
58
64
  |--------|-------------|
59
65
  | `validate()` | Validate; sets `invalid` |
60
66
  | `reset()` | Reset selection |
61
- | `focus(options?)` | Focus the first option (regardless of selection) |
67
+ | `focus(options?)` | Focus the group's tab stop — the selected option, or the first enabled one |
62
68
  | `blur()` | Blur the currently focused option, if any |
63
69
 
70
+ ## Keyboard
71
+
72
+ The group is one tab stop (the selected option, or the first enabled one). Arrow keys move focus
73
+ **and** selection together, wrapping at the ends; Home/End jump to the first/last option — the
74
+ native radio group and WAI-ARIA APG behaviour.
75
+
64
76
  ## CSS Parts
65
77
 
66
78
  | Part | Description |
@@ -37,7 +37,8 @@ Dropdown select with single or multiple selection, search, and clear support. Fo
37
37
  | Property | Type | Default | Reflect | Description |
38
38
  |----------|------|---------|---------|-------------|
39
39
  | `value` | `string \| string[]` | — | — | Selected value(s) |
40
- | `variant` | `'outlined'\|'filled'\|'underlined'\|'borderless'` | `'outlined'` | ✓ | Visual style |
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
42
  | `multiple` | `boolean` | `false` | ✓ | Allow multiple selections |
42
43
  | `searchable` | `boolean` | `false` | ✓ | Filter options by text |
43
44
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |