@greypan/web-ui 10.0.0 → 10.1.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 (64) hide show
  1. package/README.CN.md +39 -1
  2. package/README.md +43 -1
  3. package/dist/components/autocomplete/index.js +62 -60
  4. package/dist/components/autocomplete/index.js.map +1 -1
  5. package/dist/components/avatar/index.js +5 -5
  6. package/dist/components/avatar/index.js.map +1 -1
  7. package/dist/components/back-top/index.js.map +1 -1
  8. package/dist/components/badge/index.js +5 -5
  9. package/dist/components/button/index.js +5 -5
  10. package/dist/components/button/index.js.map +1 -1
  11. package/dist/components/checkbox/index.js.map +1 -1
  12. package/dist/components/collapse/index.js +1 -1
  13. package/dist/components/collapse/index.js.map +1 -1
  14. package/dist/components/collapse/style.js +1 -1
  15. package/dist/components/collapse/style.js.map +1 -1
  16. package/dist/components/context-menu/index.d.ts +16 -0
  17. package/dist/components/context-menu/index.js +71 -66
  18. package/dist/components/context-menu/index.js.map +1 -1
  19. package/dist/components/dialog/index.js +39 -37
  20. package/dist/components/dialog/index.js.map +1 -1
  21. package/dist/components/drawer/index.js +64 -62
  22. package/dist/components/drawer/index.js.map +1 -1
  23. package/dist/components/dropdown-item/index.js.map +1 -1
  24. package/dist/components/editable-text/index.js +4 -4
  25. package/dist/components/empty/index.js.map +1 -1
  26. package/dist/components/empty/style.js +1 -1
  27. package/dist/components/empty/style.js.map +1 -1
  28. package/dist/components/image-preview/index.js.map +1 -1
  29. package/dist/components/input/index.js +5 -5
  30. package/dist/components/input/index.js.map +1 -1
  31. package/dist/components/input-number/index.js.map +1 -1
  32. package/dist/components/layout/index.js.map +1 -1
  33. package/dist/components/option/index.js.map +1 -1
  34. package/dist/components/segmented/index.js +17 -7
  35. package/dist/components/segmented/index.js.map +1 -1
  36. package/dist/components/select/index.js +45 -43
  37. package/dist/components/select/index.js.map +1 -1
  38. package/dist/components/switch/index.js.map +1 -1
  39. package/dist/components/textarea/index.js +8 -8
  40. package/dist/components/textarea/index.js.map +1 -1
  41. package/dist/components/toast/manager.js +1 -1
  42. package/dist/components/toast/manager.js.map +1 -1
  43. package/dist/components/toast/toast.js.map +1 -1
  44. package/dist/scrollbars/index.js.map +1 -1
  45. package/dist/scrollbars/internal.js +6 -0
  46. package/dist/scrollbars/internal.js.map +1 -0
  47. package/dist/scrollbars/style.css +1 -1
  48. package/dist/shared/menu-portal/menu-portal.js +16 -14
  49. package/dist/shared/menu-portal/menu-portal.js.map +1 -1
  50. package/dist/shared/overlay/overlay-root.js +13 -12
  51. package/dist/shared/overlay/overlay-root.js.map +1 -1
  52. package/dist/shared/overlay/overlay.js +33 -33
  53. package/dist/vite/index.d.ts +28 -0
  54. package/dist/vite/index.js +16 -0
  55. package/dist/vite/index.js.map +1 -0
  56. package/package.json +5 -1
  57. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -246
  58. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  59. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -324
  60. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  61. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -100
  62. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  63. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -102
  64. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
package/README.CN.md CHANGED
@@ -53,6 +53,41 @@ import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue' // 或 overla
53
53
  所以宿主自身的布局一旦承重(grid、居中盒子、`ul`/`ol`)就会坏。
54
54
  - OverlayScrollbars 只改变它被初始化到的那个元素,子元素保持原生滚动条。要覆盖文档滚动条就初始化
55
55
  `document.body`——在那里 `window.scrollY` / `window.scrollTo` 保持原生语义。
