@greypan/web-ui 2.1.7 → 3.0.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.
Files changed (147) hide show
  1. package/README.CN.md +95 -41
  2. package/README.md +100 -42
  3. package/dist/assets/glass.js.map +1 -1
  4. package/dist/assets/menu-portal.js +1 -1
  5. package/dist/assets/menu-portal.js.map +1 -1
  6. package/dist/components/autocomplete/index.d.ts +121 -0
  7. package/dist/components/autocomplete/index.js +414 -0
  8. package/dist/components/autocomplete/index.js.map +1 -0
  9. package/dist/components/autocomplete/style.js +6 -0
  10. package/dist/components/autocomplete/style.js.map +1 -0
  11. package/dist/components/avatar/index.d.ts +0 -1
  12. package/dist/components/avatar/index.js +9 -9
  13. package/dist/components/avatar/index.js.map +1 -1
  14. package/dist/components/back-top/index.d.ts +0 -1
  15. package/dist/components/back-top/index.js +1 -1
  16. package/dist/components/back-top/index.js.map +1 -1
  17. package/dist/components/badge/index.d.ts +0 -1
  18. package/dist/components/badge/index.js +5 -5
  19. package/dist/components/badge/index.js.map +1 -1
  20. package/dist/components/button/index.d.ts +6 -2
  21. package/dist/components/button/index.js +40 -19
  22. package/dist/components/button/index.js.map +1 -1
  23. package/dist/components/button/style.js +1 -1
  24. package/dist/components/button/style.js.map +1 -1
  25. package/dist/components/button-group/index.d.ts +0 -1
  26. package/dist/components/button-group/index.js.map +1 -1
  27. package/dist/components/checkbox/index.d.ts +0 -3
  28. package/dist/components/checkbox/index.js +7 -5
  29. package/dist/components/checkbox/index.js.map +1 -1
  30. package/dist/components/checkbox-group/index.js +2 -2
  31. package/dist/components/checkbox-group/index.js.map +1 -1
  32. package/dist/components/context-menu/index.d.ts +4 -3
  33. package/dist/components/context-menu/index.js +47 -50
  34. package/dist/components/context-menu/index.js.map +1 -1
  35. package/dist/components/dialog/index.d.ts +1 -1
  36. package/dist/components/dialog/index.js +20 -19
  37. package/dist/components/dialog/index.js.map +1 -1
  38. package/dist/components/drawer/index.d.ts +2 -3
  39. package/dist/components/drawer/index.js +43 -33
  40. package/dist/components/drawer/index.js.map +1 -1
  41. package/dist/components/drawer/style.js +1 -1
  42. package/dist/components/drawer/style.js.map +1 -1
  43. package/dist/components/dropdown/index.d.ts +2 -9
  44. package/dist/components/dropdown/index.js +58 -53
  45. package/dist/components/dropdown/index.js.map +1 -1
  46. package/dist/components/dropdown-divider/index.d.ts +0 -1
  47. package/dist/components/dropdown-divider/index.js.map +1 -1
  48. package/dist/components/dropdown-header/index.d.ts +0 -1
  49. package/dist/components/dropdown-header/index.js.map +1 -1
  50. package/dist/components/dropdown-item/index.d.ts +0 -2
  51. package/dist/components/dropdown-item/index.js.map +1 -1
  52. package/dist/components/dropdown-item/style.js +1 -1
  53. package/dist/components/dropdown-item/style.js.map +1 -1
  54. package/dist/components/empty/index.d.ts +0 -1
  55. package/dist/components/empty/index.js +6 -6
  56. package/dist/components/empty/index.js.map +1 -1
  57. package/dist/components/icon/index.d.ts +0 -1
  58. package/dist/components/icon/index.js.map +1 -1
  59. package/dist/components/index.d.ts +5 -0
  60. package/dist/components/index.js +36 -35
  61. package/dist/components/input/index.d.ts +3 -0
  62. package/dist/components/input/index.js +48 -24
  63. package/dist/components/input/index.js.map +1 -1
  64. package/dist/components/input/style.js +1 -1
  65. package/dist/components/input/style.js.map +1 -1
  66. package/dist/components/input-number/index.d.ts +2 -0
  67. package/dist/components/input-number/index.js +25 -12
  68. package/dist/components/input-number/index.js.map +1 -1
  69. package/dist/components/input-number/style.js +1 -1
  70. package/dist/components/input-number/style.js.map +1 -1
  71. package/dist/components/layout/index.d.ts +0 -1
  72. package/dist/components/layout/index.js +4 -4
  73. package/dist/components/layout/index.js.map +1 -1
  74. package/dist/components/option/index.d.ts +0 -11
  75. package/dist/components/option/index.js +1 -1
  76. package/dist/components/option/index.js.map +1 -1
  77. package/dist/components/option/style.js +1 -1
  78. package/dist/components/option/style.js.map +1 -1
  79. package/dist/components/popover/index.d.ts +1 -5
  80. package/dist/components/popover/index.js +42 -37
  81. package/dist/components/popover/index.js.map +1 -1
  82. package/dist/components/radio/index.d.ts +0 -3
  83. package/dist/components/radio/index.js +8 -5
  84. package/dist/components/radio/index.js.map +1 -1
  85. package/dist/components/radio-group/index.js +2 -2
  86. package/dist/components/radio-group/index.js.map +1 -1
  87. package/dist/components/segmented/index.js +8 -4
  88. package/dist/components/segmented/index.js.map +1 -1
  89. package/dist/components/segmented-trigger/index.d.ts +1 -0
  90. package/dist/components/segmented-trigger/index.js +12 -3
  91. package/dist/components/segmented-trigger/index.js.map +1 -1
  92. package/dist/components/segmented-trigger/style.js +1 -1
  93. package/dist/components/segmented-trigger/style.js.map +1 -1
  94. package/dist/components/select/index.d.ts +0 -1
  95. package/dist/components/select/index.js +22 -31
  96. package/dist/components/select/index.js.map +1 -1
  97. package/dist/components/select/style.js +1 -1
  98. package/dist/components/select/style.js.map +1 -1
  99. package/dist/components/slider/index.d.ts +0 -2
  100. package/dist/components/slider/index.js +1 -1
  101. package/dist/components/slider/index.js.map +1 -1
  102. package/dist/components/spinner/index.d.ts +0 -3
  103. package/dist/components/spinner/index.js.map +1 -1
  104. package/dist/components/svg-draw-lines/index.d.ts +0 -3
  105. package/dist/components/svg-draw-lines/index.js.map +1 -1
  106. package/dist/components/switch/index.d.ts +0 -1
  107. package/dist/components/switch/index.js +6 -6
  108. package/dist/components/switch/index.js.map +1 -1
  109. package/dist/components/switch/style.js +1 -1
  110. package/dist/components/switch/style.js.map +1 -1
  111. package/dist/components/textarea/index.d.ts +1 -0
  112. package/dist/components/textarea/index.js +51 -34
  113. package/dist/components/textarea/index.js.map +1 -1
  114. package/dist/components/textarea/style.js +1 -1
  115. package/dist/components/textarea/style.js.map +1 -1
  116. package/dist/components/theme/index.d.ts +0 -3
  117. package/dist/components/theme/index.js.map +1 -1
  118. package/dist/components/toast/manager.js.map +1 -1
  119. package/dist/components/toast/style.js +1 -1
  120. package/dist/components/toast/style.js.map +1 -1
  121. package/dist/components/toast/toast.d.ts +0 -4
  122. package/dist/components/toast/toast.js +25 -17
  123. package/dist/components/toast/toast.js.map +1 -1
  124. package/dist/components/toast/types.d.ts +0 -3
  125. package/dist/components/tooltip/index.d.ts +1 -0
  126. package/dist/components/tooltip/index.js +34 -33
  127. package/dist/components/tooltip/index.js.map +1 -1
  128. package/dist/shared/events/user-change.js +17 -0
  129. package/dist/shared/events/user-change.js.map +1 -0
  130. package/dist/shared/menu-portal/menu-portal.js +10 -11
  131. package/dist/shared/menu-portal/menu-portal.js.map +1 -1
  132. package/dist/shared/normalize/index.js.map +1 -1
  133. package/dist/shared/overlay/anchored-panel.js +12 -12
  134. package/dist/shared/overlay/native-dialog-presence.js +8 -3
  135. package/dist/shared/overlay/native-dialog-presence.js.map +1 -1
  136. package/dist/shared/overlay/overlay.js +55 -33
  137. package/dist/shared/overlay/overlay.js.map +1 -1
  138. package/dist/shared/overlay/portal.js +27 -13
  139. package/dist/shared/overlay/portal.js.map +1 -1
  140. package/dist/shared/overlay/presence.js.map +1 -1
  141. package/dist/shared/scroll-lock/scroll-lock.js +13 -12
  142. package/dist/shared/scroll-lock/scroll-lock.js.map +1 -1
  143. package/dist/shared/theme/overlay-root.js +3 -3
  144. package/dist/types/react.d.ts +15 -41
  145. package/dist/types/utils.d.ts +33 -4
  146. package/dist/types/vue.d.ts +17 -49
  147. package/package.json +11 -6