56
+ - 自带滚动容器的组件(`select`、`autocomplete`、dropdown / context-menu 面板、`dialog`、`drawer`、
57
+ `toast`)在各自的 shadow root 内给**组件内部**滚动条上主题。OverlayScrollbars 进不了 shadow
58
+ root——它的结构样式与主题类都是文档级选择器——所以组件改为在原生滚动条上读同一组继承的
59
+ `--wui-scrollbar-*` 颜色(`scrollbar-color` / `scrollbar-width`),并刻意不用 `::-webkit-scrollbar`:
60
+ 声明它会让引擎放弃平台的覆盖式滚动条、固定占一条布局宽度,而组件内部滚动条正是不能占宽度。
61
+ 导入本样式表,组件内部滚动条才会跟随外观,与整页滚动条同一机制。
62
+
63
+ ## Vite
64
+
65
+ `@greypan/web-ui/vite` 导出 `webUiOptimizeDeps`,即需要并进应用 `optimizeDeps.include` 的 web-ui 运行时
66
+ 依赖清单。
67
+
68
+ web-ui 的组件从自己的 dist 里带出 `lit`、`@lit/context`、`@floating-ui/dom`。这些包不在应用的
69
+ dependencies 里,Vite 从应用侧解析不到,写裸名会被静默跳过;扫描器直到请求模块时才发现它们,打印
70
+ `optimized dependencies changed. reloading`,那次模块加载随之失败,报 `Failed to fetch dynamically
71
+ imported module`。
72
+
73
+ 扫描器跟不进组件图时才需要这份清单,典型场景是路由或页面由虚拟模块加载,比如 file-based routing
74
+ (`vue-router/vite`)或 `import.meta.glob`。启动入口静态 import 到每个组件模块的应用,组件图本来就在启动
75
+ 扫描里,不必列出。
76
+
77
+ ```js
78
+ import { webUiOptimizeDeps } from '@greypan/web-ui/vite'
79
+
80
+ export default {
81
+ optimizeDeps: {
82
+ include: [...webUiOptimizeDeps]
83
+ }
84
+ }
85
+ ```
86
+
87
+ - 条目用 Vite 的 `<pkg> > <dep>` 解析写法,按 web-ui 的依赖树解析,而不是应用的。
88
+ - 直接引用这个导出,不要抄条目,它跟随 web-ui 的运行时依赖。
89
+ - 它只影响 dev 期的依赖预打包,构建不受影响。
90
+ - 改过带清单的配置后清一次 `node_modules/.vite` 再启动。热缓存会把缺失的条目一直藏到 CI,而 CI 没有缓存。
56
91
 
57
92
  ## 框架集成
58
93
 
@@ -656,7 +691,7 @@ Portal 面板创建时会镜像 host 上解析后的这些变量;更新 host
656
691
 
657
692
  根据 `value` 同步子 trigger 的 `checked` 状态。`disabled` 提供继承的有效禁用状态,不改写 trigger 自身的 `disabled` 属性。直接设 `value` 不派发事件。
658
693
 
659
- 按住当前选中项横向拖拽可滑动指示器,松手吸附到最近选项(快速抛掷按速度切换)。触摸面声明 `touch-action: none`,拖拽激活期间阻止 `touchmove` 默认滚动,避免 iOS Safari 中断手势。
694
+ 按住当前选中项横向拖拽可滑动指示器,松手吸附到最近选项(快速抛掷按速度切换)。trigger 宽度不等时,拖拽中的指示器取「离自身中心最近的那一项」的宽度——即预览松手会落到的那一项,而不是保持按下那一项的宽度。触摸面声明 `touch-action: none`,拖拽激活期间阻止 `touchmove` 默认滚动,避免 iOS Safari 中断手势。
660
695
 
661
696
  **按压态:** 轨道在所有状态下都是不透明实体面(`--wui-color-surface`,浅色即 page 同色、无 backdrop filter),1px 描边环与投影全程不变;转为玻璃的是指示器这一层。静止态指示器是 `--wui-color-surface-segmented` 实色底、玻璃输出全部关闭;按压/拖拽态获得 backdrop blur、随 80ms 过渡淡入的玻璃描边环与 1.5x 放大,底色全透明:指示器的 blur 采样面整个落在轨道之内,此前的玻璃轨道上全透明指示器在均匀深底与相邻轨道仅差 +0.5 阶,条纹底实测指示器内部灰度 std 1.89(背景渗透);轨道实体化后同一采样 std 归零,按压态本体的可感知性由实色轨道与放大/环/投影共同承担,不再需要 tint 打底或压制轨道边缘装饰。底色不淡入——按下第一帧即落定;松开时指示器经 `--wui-duration-press` 淡回实色灰底。
662
697
 
@@ -1058,6 +1093,9 @@ await preview.closed
1058
1093
  | `--wui-collapse-peek-edge-max` | `112px` | 长度上限,避免大 `peek` 算出过长的虚化带 |
1059
1094
  | `--wui-collapse-peek-edge` | — | 显式指定长度,优先于推导值 |
1060
1095
  | `--wui-collapse-peek-edge-color` | `transparent` | 渐变末端颜色(需带 alpha,mask 按 alpha 解析) |
1096
+ | `--wui-collapse-peek-edge-blur` | `4px` | 同一条渐变带上背景模糊的半径 |
1097
+
1098
+ 渐变带由两层组成,配对方式与 layout header 的晕染一致:上面那条 alpha 渐隐之外,同一条带上再叠一层真实的 `backdrop-filter` 模糊,被裁掉的内容因此是被**糊掉**的,而不只是被调成半透明。模糊强度由本盒自己的 `mask-image` 调制——从带子起点为 0 升到后半段满强度、再在裁剪边缘前回到 0:起点不为 0 会在「突然开始模糊」处留一条接缝,末端不为 0 则会一路糊到裁剪边界。展开态活动长度为 0,各色标塌缩到 100% 而末位色标是全透明,于是这一层什么都不画。
1061
1099
 
1062
1100
  比例设为 `0` 即关闭渐隐。推导是纯 CSS 的 `calc(peek * ratio)`:`peek` 用 rem 时渐变长度自动跟随根字号缩放,JS 侧不需要做任何单位解析。已知限制:`peek` 取百分比时推导结果不是长度、无法被注册属性插值,会静默回落为「无渐隐」,此时请用 `--wui-collapse-peek-edge` 显式指定长度。
1063
1101
 
package/README.md CHANGED
@@ -55,6 +55,45 @@ import { OverlayScrollbarsComponent } from 'overlayscrollbars-react' // or overl
55
55
  - OverlayScrollbars only changes the element it is initialized on; children keep their native scrollbars. To cover
56
56
  the document scroller, initialize `document.body` — `window.scrollY` / `window.scrollTo` keep their native
57
57
  semantics there.
58
+ - Components that own a scroll container (`select`, `autocomplete`, the dropdown / context-menu panels,
59
+ `dialog`, `drawer`, `toast`) theme that container's **internal** scrollbar inside their own shadow root.
60
+ OverlayScrollbars cannot reach a shadow root — its structural styles and theme classes are document-level
61
+ selectors — so the components read the same inherited `--wui-scrollbar-*` colours through `scrollbar-color`
62
+ / `scrollbar-width` on the native scrollbar instead. `::-webkit-scrollbar` is deliberately not used: styling
63
+ it opts out of the platform's overlay scrollbar and reserves a layout gutter, which these scrollbars must
64
+ not do. Import this stylesheet for the internal scrollbars to follow the appearance, just like the
65
+ page-level ones.
66
+
67
+ ## Vite
68
+
69
+ `@greypan/web-ui/vite` exports `webUiOptimizeDeps`, the list of web-ui runtime dependencies an app has to merge
70
+ into `optimizeDeps.include`.
71
+
72
+ web-ui components pull `lit`, `@lit/context` and `@floating-ui/dom` out of web-ui's own dist. Those packages are
73
+ not in the app's dependencies, so Vite cannot resolve them from the app, and a bare name is skipped in silence.
74
+ The scanner then finds them mid-request, prints `optimized dependencies changed. reloading`, and that module load
75
+ fails with `Failed to fetch dynamically imported module`.
76
+
77
+ The list is needed when the scanner cannot follow the component graph: routes or pages loaded through a virtual
78
+ module, such as file-based routing (`vue-router/vite`) or `import.meta.glob`. An app whose entry statically
79
+ imports every component module already pulls the graph into the startup scan and does not need it.
80
+
81
+ ```js
82
+ import { webUiOptimizeDeps } from '@greypan/web-ui/vite'
83
+
84
+ export default {
85
+ optimizeDeps: {
86
+ include: [...webUiOptimizeDeps]
87
+ }
88
+ }
89
+ ```
90
+
91
+ - The entries use Vite's `<pkg> > <dep>` resolution form, so they resolve through web-ui's dependency tree
92
+ rather than the app's.
93
+ - Reference the export instead of copying entries. It tracks web-ui's runtime dependencies.
94
+ - It only affects dev-time pre-bundling. Builds are unaffected.
95
+ - After changing a config that carries the list, remove `node_modules/.vite` once and restart. A warm cache
96
+ hides a missing entry until CI, which has no cache.
58
97
 
59
98
  ## Framework Setup
60
99
 
@@ -692,7 +731,7 @@ Form-associated: integrates with native `<form>` via `ElementInternals`.
692
731
 
693
732
  Manages child trigger `checked` state based on `value`. `disabled` supplies inherited effective disabled state without changing a trigger's own `disabled` property. Setting `value` directly does not dispatch `input`/`change`.
694
733
 