package/README.CN.md CHANGED
@@ -33,7 +33,7 @@ import '@greypan/web-ui'
33
33
 
34
34
  ### React
35
35
 
36
- 需要 `@types/react >= 16` 作为可选 peer 依赖。
36
+ 需要 `@types/react >= 19` 作为可选 peer 依赖。
37
37
 
38
38
  ```ts
39
39
  // vite.config.ts
@@ -56,7 +56,7 @@ function App() {
56
56
  <web-ui-button variant="primary" onClick={() => alert('点击')}>
57
57
  按钮
58
58
  </web-ui-button>
59
- <web-ui-input onInput={e => console.log((e.target as any).value)} />
59
+ <web-ui-input onInput={e => console.log(e.currentTarget.value)} />
60
60
  </>
61
61
  )
62
62
  }
@@ -65,8 +65,11 @@ function App() {
65
65
  #### React 自定义元素事件与布尔属性
66
66
 
67
67
  React 19 按 JSX 键名中的 `on` 后缀原样注册 Custom Element 事件。事件名大小写敏感:`open-change`
68
- 必须绑定为 `onopen-change`,不能写成 `onOpenChange`。标准 `input` 和 `change` 事件仍使用 React
69
- 惯用的 `onInput` 和 `onChange`。布尔属性遵循原生 HTML 语义:属性缺失为 `false`,属性存在为 `true`。
68
+ 必须绑定为 `onopen-change`,不能写成 `onOpenChange`。标准 `input`、`change`、`focus`、`blur`
69
+ 事件使用 React 惯用的 `onInput`、`onChange`、`onFocus`、`onBlur` handler——其 `currentTarget`
70
+ 类型为组件实例,value/checked 读取无需 cast;`target` 遵循 React SyntheticEvent 语义(`EventTarget`),
71
+ 不承诺为组件实例。kebab-case 自定义事件携带精确类型的 `CustomEvent` detail。
72
+ 布尔属性遵循原生 HTML 语义:属性缺失为 `false`,属性存在为 `true`。
70
73
 
71
74
  ```tsx
72
75
  <web-ui-dialog