695
- Press the selected segment and drag horizontally to slide the indicator; on release it snaps to the nearest option (a fast flick switches by velocity). Touch surfaces declare `touch-action: none` and suppress `touchmove` defaulting during an active drag, so iOS Safari does not interrupt the gesture.
734
+ Press the selected segment and drag horizontally to slide the indicator; on release it snaps to the nearest option (a fast flick switches by velocity). While dragging with triggers of unequal width, the indicator takes the width of the option its center is nearest to, so it previews the option it will snap to instead of keeping the pressed segment's width. Touch surfaces declare `touch-action: none` and suppress `touchmove` defaulting during an active drag, so iOS Safari does not interrupt the gesture.
696
735
 
697
736
  **Pressed state:** the track is an opaque surface (`--wui-color-surface`, page-colored in light appearance) with no backdrop filter in every state. Its 1px ring and drop shadow never change. The indicator is the layer that turns to glass. At rest it is a solid `--wui-color-surface-segmented` surface with all glass output off. While pressed or dragging it gains backdrop blur, the glass ring fading in over 80ms, and a 1.5x scale over a fully transparent background: the indicator samples its blur entirely from inside the track, and against the previous glass track a fully transparent indicator measured only +0.5 gray levels on a uniform dark backdrop while striped backdrops showed through the sample (std 1.89 gray levels inside the indicator). The opaque track makes that sample uniform (std 0), which is what gives the pressed thumb a perceptible body. No tint and no edge-decoration suppression are needed. The background never fades in. It lands on the first pressed frame. And on release the indicator eases back to the solid gray rest surface over `--wui-duration-press`.
698
737
 
@@ -1097,6 +1136,9 @@ The initial `open` attribute settles instantly without playing the animation. Ne
1097
1136
  | `--wui-collapse-peek-edge-max` | `112px` | Upper bound, so a large `peek` cannot produce an oversized fade band |
1098
1137
  | `--wui-collapse-peek-edge` | — | Explicit fade length; wins over the derived value |
1099
1138
  | `--wui-collapse-peek-edge-color` | `transparent` | Fade-stop color (must carry alpha - `mask-image` reads alpha channel) |
1139
+ | `--wui-collapse-peek-edge-blur` | `4px` | Blur radius of the frost layer over the same band |
1140
+
1141
+ The band carries two layers, the same pairing the layout header's glow uses: the alpha fade above, plus a real `backdrop-filter` blur over the same band, so the clipped content is blurred out rather than merely made translucent. The blur is modulated by the band's own `mask-image`, ramping from 0 at the band's start to full in its second half and back to 0 at the cut edge - a non-zero start would draw a visible seam where the blur abruptly begins, and a non-zero end would blur right up to the clip boundary. When `open`, the band length is `0`, every mask stop collapses onto 100% and the last stop is fully transparent, so the layer paints nothing.
1100
1142
 
1101
1143
  Set the ratio to `0` to turn the fade off. The derivation is pure CSS `calc(peek * ratio)`, so a `rem`-based `peek` scales the fade with the root font size and nothing has to be measured in JS. Known limitation: a percentage `peek` does not derive to a length, so the fade silently falls back to "none". Set `--wui-collapse-peek-edge` explicitly in that case.
1102
1144
 
@@ -4,32 +4,33 @@ import { FormAssociated as n, FormAssociationController as r, defineFormAssociat
4
4
  import { normalizeLiteral as a } from "../../shared/normalize/index.js";
5
5
  import "../input/index.js";
6
6
  import o from "../../assets/overlay-motion.js";
7
- import { dispatchOpenChangeEvent as s } from "../../shared/open-state/index.js";
8
- import { createComboboxOpenController as c, createOptionListenerBinding as l, defineComboboxTrigger as u, handleComboboxFocusOut as d, nextWrappingIndex as f } from "../../shared/option-portal/combobox-shell.js";
9
- import { defineOptionPortal as p } from "../../shared/option-portal/index.js";
10
- import { defineAnchoredPanel as m } from "../../shared/overlay/anchored-panel.js";
11
- import { defineOpenOverlay as h } from "../../shared/overlay/open-overlay.js";
12
- import { applyOverlayVariables as g, defineOverlayPortal as _ } from "../../shared/overlay/portal.js";
13
- import { defineScrollLockLease as v } from "../../shared/scroll-lock/scroll-lock.js";
14
- import y from "./style.js";
15
- import { LitElement as b, html as x, nothing as S, unsafeCSS as C } from "lit";
16
- import { customElement as w, property as T, state as E } from "lit/decorators.js";
17
- import { ifDefined as D } from "lit/directives/if-defined.js";
7
+ import s from "../../scrollbars/internal.js";
8
+ import { dispatchOpenChangeEvent as c } from "../../shared/open-state/index.js";
9
+ import { createComboboxOpenController as l, createOptionListenerBinding as u, defineComboboxTrigger as d, handleComboboxFocusOut as f, nextWrappingIndex as p } from "../../shared/option-portal/combobox-shell.js";
10
+ import { defineOptionPortal as m } from "../../shared/option-portal/index.js";
11
+ import { defineAnchoredPanel as h } from "../../shared/overlay/anchored-panel.js";
12
+ import { defineOpenOverlay as g } from "../../shared/overlay/open-overlay.js";
13
+ import { applyOverlayVariables as _, defineOverlayPortal as v } from "../../shared/overlay/portal.js";
14
+ import { defineScrollLockLease as y } from "../../shared/scroll-lock/scroll-lock.js";
15
+ import b from "./style.js";
16
+ import { LitElement as x, html as S, nothing as C, unsafeCSS as w } from "lit";
17
+ import { customElement as T, property as E, state as D } from "lit/decorators.js";
18
+ import { ifDefined as O } from "lit/directives/if-defined.js";
18
19
  //#region src/components/autocomplete/index.ts
19
- var O, k = [
20
+ var k, A = [
20
21
  "none",
21
22
  "prefix",
22
23
  "contains"
23
24
  ];
24
- function A(e) {
25
+ function j(e) {
25
26
  return e instanceof Element && e.slot === "trigger";
26
27
  }
27
- function j(e) {
28
+ function M(e) {
28
29
  return e instanceof Element && e.slot === "empty";
29
30
  }
30
- var M = class extends n(b) {
31
+ var N = class extends n(x) {
31
32
  static {
32
- O = this;
33
+ k = this;
33
34
  }
34
35
  constructor(...e) {
35
36
  super(...e), this.placeholder = "", this.borderless = !1, this.disabled = !1, this.readonly = !1, this.required = !1, this.portal = !1, this.noScrollLock = !1, this.allowCustomValue = !1, this.name = "", this.ariaLabel = null, this._filter = "contains", this._value = "", this._selectedValue = "", this._formAssociation = i({
@@ -48,18 +49,18 @@ var M = class extends n(b) {
48
49
  typeof e == "string" && (this.value = e);
49
50
  },
50
51
  syncValidity: () => this._syncValidity()
51
- }).make(), this._formAssociationController = new r(this, this._formAssociation), this._isOpen = !1, this._activeIndex = -1, this._focused = !1, this._hasTriggerSlot = !1, this._idPrefix = `web-ui-autocomplete-${++O._nextInstanceId}`, this._a11yOptionIds = /* @__PURE__ */ new WeakMap(), this._nextA11yOptionId = 0, this._options = [], this._scrollLock = v().make(), this._optionPortal = p().make({
52
+ }).make(), this._formAssociationController = new r(this, this._formAssociation), this._isOpen = !1, this._activeIndex = -1, this._focused = !1, this._hasTriggerSlot = !1, this._idPrefix = `web-ui-autocomplete-${++k._nextInstanceId}`, this._a11yOptionIds = /* @__PURE__ */ new WeakMap(), this._nextA11yOptionId = 0, this._options = [], this._scrollLock = y().make(), this._optionPortal = m().make({
52
53
  element: this,
53
54
  idPrefix: `${this._idPrefix}-option`,
54
55
  getPortal: () => this._portal,
55
56
  getPortalContent: () => this._portalContent,
56
57
  isOpen: () => this.portal && this._isOpen,
57
- getMigratableNodes: () => Array.from(this.childNodes).filter((e) => !A(e) && !j(e)),
58
+ getMigratableNodes: () => Array.from(this.childNodes).filter((e) => !j(e) && !M(e)),
58
59
  hasUpdated: () => this.hasUpdated,
59
60
  requestUpdate: () => this.requestUpdate(),
60
61
  bindOption: (e) => this._bindOption(e),
61
62
  unbindOption: (e) => this._unbindOption(e)
62
- }), this._trigger = u().make({
63
+ }), this._trigger = d().make({
63
64
  getWrapper: () => this.shadowRoot?.querySelector(".autocomplete-trigger") ?? null,
64
65
  getCustomTrigger: () => {
65
66
  let e = this.shadowRoot?.querySelector("slot[name=\"trigger\"]")?.assignedElements()[0];
@@ -70,10 +71,10 @@ var M = class extends n(b) {
70
71
  onClick: () => this._onTriggerClick(),
71
72
  onFocusIn: (e) => this._onTriggerFocusIn(e),
72
73
  onFocusOut: (e) => this._onTriggerFocusOut(e)
73
- }), this._overlay = h().make({
74
+ }), this._overlay = g().make({
74
75
  requestClose: () => this._close(),
75
76
  isConnected: () => this.isConnected
76
- }), this._panel = m().make({
77
+ }), this._panel = h().make({
77
78
  getAnchor: () => this._trigger.getTrigger() ?? this.shadowRoot?.querySelector(".autocomplete-trigger") ?? null,
78
79
  getLocalPanel: () => this.shadowRoot?.querySelector(".autocomplete-overlay") ?? null,
79
80
  getPositioning: () => ({
@@ -88,12 +89,12 @@ var M = class extends n(b) {
88
89
  }), this._onClickOutside = (e) => {
89
90
  this._isOpen && (e.composedPath().includes(this) || this._panel.getHandle()?.containsEvent(e) || this._close());
90
91
  }, this._onFocusOut = () => {
91
- d(this, () => this._panel.getHandle(), () => this._isOpen, () => this._close());
92
+ f(this, () => this._panel.getHandle(), () => this._isOpen, () => this._close());
92
93
  }, this._handlePanelPointerDown = (e) => {
93
94
  e.preventDefault();
94
95
  }, this._onTriggerSlotChange = () => {
95
96
  this._syncTriggerSlot();
96
- }, this._optionListeners = l({
97
+ }, this._optionListeners = u({
97
98
  onClick: (e) => this._handleOptionClick(e),
98
99
  onPointerOver: (e) => this._handleOptionPointerOver(e),
99
100
  onPointerDown: (e) => this._handleOptionPointerDown(e),
@@ -151,7 +152,7 @@ var M = class extends n(b) {
151
152
  composed: !0,
152
153
  relatedTarget: e.relatedTarget
153
154
  }));
154
- }, this._openController = c({
155
+ }, this._openController = l({
155
156
  canOpen: () => !this._isDisabled && !this.readonly,
156
157
  getIsOpen: () => this._isOpen,
157
158
  setIsOpen: (e) => {
@@ -175,9 +176,10 @@ var M = class extends n(b) {
175
176
  }
176
177
  static {
177
178
  this.styles = [
178
- C(t),
179
- C(o),
180
- C(y)
179
+ w(t),
180
+ w(o),
181
+ w(s),
182
+ w(b)
181
183
  ];
182
184
  }
183
185
  get filter() {
@@ -185,7 +187,7 @@ var M = class extends n(b) {
185
187
  }
186
188
  set filter(e) {
187
189
  let t = this._filter;
188
- this._filter = a(e, k, "contains"), this.requestUpdate("filter", t);
190
+ this._filter = a(e, A, "contains"), this.requestUpdate("filter", t);
189
191
  }
190
192
  get value() {
191
193
  return this._value;
@@ -223,7 +225,7 @@ var M = class extends n(b) {
223
225
  super.connectedCallback(), this._optionPortal.bindHost(), this._trigger.bind(), this.addEventListener("keydown", this._onKeydown), this.addEventListener("focusout", this._onFocusOut), document.addEventListener("click", this._onClickOutside);
224
226
  }
225
227
  _syncTriggerSlot() {
226
- let e = Array.from(this.children).some(A);
228
+ let e = Array.from(this.children).some(j);
227
229
  this._hasTriggerSlot !== e && (this._hasTriggerSlot = e, this.hasUpdated && this._reconfigureOverlay());
228
230
  }
229
231
  attributeChangedCallback(e, t, n) {
@@ -294,7 +296,7 @@ var M = class extends n(b) {
294
296
  let t = this._options.filter((e) => !e.disabled && !e.hasAttribute("data-filtered"));
295
297
  if (!t.length) return;
296
298
  let n = this._activeIndex >= 0 ? t.indexOf(this._options[this._activeIndex]) : e > 0 ? -1 : 0;
297
- this._activeIndex = this._options.indexOf(t[f(t.length, n, e)]), this._syncActiveOption();
299
+ this._activeIndex = this._options.indexOf(t[p(t.length, n, e)]), this._syncActiveOption();
298
300
  }
299
301
  _setInitialActiveOption() {
300
302
  let e = this._options.findIndex((e) => !e.disabled && !e.hasAttribute("data-filtered"));
@@ -347,7 +349,7 @@ var M = class extends n(b) {
347
349
  this._openController.close();
348
350
  }
349
351
  _dispatchOpenChange() {
350
- s(this, this._isOpen);
352
+ c(this, this._isOpen);
351
353
  }
352
354
  _openOverlay(e = !1) {
353
355
  this._panel.open(e), this._syncOverlayInert();
@@ -362,25 +364,25 @@ var M = class extends n(b) {
362
364
  this._scrollLock.sync(e && !this.noScrollLock);
363
365
  }
364
366
  _createPortal() {
365
- let e = _().make({
367
+ let e = v().make({
366
368
  container: this.overlayContainer,
367
369
  target: this,
368
- style: `${t}\n${o}\n${y}`,
370
+ style: `${t}\n${o}\n${b}`,
369
371
  className: "wui-glass autocomplete-overlay portal wui-floating-panel",
370
372
  onContentChange: () => {
371
373
  this._optionPortal.scheduleRefresh();
372
374
  }
373
375
  });
374
- this._portal = e, g(e.panel, this, [
376
+ this._portal = e, _(e.panel, this, [
375
377
  "--wui-overlay-min-width",
376
378
  "--wui-autocomplete-max-width",
377
379
  "--wui-autocomplete-max-height"
378
380
  ]), e.panel.setAttribute("aria-hidden", "true"), e.panel.addEventListener("pointerdown", this._handlePanelPointerDown);
379
381
  let n = document.createElement("div");
380
- n.className = "autocomplete-scroll";
382
+ n.className = "autocomplete-scroll wui-scroll";
381
383
  let r = document.createElement("div");
382
384
  r.className = "autocomplete-content", this._portalContent = r, n.append(r), e.panel.append(n);
383
- for (let t of Array.from(this.childNodes)) t instanceof Comment || A(t) || j(t) || e.appendContent([t], r);
385
+ for (let t of Array.from(this.childNodes)) t instanceof Comment || j(t) || M(t) || e.appendContent([t], r);
384
386
  return e;
385
387
  }
386
388
  _getLabelledbyText() {
@@ -392,10 +394,10 @@ var M = class extends n(b) {
392
394
  }).filter(Boolean).join(" ") : "";
393
395
  }
394
396
  render() {
395
- let e = `${this._idPrefix}-listbox`, t = `${this._idPrefix}-label`, n = this._getLabelledbyText(), r = this._options.filter((e) => !e.hasAttribute("data-filtered")), i = this._isOpen && this._activeIndex >= 0 ? this._options[this._activeIndex] : void 0, a = i ? this._getA11yOptionId(i) : S;
396
- return x`
397
+ let e = `${this._idPrefix}-listbox`, t = `${this._idPrefix}-label`, n = this._getLabelledbyText(), r = this._options.filter((e) => !e.hasAttribute("data-filtered")), i = this._isOpen && this._activeIndex >= 0 ? this._options[this._activeIndex] : void 0, a = i ? this._getA11yOptionId(i) : C;
398
+ return S`
397
399
  <div class="wui-autocomplete-inner">
398
- ${n ? x`<span class="autocomplete-a11y-only" id=${t}>${n}</span>` : S}
400
+ ${n ? S`<span class="autocomplete-a11y-only" id=${t}>${n}</span>` : C}
399
401
  <div
400
402
  class="autocomplete-trigger"
401
403
  ?data-custom-trigger=${this._hasTriggerSlot}
@@ -405,14 +407,14 @@ var M = class extends n(b) {
405
407
  aria-autocomplete="list"
406
408
  aria-controls=${e}
407
409
  aria-disabled=${String(this._isDisabled)}
408
- aria-readonly=${this.readonly ? "true" : S}
409
- aria-label=${D(this.ariaLabel)}
410
- aria-labelledby=${n ? t : S}
410
+ aria-readonly=${this.readonly ? "true" : C}
411
+ aria-label=${O(this.ariaLabel)}
412
+ aria-labelledby=${n ? t : C}
411
413
  aria-activedescendant=${a}
412
414
  tabindex="-1"
413
415
  >
414
416
  <slot name="trigger" @slotchange=${this._onTriggerSlotChange}></slot>
415
- ${this._hasTriggerSlot ? S : x`<web-ui-input
417
+ ${this._hasTriggerSlot ? C : S`<web-ui-input
416
418
  class="autocomplete-input"
417
419
  .value=${this._value}
418
420
  placeholder=${this.placeholder}
@@ -421,7 +423,7 @@ var M = class extends n(b) {
421
423
  ?disabled=${this._isDisabled}
422
424
  ?readonly=${this.readonly}
423
425
  ?required=${this.required}
424
- aria-label=${D(this.ariaLabel || n || void 0)}
426
+ aria-label=${O(this.ariaLabel || n || void 0)}
425
427
  ></web-ui-input>`}
426
428
  </div>
427
429
  <div
@@ -431,7 +433,7 @@ var M = class extends n(b) {
431
433
  ?hidden=${!this._isOpen}
432
434
  aria-hidden=${String(!this._isOpen)}
433
435
  >
434
- ${r.map((e) => x`<div
436
+ ${r.map((e) => S`<div
435
437
  id=${this._getA11yOptionId(e)}
436
438
  role="option"
437
439
  aria-selected=${e.value === this._selectedValue ? "true" : "false"}
@@ -447,7 +449,7 @@ var M = class extends n(b) {
447
449
  aria-hidden="true"
448
450
  @pointerdown=${this._handlePanelPointerDown}
449
451
  >
450
- <div class="autocomplete-scroll">
452
+ <div class="autocomplete-scroll wui-scroll">
451
453
  <div class="autocomplete-content">
452
454
  <slot @slotchange=${this._onSlotChange}></slot>
453
455
  </div>
@@ -457,46 +459,46 @@ var M = class extends n(b) {
457
459
  `;
458
460
  }
459
461
  };
460
- e([T({
462
+ e([E({
461
463
  type: String,
462
464
  reflect: !0
463
- })], M.prototype, "placeholder", void 0), e([T({
465
+ })], N.prototype, "placeholder", void 0), e([E({
464
466
  type: Boolean,
465
467
  reflect: !0
466
- })], M.prototype, "borderless", void 0), e([T({
468
+ })], N.prototype, "borderless", void 0), e([E({
467
469
  type: Boolean,
468
470
  reflect: !0
469
- })], M.prototype, "disabled", void 0), e([T({
471
+ })], N.prototype, "disabled", void 0), e([E({
470
472
  type: Boolean,
471
473
  reflect: !0
472
- })], M.prototype, "readonly", void 0), e([T({
474
+ })], N.prototype, "readonly", void 0), e([E({
473
475
  type: Boolean,
474
476
  reflect: !0
475
- })], M.prototype, "required", void 0), e([T({
477
+ })], N.prototype, "required", void 0), e([E({
476
478
  type: Boolean,
477
479
  reflect: !0
478
- })], M.prototype, "portal", void 0), e([T({
480
+ })], N.prototype, "portal", void 0), e([E({
479
481
  type: Boolean,
480
482
  reflect: !0,
481
483
  attribute: "no-scroll-lock"
482
- })], M.prototype, "noScrollLock", void 0), e([T({
484
+ })], N.prototype, "noScrollLock", void 0), e([E({
483
485
  type: Boolean,
484
486
  reflect: !0,
485
487
  attribute: "allow-custom-value"
486
- })], M.prototype, "allowCustomValue", void 0), e([T({ attribute: !1 })], M.prototype, "overlayContainer", void 0), e([T({
488
+ })], N.prototype, "allowCustomValue", void 0), e([E({ attribute: !1 })], N.prototype, "overlayContainer", void 0), e([E({
487
489
  type: String,
488
490
  reflect: !0
489
- })], M.prototype, "name", void 0), e([T({
491
+ })], N.prototype, "name", void 0), e([E({
490
492
  type: String,
491
493
  attribute: "aria-label"
492
- })], M.prototype, "ariaLabel", void 0), e([T({
494
+ })], N.prototype, "ariaLabel", void 0), e([E({
493
495
  type: String,
494
496
  attribute: "aria-labelledby"
495
- })], M.prototype, "ariaLabelledby", void 0), e([T({
497
+ })], N.prototype, "ariaLabelledby", void 0), e([E({
496
498
  type: String,
497
499
  reflect: !0
498
- })], M.prototype, "filter", null), e([E()], M.prototype, "_value", void 0), e([E()], M.prototype, "_selectedValue", void 0), e([E()], M.prototype, "_isOpen", void 0), e([E()], M.prototype, "_activeIndex", void 0), e([E()], M.prototype, "_focused", void 0), e([E()], M.prototype, "_hasTriggerSlot", void 0), M = O = e([w("web-ui-autocomplete")], M);
500
+ })], N.prototype, "filter", null), e([D()], N.prototype, "_value", void 0), e([D()], N.prototype, "_selectedValue", void 0), e([D()], N.prototype, "_isOpen", void 0), e([D()], N.prototype, "_activeIndex", void 0), e([D()], N.prototype, "_focused", void 0), e([D()], N.prototype, "_hasTriggerSlot", void 0), N = k = e([T("web-ui-autocomplete")], N);
499
501
  //#endregion
500
- export { M as WebUiAutocomplete };
502
+ export { N as WebUiAutocomplete };
501
503
 
502
504
  //# sourceMappingURL=index.js.map