@@ -96,7 +99,7 @@ useEffect(() => {
96
99
 
97
100
  ### Vue
98
101
 
99
- 需要 `vue >= 3` 作为可选 peer 依赖。
102
+ 需要 `vue >= 3.5` 作为可选 peer 依赖。
100
103
 
101
104
  ```ts
102
105
  // vite.config.ts
@@ -120,9 +123,25 @@ import '@greypan/web-ui/types/vue'
120
123
  <template>
121
124
  <web-ui-button variant="primary" @click="handleClick">按钮</web-ui-button>
122
125
  <web-ui-input v-model="value" />
126
+ <web-ui-select :value="framework" @change="framework = $event.target.value" />
123
127
  </template>
124
128
  ```
125
129
 
130
+ Vue 事件类型零 cast:带值组件上的 `@input`/`@change` 解析到组件 emit,`$event.target` 即为组件实例,
131
+ `value`/`checked` 直接读取;kebab-case 事件(如 `open-change`)的 `$event.detail` 保持 `CustomEvent` 载荷类型。
132
+ 命名 handler 用 `WebUiEvent<WebUiXxx, 'change'>` 标注。未声明为 emit 的原生事件(`@click`/`@focus` 等)
133
+ 在任何 `web-ui-*` 元素上仍可绑定。
134
+
135
+ ### 属性与事件边界
136
+
137
+ `web-ui-*` 元素是公开 DOM 边界。`id`、`class`、`style`、全局 HTML 属性和 `data-*` 保留在 Custom Element 宿主上,
138
+ 不会复制到 Shadow DOM。只有组件文档明确声明语义映射时,原生元素属性才会传递。例如 `web-ui-button` 会把 `type`
139
+ 映射到内部按钮,且仅接受 `button`、`submit`、`reset`;非法值会回退为 `button`。
140
+
141
+ ARIA 属性同样必须显式支持:使用组件文档化的命名属性,而不是通配 `aria-*` 透传。组件拥有自己的 role 和交互状态。
142
+ `click`、`input`、`change` 等浏览器 composed 原生事件仍是主要交互 API。`open-change` 等 kebab-case 自定义事件
143
+ 仅描述用户操作导致的组件状态变化;程序化赋值 property 不会触发它们。
144
+
126
145
  ## 所有组件
127
146
 
128
147
  | 分类 | 组件 |
@@ -131,6 +150,7 @@ import '@greypan/web-ui/types/vue'
131
150
  | | [`<web-ui-textarea>`](#web-ui-textarea) |
132
151
  | | [`<web-ui-input-number>`](#web-ui-input-number) |
133
152
  | | [`<web-ui-select>`](#web-ui-select) |
153
+ | | [`<web-ui-autocomplete>`](#web-ui-autocomplete) |
134
154
  | | [`<web-ui-slider>`](#web-ui-slider) |
135
155
  | | [`<web-ui-checkbox>`](#web-ui-checkbox) |
136
156
  | | [`<web-ui-radio>`](#web-ui-radio) |
@@ -179,10 +199,12 @@ import '@greypan/web-ui/types/vue'
179
199
  | `placeholder` | `string` | `''` | 占位文本 |
180
200
  | `name` | `string` | `''` | 表单字段名 |
181
201
  | `disabled` | `boolean` | `false` | 禁用状态 |
202
+ | `readonly` | `boolean` | `false` | 只读状态 |
182
203
  | `required` | `boolean` | `false` | 必填校验 |
183
204
  | `clearable` | `boolean` | `false` | 显示清除按钮 |
184
205
  | `full` | `boolean` | `false` | 全宽 |
185
206
  | `borderless` | `boolean` | `false` | 无边框 |
207
+ | `aria-label` | `string` | — | 无障碍标签 |
186
208
 
187
209
  **事件:** `input`, `change`, `focus`, `blur`
188
210
 
@@ -192,23 +214,24 @@ import '@greypan/web-ui/types/vue'
192
214
 
193
215
  多行文本输入框,支持自动调整高度。
194
216
 
195
- | 属性 | 类型 | 默认值 | 说明 |
196
- | ----------------- | --------- | ------- | -------------- |
197
- | `value` | `string` | `''` | 输入值 |
198
- | `placeholder` | `string` | `''` | 占位文本 |
199
- | `rows` | `number` | `3` | 显示行数 |
200
- | `name` | `string` | `''` | 表单字段名 |
201
- | `disabled` | `boolean` | `false` | 禁用状态 |
202
- | `readonly` | `boolean` | `false` | 只读状态 |
203
- | `required` | `boolean` | `false` | 必填校验 |
204
- | `clearable` | `boolean` | `false` | 显示清除按钮 |
205
- | `full` | `boolean` | `false` | 全宽 |
206
- | `borderless` | `boolean` | `false` | 无边框 |
207
- | `autosize` | `boolean` | `false` | 自动调整高度 |
208
- | `minlength` | `number` | — | 最小长度校验 |
209
- | `maxlength` | `number` | — | 最大长度校验 |
210
- | `aria-label` | `string` | — | 无障碍标签 |
211
- | `aria-labelledby` | `string` | — | 无障碍标签引用 |
217
+ | 属性 | 类型 | 默认值 | 说明 |
218
+ | ----------------- | --------- | ------- | ---------------------------------- |
219
+ | `value` | `string` | `''` | 输入值 |
220
+ | `placeholder` | `string` | `''` | 占位文本 |
221
+ | `rows` | `number` | `3` | 显示行数 |
222
+ | `name` | `string` | `''` | 表单字段名 |
223
+ | `disabled` | `boolean` | `false` | 禁用状态 |
224
+ | `readonly` | `boolean` | `false` | 只读状态 |
225
+ | `required` | `boolean` | `false` | 必填校验 |
226
+ | `clearable` | `boolean` | `false` | 显示清除按钮 |
227
+ | `full` | `boolean` | `false` | 全宽 |
228
+ | `borderless` | `boolean` | `false` | 无边框 |
229
+ | `autosize` | `boolean` | `false` | 自动调整高度 |
230
+ | `max-height` | `number` | `0` | 自动高度上限(px),`0` 表示不限制 |
231
+ | `minlength` | `number` | — | 最小长度校验 |
232
+ | `maxlength` | `number` | — | 最大长度校验 |
233
+ | `aria-label` | `string` | — | 无障碍标签 |
234
+ | `aria-labelledby` | `string` | — | 无障碍标签引用 |
212
235
 
213
236
  **事件:** `input`, `change`, `focus`, `blur`
214
237
 
@@ -230,11 +253,12 @@ import '@greypan/web-ui/types/vue'
230
253
  | `placeholder` | `string` | `''` | 占位文本 |
231
254
  | `name` | `string` | `''` | 表单字段名 |
232
255
  | `disabled` | `boolean` | `false` | 禁用状态 |
256
+ | `readonly` | `boolean` | `false` | 只读状态 |
233
257
  | `required` | `boolean` | `false` | 必填校验 |
234
258
 
235
259
  **事件:** `input`, `change`
236
260
 
237
- ArrowUp/ArrowDown 键增减数值。
261
+ ArrowUp/ArrowDown 键增减数值。空输入或 `-` 在提交时被忽略,值保持在最后一个有效数字。
238
262
 
239
263
  #### `<web-ui-select>`
240
264
 
@@ -257,6 +281,32 @@ ArrowUp/ArrowDown 键增减数值。
257
281
 
258
282
  子 `<web-ui-option>` 通过 `option-register` / `option-unregister` 注册。支持 ArrowDown/ArrowUp/Enter/Escape 键盘导航。
259
283
 
284
+ #### `<web-ui-autocomplete>`
285
+
286
+ 可输入并过滤候选的单值选择器。
287
+
288
+ | 属性 | 类型 | 默认值 | 说明 |
289
+ | ------------------ | ---------------------------------- | ------------ | ------------------------------------------------------- |
290
+ | `value` | `string` | `''` | 当前输入文本(表单值) |
291
+ | `selected-value` | `string` | `''` | 输入文本精确匹配 label 的 option 的 value(派生,只读) |
292
+ | `placeholder` | `string` | `''` | 占位文本 |
293
+ | `filter` | `'none' \| 'prefix' \| 'contains'` | `'contains'` | 候选过滤模式(按 option label 匹配) |
294
+ | `name` | `string` | `''` | 表单字段名 |
295
+ | `disabled` | `boolean` | `false` | 禁用状态 |
296
+ | `readonly` | `boolean` | `false` | 只读状态(不可输入、不可展开下拉) |
297
+ | `required` | `boolean` | `false` | 必填校验 |
298
+ | `portal` | `boolean` | `false` | 在主题浮层容器中渲染 |
299
+ | `no-scroll-lock` | `boolean` | `false` | 打开时不锁定页面滚动 |
300
+ | `overlayContainer` | `HTMLElement \| () => HTMLElement` | — | 显式 Portal 容器 |
301
+ | `aria-label` | `string` | — | 无障碍名称 |
302
+ | `aria-labelledby` | `string` | — | 无障碍名称引用 |
303
+
304
+ **事件:** `input`, `change`, `focus`, `blur`, `open-change` (`CustomEvent<{ open: boolean }>`)
305
+
306
+ **插槽:** `default`(投影 `<web-ui-option>` 元素)
307
+
308
+ 键入时按 label 过滤候选(`contains` 或 `prefix`,`none` 关闭过滤)。选择 option 时文本回填为该项 label,`selected-value` 暴露该项的 value;`change` 在选择提交时触发。支持 ArrowDown/ArrowUp/Enter/Escape 键盘导航。
309
+
260
310
  #### `<web-ui-slider>`
261
311
 
262
312
  范围滑块,支持刻度标记和垂直方向。
@@ -391,19 +441,23 @@ ArrowUp/ArrowDown 键增减数值。
391
441
 
392
442
  样式化按钮,支持多种变体和加载状态。
393
443
 
394
- | 属性 | 类型 | 默认值 | 说明 |
395
- | ---------- | ------------------------------------------------------------ | --------- | ------------------------------ |
396
- | `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'danger' \| 'glass'` | `'glass'` | 按钮变体 |
397
- | `disabled` | `boolean` | `false` | 禁用状态 |
398
- | `loading` | `boolean` | `false` | 加载旋转动画 |
399
- | `full` | `boolean` | `false` | 全宽 |
400
- | `icon` | `boolean` | `false` | 纯图标模式 |
401
- | `size` | `string` | `''` | 尺寸格式 `高度` 或 `高度x宽度` |
444
+ | 属性 | 类型 | 默认值 | 说明 |
445
+ | ------------ | ------------------------------------------------------------ | ---------- | ----------------------------------- |
446
+ | `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'danger' \| 'glass'` | `'glass'` | 按钮变体 |
447
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | 内部按钮类型;非法值回退为 `button` |
448
+ | `disabled` | `boolean` | `false` | 禁用状态 |
449
+ | `loading` | `boolean` | `false` | 加载旋转动画 |
450
+ | `full` | `boolean` | `false` | 全宽 |
451
+ | `icon` | `boolean` | `false` | 纯图标模式 |
452
+ | `size` | `string` | `''` | 尺寸格式 `高度` 或 `高度x宽度` |
453
+ | `aria-label` | `string` | — | 无障碍标签(委托给内部按钮) |
402
454
 
403
455
  **事件:** 标准 `click`
404
456
 
405
457
  **插槽:** `prefix`, `default`, `suffix`
406
458
 
459
+ `submit` 和 `reset` 不会提交或重置组件 Shadow DOM 外祖先 `<form>`。如需外部表单行为,请使用 form-associated 控件。
460
+
407
461
  禁用和加载状态阻止 `click` 事件。
408
462
 
409
463
  #### `<web-ui-button-group>`
@@ -598,16 +652,16 @@ Hover 模式使用 `pointerenter`/`pointerleave` 加延迟控制。Click 模式
598
652
 
599
653
  徽标 / 通知计数。
600
654
 
601
- | 属性 | 类型 | 默认值 | 说明 |
602
- | ----------- | -------------------------------------------------------------- | ------------- | ---------------------- |
603
- | `count` | `number` | `0` | 显示数字 |
604
- | `max` | `number` | `99` | 最大值(超过显示 99+) |
605
- | `dot` | `boolean` | `false` | 点模式(不显示数字) |
606
- | `show-zero` | `boolean` | `false` | count 为 0 时也显示 |
607
- | `hidden` | `boolean` | `false` | 完全隐藏 |
608
- | `offset-x` | `number` | `0` | 水平偏移 |
609
- | `offset-y` | `number` | `0` | 垂直偏移 |
610
- | `placement` | `'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left'` | `'top-right'` | 徽标位置 |
655
+ | 属性 | 类型 | 默认值 | 说明 |
656
+ | -------------- | -------------------------------------------------------------- | ------------- | ---------------------- |
657
+ | `count` | `number` | `0` | 显示数字 |
658
+ | `max` | `number` | `99` | 最大值(超过显示 99+) |
659
+ | `dot` | `boolean` | `false` | 点模式(不显示数字) |
660
+ | `show-zero` | `boolean` | `false` | count 为 0 时也显示 |
661
+ | `badge-hidden` | `boolean` | `false` | 完全隐藏 |
662
+ | `offset-x` | `number` | `0` | 水平偏移 |
663
+ | `offset-y` | `number` | `0` | 垂直偏移 |
664
+ | `placement` | `'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left'` | `'top-right'` | 徽标位置 |
611
665
 
612
666
  #### `<web-ui-empty>`
613
667
 
package/README.md CHANGED
@@ -33,7 +33,7 @@ import '@greypan/web-ui'
33
33
 
34
34
  ### React
35
35
 
36
- Requires `@types/react >= 16` as optional peer dependency.
36
+ Requires `@types/react >= 19` as optional peer dependency.
37
37
 
38
38
  ```ts
39
39
  // vite.config.ts
@@ -56,7 +56,7 @@ function App() {
56
56
  <web-ui-button variant="primary" onClick={() => alert('clicked')}>
57
57
  Click
58
58
  </web-ui-button>
59
- <web-ui-input onInput={e => console.log((e.target as any).value)} />
59
+ <web-ui-input onInput={e => console.log(e.currentTarget.value)} />
60
60
  </>
61
61
  )
62
62
  }
@@ -65,9 +65,12 @@ function App() {
65
65
  #### React custom-element events and boolean properties
66
66
 
67
67
  React 19 registers Custom Element events using the suffix of the JSX `on` key unchanged. Event names are
68
- case-sensitive: bind `open-change` as `onopen-change`, not `onOpenChange`. Standard `input` and `change`
69
- events continue to use React's conventional `onInput` and `onChange`. Boolean properties follow native HTML
70
- semantics: absence is `false` and presence is `true`.
68
+ case-sensitive: bind `open-change` as `onopen-change`, not `onOpenChange`. Standard `input`, `change`, `focus`,
69
+ and `blur` events use React's conventional `onInput`, `onChange`, `onFocus`, and `onBlur` handlers — their
70
+ `currentTarget` is typed as the component instance, so `value` and `checked` are read cast-free. The `target`
71
+ follows React SyntheticEvent semantics (`EventTarget`) and is not narrowed. Kebab-case custom events carry their
72
+ `CustomEvent` detail typed. Boolean properties follow native HTML semantics: absence is `false` and presence is
73
+ `true`.
71
74
 
72
75
  ```tsx
73
76
  <web-ui-dialog
@@ -98,7 +101,7 @@ useEffect(() => {
98
101
 
99
102
  ### Vue
100
103
 
101
- Requires `vue >= 3` as optional peer dependency.
104
+ Requires `vue >= 3.5` as optional peer dependency.
102
105
 
103
106
  ```ts
104
107
  // vite.config.ts
@@ -122,9 +125,28 @@ import '@greypan/web-ui/types/vue'
122
125
  <template>
123
126
  <web-ui-button variant="primary" @click="handleClick">Click</web-ui-button>
124
127
  <web-ui-input v-model="value" />
128
+ <web-ui-select :value="framework" @change="framework = $event.target.value" />
125
129
  </template>
126
130
  ```
127
131
 
132
+ Vue events are typed cast-free: `@input`/`@change` on value-bearing components resolve to the component emit, so
133
+ `$event.target` is the component instance and `value`/`checked` are read directly. `$event.detail` keeps the
134
+ `CustomEvent` payload type for kebab-case events like `open-change`. Named handlers annotate with
135
+ `WebUiEvent<WebUiXxx, 'change'>`. `@click`/`@focus` and other native events not declared as emits remain
136
+ bindable on any `web-ui-*` element.
137
+
138
+ ### Attribute and event boundaries
139
+
140
+ `web-ui-*` elements are the public DOM boundary. `id`, `class`, `style`, global HTML attributes, and `data-*` stay on
141
+ the custom-element host; they are not copied into its Shadow DOM. Components expose native-element attributes only when
142
+ they document an explicit semantic mapping. For example, `web-ui-button` maps `type` to its inner button and accepts
143
+ only `button`, `submit`, or `reset` (invalid values become `button`).
144
+
145
+ ARIA attributes are explicit: use the component's documented naming attributes, not a blanket `aria-*` pass-through.
146
+ Components own their role and interaction state. Browser-native composed events such as `click`, `input`, and `change`
147
+ remain the primary interaction API. Kebab-case custom events such as `open-change` describe user-originated component
148
+ state changes; assigning a property programmatically does not emit them.
149
+
128
150
  ## All Components
129
151
 
130
152
  | Category | Component |
@@ -133,6 +155,7 @@ import '@greypan/web-ui/types/vue'
133
155
  | | [`<web-ui-textarea>`](#web-ui-textarea) |
134
156
  | | [`<web-ui-input-number>`](#web-ui-input-number) |
135
157
  | | [`<web-ui-select>`](#web-ui-select) |
158
+ | | [`<web-ui-autocomplete>`](#web-ui-autocomplete) |
136
159
  | | [`<web-ui-slider>`](#web-ui-slider) |
137
160
  | | [`<web-ui-checkbox>`](#web-ui-checkbox) |
138
161
  | | [`<web-ui-radio>`](#web-ui-radio) |
@@ -181,10 +204,12 @@ Text input with clearable, prefix/suffix slots.
181
204
  | `placeholder` | `string` | `''` | Placeholder text |
182
205
  | `name` | `string` | `''` | Form field name |
183
206
  | `disabled` | `boolean` | `false` | Disabled state |
207
+ | `readonly` | `boolean` | `false` | Read-only state |
184
208
  | `required` | `boolean` | `false` | Required validation |
185
209
  | `clearable` | `boolean` | `false` | Show clear button |
186
210
  | `full` | `boolean` | `false` | Full width |
187
211
  | `borderless` | `boolean` | `false` | No border |
212
+ | `aria-label` | `string` | — | Accessible label |
188
213
 
189
214
  **Events:** `input`, `change`, `focus`, `blur`
190
215
 
@@ -194,23 +219,24 @@ Text input with clearable, prefix/suffix slots.
194
219
 
195
220
  Multi-line text input with auto-resize.
196
221
 
197
- | Attribute | Type | Default | Description |
198
- | ----------------- | --------- | ------- | -------------------------- |
199
- | `value` | `string` | `''` | Textarea value |
200
- | `placeholder` | `string` | `''` | Placeholder text |
201
- | `rows` | `number` | `3` | Visible rows |
202
- | `name` | `string` | `''` | Form field name |
203
- | `disabled` | `boolean` | `false` | Disabled state |
204
- | `readonly` | `boolean` | `false` | Read-only state |
205
- | `required` | `boolean` | `false` | Required validation |
206
- | `clearable` | `boolean` | `false` | Show clear button |
207
- | `full` | `boolean` | `false` | Full width |
208
- | `borderless` | `boolean` | `false` | No border |
209
- | `autosize` | `boolean` | `false` | Auto-resize height |
210
- | `minlength` | `number` | — | Minimum length validation |
211
- | `maxlength` | `number` | — | Maximum length validation |
212
- | `aria-label` | `string` | — | Accessible label |
213
- | `aria-labelledby` | `string` | — | Accessible label reference |
222
+ | Attribute | Type | Default | Description |
223
+ | ----------------- | --------- | ------- | ----------------------------------------- |
224
+ | `value` | `string` | `''` | Textarea value |
225
+ | `placeholder` | `string` | `''` | Placeholder text |
226
+ | `rows` | `number` | `3` | Visible rows |
227
+ | `name` | `string` | `''` | Form field name |
228
+ | `disabled` | `boolean` | `false` | Disabled state |
229
+ | `readonly` | `boolean` | `false` | Read-only state |
230
+ | `required` | `boolean` | `false` | Required validation |
231
+ | `clearable` | `boolean` | `false` | Show clear button |
232
+ | `full` | `boolean` | `false` | Full width |
233
+ | `borderless` | `boolean` | `false` | No border |
234
+ | `autosize` | `boolean` | `false` | Auto-resize height |
235
+ | `max-height` | `number` | `0` | Autosize max height (px); `0` = unlimited |
236
+ | `minlength` | `number` | — | Minimum length validation |
237
+ | `maxlength` | `number` | — | Maximum length validation |
238
+ | `aria-label` | `string` | — | Accessible label |
239
+ | `aria-labelledby` | `string` | — | Accessible label reference |
214
240
 
215
241
  **Events:** `input`, `change`, `focus`, `blur`
216
242
 
@@ -232,11 +258,12 @@ Numeric input with step buttons and keyboard control.
232
258
  | `placeholder` | `string` | `''` | Placeholder text |
233
259
  | `name` | `string` | `''` | Form field name |
234
260
  | `disabled` | `boolean` | `false` | Disabled state |
261
+ | `readonly` | `boolean` | `false` | Read-only state |
235
262
  | `required` | `boolean` | `false` | Required validation |
236
263
 
237
264
  **Events:** `input`, `change`
238
265
 
239
- ArrowUp/ArrowDown keyboard increments and decrements the value.
266
+ ArrowUp/ArrowDown keyboard increments and decrements the value. Empty or `-` input is ignored on commit; the value stays at the last valid number.
240
267
 
241
268
  #### `<web-ui-select>`
242
269
 
@@ -261,6 +288,32 @@ Select dropdown with option items, keyboard navigation, and portal support.
261
288
 
262
289
  Child `<web-ui-option>` elements register via `option-register` / `option-unregister` events. Supports ArrowDown/ArrowUp/Enter/Escape keyboard navigation.
263
290
 
291
+ #### `<web-ui-autocomplete>`
292
+
293
+ Editable combobox with input filtering and single option selection.
294
+
295
+ | Attribute | Type | Default | Description |
296
+ | ------------------ | ---------------------------------- | ------------ | ------------------------------------------------------------------------- |
297
+ | `value` | `string` | `''` | Current input text (form value) |
298
+ | `selected-value` | `string` | `''` | Value of the option exactly matching the input label (derived, read-only) |
299
+ | `placeholder` | `string` | `''` | Placeholder text |
300
+ | `filter` | `'none' \| 'prefix' \| 'contains'` | `'contains'` | Candidate filtering mode (matched against option label) |
301
+ | `name` | `string` | `''` | Form field name |
302
+ | `disabled` | `boolean` | `false` | Disabled state |
303
+ | `readonly` | `boolean` | `false` | Read-only state (no typing, no dropdown) |
304
+ | `required` | `boolean` | `false` | Required validation |
305
+ | `portal` | `boolean` | `false` | Render dropdown in theme overlay |
306
+ | `no-scroll-lock` | `boolean` | `false` | Do not lock body scroll when open |
307
+ | `overlayContainer` | `HTMLElement \| () => HTMLElement` | — | Explicit portal container |
308
+ | `aria-label` | `string` | — | Accessible name |
309
+ | `aria-labelledby` | `string` | — | Accessible name references |
310
+
311
+ **Events:** `input`, `change`, `focus`, `blur`, `open-change` (`CustomEvent<{ open: boolean }>`)
312
+
313
+ **Slots:** `default` (project `<web-ui-option>` elements)
314
+
315
+ Typing filters the option list by label (`contains` or `prefix`, or `none` to disable filtering). Selecting an option fills the input with its label and exposes the option's value via `selected-value`; `change` fires on selection commit. Supports ArrowDown/ArrowUp/Enter/Escape keyboard navigation.
316
+
264
317
  #### `<web-ui-slider>`
265
318
 
266
319
  Range slider with marks and vertical orientation.
@@ -397,19 +450,24 @@ Radio group managing single selection.
397
450
 
398
451
  Styled button with variants and loading state.
399
452
 
400
- | Attribute | Type | Default | Description |
401
- | ---------- | ------------------------------------------------------------ | --------- | -------------------------------------- |
402
- | `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'danger' \| 'glass'` | `'glass'` | Button variant |
403
- | `disabled` | `boolean` | `false` | Disabled state |
404
- | `loading` | `boolean` | `false` | Loading spinner |
405
- | `full` | `boolean` | `false` | Full width |
406
- | `icon` | `boolean` | `false` | Icon-only mode |
407
- | `size` | `string` | `''` | Size format `height` or `heightxwidth` |
453
+ | Attribute | Type | Default | Description |
454
+ | ------------ | ------------------------------------------------------------ | ---------- | ------------------------------------------------- |
455
+ | `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'danger' \| 'glass'` | `'glass'` | Button variant |
456
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | Inner-button type; invalid values become `button` |
457
+ | `disabled` | `boolean` | `false` | Disabled state |
458
+ | `loading` | `boolean` | `false` | Loading spinner |
459
+ | `full` | `boolean` | `false` | Full width |
460
+ | `icon` | `boolean` | `false` | Icon-only mode |
461
+ | `size` | `string` | `''` | Size format `height` or `heightxwidth` |
462
+ | `aria-label` | `string` | — | Accessible label (delegated to inner button) |
408
463
 
409
464
  **Events:** standard `click`
410
465
 
411
466
  **Slots:** `prefix`, `default`, `suffix`
412
467
 
468
+ `submit` and `reset` do not submit or reset an ancestor form outside the component's Shadow DOM. Use a
469
+ form-associated control when external form submission behavior is required.
470
+
413
471
  Disabled and loading states prevent `click` events.
414
472
 
415
473
  #### `<web-ui-button-group>`
@@ -604,16 +662,16 @@ Avatar display with image fallback.
604
662
 
605
663
  Badge / notification count.
606
664
 
607
- | Attribute | Type | Default | Description |
608
- | ----------- | -------------------------------------------------------------- | ------------- | ------------------------- |
609
- | `count` | `number` | `0` | Display count |
610
- | `max` | `number` | `99` | Maximum count (shows 99+) |
611
- | `dot` | `boolean` | `false` | Dot mode (no count) |
612
- | `show-zero` | `boolean` | `false` | Show when count is 0 |
613
- | `hidden` | `boolean` | `false` | Hide completely |
614
- | `offset-x` | `number` | `0` | Horizontal offset |
615
- | `offset-y` | `number` | `0` | Vertical offset |
616
- | `placement` | `'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left'` | `'top-right'` | Badge position |
665
+ | Attribute | Type | Default | Description |
666
+ | -------------- | -------------------------------------------------------------- | ------------- | ------------------------- |
667
+ | `count` | `number` | `0` | Display count |
668
+ | `max` | `number` | `99` | Maximum count (shows 99+) |
669
+ | `dot` | `boolean` | `false` | Dot mode (no count) |
670
+ | `show-zero` | `boolean` | `false` | Show when count is 0 |
671
+ | `badge-hidden` | `boolean` | `false` | Hide completely |
672
+ | `offset-x` | `number` | `0` | Horizontal offset |
673
+ | `offset-y` | `number` | `0` | Vertical offset |
674
+ | `placement` | `'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left'` | `'top-right'` | Badge position |
617
675
 
618
676
  #### `<web-ui-empty>`
619
677
 
@@ -1 +1 @@
1
- {"version":3,"file":"glass.js","names":[],"sources":["../../src/assets/glass.css?inline"],"sourcesContent":["/*\n * 玻璃公共样式\n */\n\n.wui-glass {\n position: relative;\n border: 0.5px double var(--wui-color-glass-border, rgb(51 51 51 / 0.08));\n backdrop-filter: blur(2px);\n box-shadow:\n inset -1px -1px 0.5px -0.5px var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)),\n inset 1px 1px 0.5px -0.5px var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)),\n inset -3px -3px 0.5px -3px\n color-mix(in srgb, var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)) 60%, transparent),\n inset 3px 3px 0.5px -3px\n color-mix(in srgb, var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)) 60%, transparent),\n inset 0 0 1px rgb(0 0 0 / 0.8),\n var(--wui-glass-shadow, var(--wui-shadow-glass, 0 2px 16px rgb(0 0 0 / 0.06)));\n}\n"],"mappings":""}
1
+ {"version":3,"file":"glass.js","names":[],"sources":["../../src/assets/glass.css?inline"],"sourcesContent":["/*\n * 玻璃公共样式\n */\n\n.wui-glass {\n position: relative;\n\n border: 0.5px double var(--wui-color-glass-border, rgb(51 51 51 / 0.08));\n\n /* Safari 16.4 只支持带 -webkit- 前缀的 backdrop-filter(无前缀 18 才支持),\n lightningcss 对 ?inline 导入不做自动前缀,需手动写前缀版本 */\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-backdrop-filter: blur(2px);\n backdrop-filter: blur(2px);\n box-shadow:\n inset -1px -1px 0.5px -0.5px var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)),\n inset 1px 1px 0.5px -0.5px var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)),\n inset -3px -3px 0.5px -3px\n color-mix(in srgb, var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)) 60%, transparent),\n inset 3px 3px 0.5px -3px\n color-mix(in srgb, var(--wui-color-glass-highlight, rgb(255 255 255 / 0.9)) 60%, transparent),\n inset 0 0 1px rgb(0 0 0 / 0.8),\n var(--wui-glass-shadow, var(--wui-shadow-glass, 0 2px 16px rgb(0 0 0 / 0.06)));\n}\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  //#region src/assets/menu-portal.css?inline
2
- var e = ".wui-menu-portal-overlay{--wui-glass-shadow:var(--wui-shadow-pop,0 3px 9px #00000045);--wui-duration-overlay-enter:var(--wui-duration-menu-enter,.14s);--wui-duration-overlay-exit:var(--wui-duration-menu-exit,.1s);-webkit-user-select:none;user-select:none;z-index:var(--wui-layer-menu,100);box-sizing:border-box;min-width:200px;max-width:90vw;max-height:80vh;color:var(--wui-color-text,#1b1b1b);background-color:var(--wui-color-surface-overlay,#f6f6f6e0);border-radius:20px;position:fixed;overflow:hidden}.wui-menu-portal-overlay .wui-menu-scroll{max-height:80vh;overflow-y:auto}.wui-menu-portal-overlay .wui-menu-content{padding:4px}.wui-menu-portal-overlay.dropdown-overlay .wui-menu-scroll{max-height:320px}.wui-menu-portal-overlay.dropdown-overlay[data-level]:not([data-level=\"0\"]),.wui-menu-portal-overlay.context-submenu{z-index:var(--wui-layer-menu-submenu,110)}";
2
+ var e = ".wui-menu-portal-overlay{--wui-glass-shadow:var(--wui-shadow-pop,0 3px 9px #00000045);--wui-duration-overlay-enter:var(--wui-duration-menu-enter,.14s);--wui-duration-overlay-exit:var(--wui-duration-menu-exit,.1s);--wui-overlay-min-width:200px;-webkit-user-select:none;user-select:none;z-index:var(--wui-layer-menu,100);box-sizing:border-box;min-width:var(--wui-overlay-min-width,120px);max-width:90vw;max-height:80vh;color:var(--wui-color-text,#1b1b1b);background-color:var(--wui-color-surface-overlay,#f6f6f6e0);border-radius:20px;position:fixed;overflow:hidden}.wui-menu-portal-overlay .wui-menu-scroll{max-height:80vh;overflow-y:auto}.wui-menu-portal-overlay .wui-menu-content{padding:4px}.wui-menu-portal-overlay.dropdown-overlay .wui-menu-scroll{max-height:320px}.wui-menu-portal-overlay.dropdown-overlay[data-level]:not([data-level=\"0\"]),.wui-menu-portal-overlay.context-submenu{z-index:var(--wui-layer-menu-submenu,110)}";
3
3
  //#endregion
4
4
  export { e as default };
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"menu-portal.js","names":[],"sources":["../../src/assets/menu-portal.css?inline"],"sourcesContent":[".wui-menu-portal-overlay {\n --wui-glass-shadow: var(--wui-shadow-pop, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-duration-overlay-enter: var(--wui-duration-menu-enter, 140ms);\n --wui-duration-overlay-exit: var(--wui-duration-menu-exit, 100ms);\n user-select: none;\n\n position: fixed;\n z-index: var(--wui-layer-menu, 100);\n\n overflow: hidden;\n\n box-sizing: border-box;\n min-width: 200px;\n max-width: 90vw;\n max-height: 80vh;\n border-radius: 20px;\n\n color: var(--wui-color-text, #1b1b1b);\n\n background-color: var(--wui-color-surface-overlay, rgb(246 246 246 / 0.88));\n\n & .wui-menu-scroll {\n overflow-y: auto;\n max-height: 80vh;\n }\n\n & .wui-menu-content {\n padding: 4px;\n }\n\n &.dropdown-overlay {\n & .wui-menu-scroll {\n max-height: 320px;\n }\n\n &[data-level]:not([data-level='0']) {\n z-index: var(--wui-layer-menu-submenu, 110);\n }\n }\n\n &.context-submenu {\n z-index: var(--wui-layer-menu-submenu, 110);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"menu-portal.js","names":[],"sources":["../../src/assets/menu-portal.css?inline"],"sourcesContent":[".wui-menu-portal-overlay {\n --wui-glass-shadow: var(--wui-shadow-pop, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-duration-overlay-enter: var(--wui-duration-menu-enter, 140ms);\n --wui-duration-overlay-exit: var(--wui-duration-menu-exit, 100ms);\n --wui-overlay-min-width: 200px;\n user-select: none;\n\n position: fixed;\n z-index: var(--wui-layer-menu, 100);\n\n overflow: hidden;\n\n box-sizing: border-box;\n min-width: var(--wui-overlay-min-width, 120px);\n max-width: 90vw;\n max-height: 80vh;\n border-radius: 20px;\n\n color: var(--wui-color-text, #1b1b1b);\n\n background-color: var(--wui-color-surface-overlay, rgb(246 246 246 / 0.88));\n\n & .wui-menu-scroll {\n overflow-y: auto;\n max-height: 80vh;\n }\n\n & .wui-menu-content {\n padding: 4px;\n }\n\n &.dropdown-overlay {\n & .wui-menu-scroll {\n max-height: 320px;\n }\n\n &[data-level]:not([data-level='0']) {\n z-index: var(--wui-layer-menu-submenu, 110);\n }\n }\n\n &.context-submenu {\n z-index: var(--wui-layer-menu-submenu, 110);\n }\n}\n"],"mappings":""}
@@ -0,0 +1,121 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import { OverlayContainer } from '../../shared/overlay/portal';
3
+ declare const FILTER_MODES: readonly ["none", "prefix", "contains"];
4
+ type FilterMode = (typeof FILTER_MODES)[number];
5
+ /**
6
+ * `web-ui-autocomplete`:可输入并过滤候选的单值选择器。
7
+ *
8
+ * 与 `web-ui-select` 共用 `<web-ui-option>` 子项注册协议与浮层能力,但触发区是
9
+ * 可编辑输入框:`value` 即当前输入文本(表单值),键入时按 `filter` 模式过滤候选,
10
+ * 选择 option 时文本回填为该项 label,`selected-value` 暴露该项的 value。
11
+ */
12
+ export declare class WebUiAutocomplete extends LitElement {
13
+ static styles: import('lit').CSSResult[];
14
+ static formAssociated: boolean;
15
+ private _internals?;
16
+ private _formDisabled;
17
+ placeholder: string;
18
+ disabled: boolean;
19
+ readonly: boolean;
20
+ required: boolean;
21
+ portal: boolean;
22
+ noScrollLock: boolean;
23
+ overlayContainer?: OverlayContainer;
24
+ name: string;
25
+ ariaLabel: string | null;
26
+ ariaLabelledby: string | undefined;
27
+ private _filter;
28
+ get filter(): FilterMode;
29
+ set filter(v: string);
30
+ private _value;
31
+ get value(): string;
32
+ set value(v: string);
33
+ private _selectedValue;
34
+ get selectedValue(): string;
35
+ private _setSelectedValue;
36
+ private get _isDisabled();
37
+ private _isOpen;
38
+ private _activeIndex;
39
+ private _focused;
40
+ private static _nextInstanceId;
41
+ private readonly _idPrefix;
42
+ private readonly _optionIds;
43
+ private readonly _a11yOptionIds;
44
+ private _nextOptionId;
45
+ private _nextA11yOptionId;
46
+ private _options;
47
+ private _portal?;
48
+ private _portalContent?;
49
+ private readonly _pendingUnregisteredOptions;
50
+ private readonly _scrollLock;
51
+ private readonly _panel;
52
+ get isOpen(): boolean;
53
+ get open(): boolean;
54
+ private _onClickOutside;
55
+ private _onFocusOut;
56
+ private _handlePanelPointerDown;
57
+ connectedCallback(): void;
58
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
59
+ disconnectedCallback(): void;
60
+ firstUpdated(): void;
61
+ private _queryOptions;
62
+ willUpdate(): void;
63
+ updated(changed: PropertyValues): void;
64
+ formResetCallback(): void;
65
+ formDisabledCallback(disabled: boolean): void;
66
+ formStateRestoreCallback(state: string | File | FormData | null): void;
67
+ private _syncValidity;
68
+ private _syncOpenAttribute;
69
+ private _syncSelectedValue;
70
+ private _syncOptionA11y;
71
+ private _ensureOptionIds;
72
+ private _getA11yOptionId;
73
+ private _applyFilter;
74
+ private _syncEmptyState;
75
+ private _bindOption;
76
+ private _unbindOption;
77
+ private _refreshOptions;
78
+ private _syncPortalContent;
79
+ private _scheduleOptionsRefresh;
80
+ private _onOptionRegister;
81
+ private _onOptionUnregister;
82
+ private _onSlotChange;
83
+ private _handleOptionClick;
84
+ private _onOptionUpdate;
85
+ private _handleOptionPointerOver;
86
+ private _handleOptionPointerDown;
87
+ private _onKeydown;
88
+ private _navigateActive;
89
+ private _setInitialActiveOption;
90
+ private _syncActiveOption;
91
+ private _selectOption;
92
+ private _onInput;
93
+ private _onInnerChange;
94
+ private _onFocus;
95
+ private _onBlur;
96
+ private _open;
97
+ private _close;
98
+ private _dispatchOpenChange;
99
+ private _openOverlay;
100
+ private _closeOverlay;
101
+ private _reconfigureOverlay;
102
+ private _syncScrollLock;
103
+ private _createPortal;
104
+ private _getLabelledbyText;
105
+ render(): import('lit').TemplateResult<1>;
106
+ readonly $events: {
107
+ input: Event;
108
+ change: Event;
109
+ focus: FocusEvent;
110
+ blur: FocusEvent;
111
+ 'open-change': CustomEvent<{
112
+ open: boolean;
113
+ }>;
114
+ };
115
+ }
116
+ declare global {
117
+ interface HTMLElementTagNameMap {
118
+ 'web-ui-autocomplete': WebUiAutocomplete;
119
+ }
120
+ }
121
+ export {};