@greypan/web-ui 8.0.0 → 8.1.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 (83) hide show
  1. package/README.CN.md +36 -18
  2. package/README.md +82 -63
  3. package/dist/assets/menu-portal.js +1 -1
  4. package/dist/assets/menu-portal.js.map +1 -1
  5. package/dist/assets/selection-control.js +1 -1
  6. package/dist/assets/selection-control.js.map +1 -1
  7. package/dist/components/autocomplete/index.js +6 -6
  8. package/dist/components/autocomplete/style.js +1 -1
  9. package/dist/components/autocomplete/style.js.map +1 -1
  10. package/dist/components/badge/style.js.map +1 -1
  11. package/dist/components/button/index.d.ts +368 -1
  12. package/dist/components/button/index.js +56 -36
  13. package/dist/components/button/index.js.map +1 -1
  14. package/dist/components/button/style.js +1 -1
  15. package/dist/components/button/style.js.map +1 -1
  16. package/dist/components/checkbox/index.d.ts +3 -0
  17. package/dist/components/checkbox/index.js +33 -35
  18. package/dist/components/checkbox/index.js.map +1 -1
  19. package/dist/components/checkbox/style.js +1 -1
  20. package/dist/components/checkbox/style.js.map +1 -1
  21. package/dist/components/checkbox-group/index.js +8 -8
  22. package/dist/components/dropdown-item/style.js +1 -1
  23. package/dist/components/dropdown-item/style.js.map +1 -1
  24. package/dist/components/editable-text/index.d.ts +2 -0
  25. package/dist/components/editable-text/index.js +50 -30
  26. package/dist/components/editable-text/index.js.map +1 -1
  27. package/dist/components/icon/index.js +7 -7
  28. package/dist/components/icon/index.js.map +1 -1
  29. package/dist/components/input/index.d.ts +7 -0
  30. package/dist/components/input/index.js +34 -29
  31. package/dist/components/input/index.js.map +1 -1
  32. package/dist/components/input-number/index.d.ts +1 -0
  33. package/dist/components/input-number/index.js +28 -26
  34. package/dist/components/input-number/index.js.map +1 -1
  35. package/dist/components/layout/index.js +1 -1
  36. package/dist/components/layout/index.js.map +1 -1
  37. package/dist/components/layout/style.js +1 -1
  38. package/dist/components/layout/style.js.map +1 -1
  39. package/dist/components/option/style.js +1 -1
  40. package/dist/components/option/style.js.map +1 -1
  41. package/dist/components/popover/style.js +1 -1
  42. package/dist/components/popover/style.js.map +1 -1
  43. package/dist/components/radio/index.d.ts +3 -0
  44. package/dist/components/radio/index.js +23 -19
  45. package/dist/components/radio/index.js.map +1 -1
  46. package/dist/components/radio-group/index.js +8 -8
  47. package/dist/components/segmented/index.js +8 -8
  48. package/dist/components/select/style.js +1 -1
  49. package/dist/components/select/style.js.map +1 -1
  50. package/dist/components/slider/index.js +9 -9
  51. package/dist/components/switch/index.d.ts +1 -0
  52. package/dist/components/switch/index.js +26 -24
  53. package/dist/components/switch/index.js.map +1 -1
  54. package/dist/components/textarea/index.d.ts +7 -1
  55. package/dist/components/textarea/index.js +44 -42
  56. package/dist/components/textarea/index.js.map +1 -1
  57. package/dist/components/textarea/style.js.map +1 -1
  58. package/dist/components/theme/index.d.ts +9 -0
  59. package/dist/components/theme/index.js +128 -85
  60. package/dist/components/theme/index.js.map +1 -1
  61. package/dist/components/theme/style.js +1 -1
  62. package/dist/components/theme/style.js.map +1 -1
  63. package/dist/components/toast/toast.js +8 -8
  64. package/dist/components/toast/toast.js.map +1 -1
  65. package/dist/components/tooltip/style.js +1 -1
  66. package/dist/components/tooltip/style.js.map +1 -1
  67. package/dist/icons/generated/akar-icons-check.d.ts +6 -0
  68. package/dist/icons/generated/akar-icons-check.js +10 -0
  69. package/dist/icons/generated/akar-icons-check.js.map +1 -0
  70. package/dist/icons/generated/bi-check.d.ts +6 -0
  71. package/dist/icons/generated/bi-check.js +10 -0
  72. package/dist/icons/generated/bi-check.js.map +1 -0
  73. package/dist/icons/index.d.ts +2 -0
  74. package/dist/icons/index.js +3 -1
  75. package/dist/shared/form-association/field-id.js +9 -0
  76. package/dist/shared/form-association/field-id.js.map +1 -0
  77. package/dist/shared/form-association/index.js +9 -1
  78. package/dist/shared/form-association/index.js.map +1 -1
  79. package/dist/shared/label-emptiness/index.js +45 -0
  80. package/dist/shared/label-emptiness/index.js.map +1 -0
  81. package/dist/shared/theme/root-sync.js +24 -18
  82. package/dist/shared/theme/root-sync.js.map +1 -1
  83. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"selection-control.js","names":[],"sources":["../../src/assets/selection-control.css?inline"],"sourcesContent":["/*\n * radio / checkbox 共享外壳。\n *\n * 指示器只有 18px。宿主一旦走 inline-block,页面行高会在宿主内生成匿名行盒,把盒子撑到\n * 行高(Tailwind preflight 下是 24px),且多出的空隙落在哪一侧取决于内部基线落点,radio 与\n * checkbox 因此一个贴顶一个贴底。改成 inline-flex 后宿主高度由内容决定,行高不再参与,\n * 与相邻文字的对齐交给 vertical-align 显式声明。\n */\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n cursor: default;\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n}\n\n/* :where() 保持零特异性,组件级配置(圆角、选中色、内部图形)始终覆盖共享层。 */\n:where(.wui-radio, .wui-checkbox) {\n cursor: inherit;\n user-select: none;\n\n display: inline-flex;\n gap: 10px;\n align-items: center;\n\n font-size: var(--wui-font-size, 14px);\n line-height: 1;\n color: var(--wui-color-text, #1b1b1b);\n\n &:focus-visible {\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n outline: var(--wui-focus-ring-width, 3px) solid var(--wui-color-focus-ring, rgb(0 136 255 / 0.4));\n outline-offset: 2px;\n }\n}\n\n:host([data-wui-pointer-focus]) :where(.wui-radio, .wui-checkbox):focus-visible {\n outline-color: transparent;\n}\n\n:where(.wui-radio.is-disabled, .wui-checkbox.is-disabled) {\n cursor: not-allowed;\n color: var(--wui-color-text-secondary, #6a6a6a);\n opacity: 0.4;\n}\n\n/*\n * 指示器底色取控件档。surface-raised 在深色下(#2c2c2e)离页面底色(#242628)只有 8 个\n * 亮度点,未选中时几乎看不出有一个圆/方框;surface-control 才是主题里「控件自己的底」\n * 那一档(中性按钮同档),深色比页面高 22 个亮度点,浅色下也从近白的 #f2f2f7 变成可读的 #dfdfdf。\n */\n:where(.wui-radio-circle, .wui-checkbox-box) {\n isolation: isolate;\n position: relative;\n\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n width: var(--wui-selection-control-size, 18px);\n height: var(--wui-selection-control-size, 18px);\n\n background-color: var(--wui-color-surface-control, #dfdfdf);\n\n transition: background-color var(--wui-duration-trigger, 160ms) ease;\n}\n\n/*\n * 状态层走覆盖层,不占用指示器自己的 background-color:同一个属性没法一半过渡一半即时,\n * 而这里要的是 hover 当帧切换、选中态的 accent 按 --wui-duration-trigger 淡入淡出。\n * z-index: -1 配父级 isolation 把覆盖层夹在控件底与圆点/勾之间,半径跟着指示器走。\n */\n:where(.wui-radio-circle, .wui-checkbox-box)::before {\n content: '';\n\n position: absolute;\n z-index: -1;\n inset: 0;\n\n border-radius: inherit;\n}\n\n:where(.wui-radio-label, .wui-checkbox-label) {\n pointer-events: none;\n}\n\n/*\n * 未激活态的 hover 状态层。用半透明色而不是混进控件底:覆盖层本就压在不透明的控件底上,\n * 合成结果与 color-mix(text 6%, surface-control) 一致,深色档同样成立。\n * 标签文字带 pointer-events: none,命中落回 label 自身,所以整条触发区(含右侧文字)\n * 的 hover 都会作用到指示器。hover 只在真正的指针设备上生效,避免触屏留态。\n */\n@media (hover: hover) and (pointer: fine) {\n :where(.wui-radio, .wui-checkbox):hover:not(.is-disabled, .is-checked)\n :where(.wui-radio-circle, .wui-checkbox-box)::before {\n background-color: color-mix(in srgb, var(--wui-color-text, #1b1b1b) 6%, transparent);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"selection-control.js","names":[],"sources":["../../src/assets/selection-control.css?inline"],"sourcesContent":["/*\n * radio / checkbox 共享外壳。\n *\n * 指示器只有 18px。宿主一旦走 inline-block,页面行高会在宿主内生成匿名行盒,把盒子撑到\n * 行高(Tailwind preflight 下是 24px),且多出的空隙落在哪一侧取决于内部基线落点,radio 与\n * checkbox 因此一个贴顶一个贴底。改成 inline-flex 后宿主高度由内容决定,行高不再参与,\n * 与相邻文字的对齐交给 vertical-align 显式声明。\n */\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n cursor: default;\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n}\n\n/* :where() 保持零特异性,组件级配置(圆角、选中色、内部图形)始终覆盖共享层。 */\n:where(.wui-radio, .wui-checkbox) {\n cursor: inherit;\n user-select: none;\n\n display: inline-flex;\n gap: 10px;\n align-items: center;\n\n font-size: var(--wui-font-size, 14px);\n line-height: 1;\n color: var(--wui-color-text, #1b1b1b);\n\n &:focus-visible {\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n outline: var(--wui-focus-ring-width, 3px) solid var(--wui-color-focus-ring, rgb(0 136 255 / 0.4));\n outline-offset: 2px;\n }\n}\n\n/*\n * 标签没有可渲染内容时把间距一并收掉。gap 只认「这里有个 flex item」,不认它有没有宽度,所以空槽位\n * 或只挂了一个视觉隐藏的无障碍名时,指示器右边照样多出这一段;判据见 LabelEmptinessController。\n */\n:where(.wui-radio.is-label-empty, .wui-checkbox.is-label-empty) {\n gap: 0;\n}\n\n:host([data-wui-pointer-focus]) :where(.wui-radio, .wui-checkbox):focus-visible {\n outline-color: transparent;\n}\n\n:where(.wui-radio.is-disabled, .wui-checkbox.is-disabled) {\n cursor: not-allowed;\n color: var(--wui-color-text-secondary, #6a6a6a);\n opacity: 0.4;\n}\n\n/*\n * 指示器底色取控件档。surface-raised 在深色下(#2c2c2e)离页面底色(#242628)只有 8 个\n * 亮度点,未选中时几乎看不出有一个圆/方框;surface-control 才是主题里「控件自己的底」\n * 那一档(中性按钮同档),深色比页面高 22 个亮度点,浅色下也从近白的 #f2f2f7 变成可读的 #dfdfdf。\n */\n:where(.wui-radio-circle, .wui-checkbox-box) {\n isolation: isolate;\n position: relative;\n\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n width: var(--wui-selection-control-size, 18px);\n height: var(--wui-selection-control-size, 18px);\n\n background-color: var(--wui-color-surface-control, #dfdfdf);\n\n transition: background-color var(--wui-duration-trigger, 160ms) ease;\n}\n\n/*\n * 状态层走覆盖层,不占用指示器自己的 background-color:同一个属性没法一半过渡一半即时,\n * 而这里要的是 hover 当帧切换、选中态的 accent 按 --wui-duration-trigger 淡入淡出。\n * z-index: -1 配父级 isolation 把覆盖层夹在控件底与圆点/勾之间,半径跟着指示器走。\n */\n:where(.wui-radio-circle, .wui-checkbox-box)::before {\n content: '';\n\n position: absolute;\n z-index: -1;\n inset: 0;\n\n border-radius: inherit;\n}\n\n:where(.wui-radio-label, .wui-checkbox-label) {\n pointer-events: none;\n}\n\n/*\n * 未激活态的 hover 状态层。用半透明色而不是混进控件底:覆盖层本就压在不透明的控件底上,\n * 合成结果与 color-mix(text 6%, surface-control) 一致,深色档同样成立。\n * 标签文字带 pointer-events: none,命中落回 label 自身,所以整条触发区(含右侧文字)\n * 的 hover 都会作用到指示器。hover 只在真正的指针设备上生效,避免触屏留态。\n */\n@media (hover: hover) and (pointer: fine) {\n :where(.wui-radio, .wui-checkbox):hover:not(.is-disabled, .is-checked)\n :where(.wui-radio-circle, .wui-checkbox-box)::before {\n background-color: color-mix(in srgb, var(--wui-color-text, #1b1b1b) 6%, transparent);\n }\n}\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import e from "../../_virtual/_@oxc-project_runtime@0.149.0/helpers/esm/decorate.js";
2
2
  import t from "../../assets/glass.js";
3
- import { normalizeLiteral as n } from "../../shared/normalize/index.js";
4
- import { FormAssociated as r, FormAssociationController as i, defineFormAssociation as a } from "../../shared/form-association/index.js";
3
+ import { FormAssociated as n, FormAssociationController as r, defineFormAssociation as i } from "../../shared/form-association/index.js";
4
+ import { normalizeLiteral as a } from "../../shared/normalize/index.js";
5
5
  import "../input/index.js";
6
6
  import "../option/index.js";
7
7
  import o from "../../assets/overlay-motion.js";
@@ -28,12 +28,12 @@ function A(e) {
28
28
  function j(e) {
29
29
  return e instanceof Element && e.slot === "trigger";
30
30
  }
31
- var M = class extends r(b) {
31
+ var M = class extends n(b) {
32
32
  static {
33
33
  O = this;
34
34
  }
35
35
  constructor(...e) {
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 = a({
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({
37
37
  host: this,
38
38
  initialize: () => {
39
39
  let e = this.getAttribute("value");
@@ -49,7 +49,7 @@ var M = class extends r(b) {
49
49
  typeof e == "string" && (this.value = e);
50
50
  },
51
51
  syncValidity: () => this._syncValidity()
52
- }).make(), this._formAssociationController = new i(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-${++O._nextInstanceId}`, this._a11yOptionIds = /* @__PURE__ */ new WeakMap(), this._nextA11yOptionId = 0, this._options = [], this._scrollLock = v().make(), this._optionPortal = p().make({
53
53
  element: this,
54
54
  idPrefix: `${this._idPrefix}-option`,
55
55
  getPortal: () => this._portal,
@@ -181,7 +181,7 @@ var M = class extends r(b) {
181
181
  }
182
182
  set filter(e) {
183
183
  let t = this._filter;
184
- this._filter = n(e, k, "contains"), this.requestUpdate("filter", t);
184
+ this._filter = a(e, k, "contains"), this.requestUpdate("filter", t);
185
185
  }
186
186
  get value() {
187
187
  return this._value;
@@ -1,5 +1,5 @@
1
1
  //#region src/components/autocomplete/style.css?inline
2
- var e = "*,:before,:after{box-sizing:border-box}:host{--wui-autocomplete-max-width:500px;display:inline-block}:host([disabled]){cursor:not-allowed;opacity:.4}.wui-autocomplete-inner{position:relative}.autocomplete-trigger{box-sizing:border-box;width:var(--wui-input-width,200px);min-width:var(--wui-control-size,36px);background:0 0;border:none;align-items:center;display:flex}.autocomplete-trigger[data-custom-trigger]{width:auto}.autocomplete-trigger web-ui-input{flex:1;min-width:0}::slotted([slot=trigger]){min-width:0}.autocomplete-trigger:focus-visible{outline:var(--wui-focus-ring-width,3px) solid var(--wui-color-focus-ring,#08f6);outline-offset:2px}:host([disabled]) .autocomplete-trigger web-ui-input{opacity:1}.autocomplete-overlay{--wui-option-check-display:none;--wui-internal-glass-shadow:var(--wui-shadow-panel,0 3px 9px #00000045);--wui-glass-corner-radius:var(--wui-radius-menu,18px);--wui-internal-duration-float-enter:var(--wui-duration-float-enter,.24s);--wui-internal-duration-float-exit:var(--wui-duration-float-exit,.16s);z-index:var(--wui-layer-inline-overlay,1);box-sizing:border-box;min-width:var(--wui-overlay-min-width,200px);max-width:var(--wui-autocomplete-max-width,500px);border-radius:var(--wui-radius-menu,18px);background-color:var(--wui-color-surface-menu,#f6f6f6d1);position:absolute;overflow:hidden}.autocomplete-overlay.portal{z-index:var(--wui-layer-menu,100);position:fixed}.autocomplete-overlay.hidden{display:none}.autocomplete-scroll{max-height:var(--wui-autocomplete-max-height,200px);overflow-y:auto}.autocomplete-content{padding:4px}.autocomplete-empty{font-size:var(--wui-font-size,14px);color:var(--wui-color-text-secondary,#6a6a6a);text-align:center;padding:8px 12px}::slotted(web-ui-option[data-filtered]),.autocomplete-content web-ui-option[data-filtered],:host([portal]) .autocomplete-overlay{display:none}.autocomplete-a11y-only,.autocomplete-a11y-listbox{white-space:nowrap;clip-path:inset(50%);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}";
2
+ var e = "*,:before,:after{box-sizing:border-box}:host{--wui-autocomplete-max-width:500px;display:inline-block}:host([disabled]){cursor:not-allowed;opacity:.4}.wui-autocomplete-inner{position:relative}.autocomplete-trigger{box-sizing:border-box;width:var(--wui-input-width,200px);min-width:var(--wui-control-size,36px);background:0 0;border:none;align-items:center;display:flex}.autocomplete-trigger[data-custom-trigger]{width:auto}.autocomplete-trigger web-ui-input{flex:1;min-width:0}::slotted([slot=trigger]){min-width:0}.autocomplete-trigger:focus-visible{outline:var(--wui-focus-ring-width,3px) solid var(--wui-color-focus-ring,#08f6);outline-offset:2px}:host([disabled]) .autocomplete-trigger web-ui-input{opacity:1}.autocomplete-overlay{--wui-option-check-display:none;--wui-internal-glass-shadow:var(--wui-shadow-panel,0 3px 9px #00000045);--wui-glass-corner-radius:var(--wui-radius-menu,18px);--wui-internal-duration-float-enter:var(--wui-duration-float-enter,.24s);--wui-internal-duration-float-exit:var(--wui-duration-float-exit,.16s);z-index:var(--wui-layer-inline-overlay,1);box-sizing:border-box;min-width:var(--wui-overlay-min-width,200px);max-width:var(--wui-autocomplete-max-width,500px);border-radius:var(--wui-radius-menu,18px);background-color:var(--wui-color-surface-menu,#fefefec2);position:absolute;overflow:hidden}.autocomplete-overlay.portal{z-index:var(--wui-layer-menu,100);position:fixed}.autocomplete-overlay.hidden{display:none}.autocomplete-scroll{max-height:var(--wui-autocomplete-max-height,200px);overflow-y:auto}.autocomplete-content{padding:4px}.autocomplete-empty{font-size:var(--wui-font-size,14px);color:var(--wui-color-text-secondary,#6a6a6a);text-align:center;padding:8px 12px}::slotted(web-ui-option[data-filtered]),.autocomplete-content web-ui-option[data-filtered],:host([portal]) .autocomplete-overlay{display:none}.autocomplete-a11y-only,.autocomplete-a11y-listbox{white-space:nowrap;clip-path:inset(50%);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}";
3
3
  //#endregion
4
4
  export { e as default };
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/autocomplete/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n --wui-autocomplete-max-width: 500px;\n display: inline-block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.wui-autocomplete-inner {\n /* 与 select 的 .wui-select-inner 对齐:为本地绝对定位面板提供包含块,\n 避免面板 offsetParent(BODY)与实际包含块(远端定位祖先,如 layout header)不一致导致定位偏移。 */\n position: relative;\n}\n\n/*\n * trigger 包装 div:持 combobox ARIA、slot[name=\"trigger\"] 与事件委托监听。\n * 玻璃胶囊由默认触发器 web-ui-input 自带(与重构前的 .input-wrapper 同一套 token\n * 与度量:--wui-input-width / --wui-control-size / --wui-radius-control),这里只定义\n * 容器宽度与自定义触发器时的自适应。\n */\n.autocomplete-trigger {\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n width: var(--wui-input-width, 200px);\n min-width: var(--wui-control-size, 36px);\n border: none;\n\n background: transparent;\n}\n\n/* 自定义触发器自带度量,容器让位 */\n.autocomplete-trigger[data-custom-trigger] {\n width: auto;\n}\n\n/* 默认触发器填满容器:高度、内边距、玻璃底与 focus ring 由它自带 */\n.autocomplete-trigger web-ui-input {\n flex: 1;\n min-width: 0;\n}\n\n::slotted([slot='trigger']) {\n min-width: 0;\n}\n\n/* 自定义触发器场景下包装 div 可能成为 tab 位,补 focus ring(默认触发器自带) */\n.autocomplete-trigger:focus-visible {\n outline: var(--wui-focus-ring-width, 3px) solid var(--wui-color-focus-ring, rgb(0 136 255 / 0.4));\n outline-offset: 2px;\n}\n\n/* 禁用态:宿主已整体降透明度,默认触发器自身的 disabled 降透明度在此抵消,\n 保持与重构前(宿主 × 内部 input 两层)一致的观感 */\n:host([disabled]) .autocomplete-trigger web-ui-input {\n opacity: 1;\n}\n\n/* ===== 浮层(glass 样式参考 select) ===== */\n\n.autocomplete-overlay {\n /* autocomplete 不表示选中状态;隐藏共享 option 的勾选图标及其布局占位 */\n --wui-option-check-display: none;\n --wui-internal-glass-shadow: var(--wui-shadow-panel, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-glass-corner-radius: var(--wui-radius-menu, 18px);\n --wui-internal-duration-float-enter: var(--wui-duration-float-enter, 240ms);\n --wui-internal-duration-float-exit: var(--wui-duration-float-exit, 160ms);\n position: absolute;\n z-index: var(--wui-layer-inline-overlay, 1);\n\n overflow: hidden;\n\n box-sizing: border-box;\n min-width: var(--wui-overlay-min-width, 200px);\n max-width: var(--wui-autocomplete-max-width, 500px);\n border-radius: var(--wui-radius-menu, 18px);\n\n /* 玻璃背景:wui-glass 在面板自身,这里覆盖其默认玻璃底为菜单表面色 */\n background-color: var(--wui-color-surface-menu, rgb(246 246 246 / 0.82));\n\n &.portal {\n position: fixed;\n z-index: var(--wui-layer-menu, 100);\n }\n\n &.hidden {\n display: none;\n }\n}\n\n.autocomplete-scroll {\n overflow-y: auto;\n max-height: var(--wui-autocomplete-max-height, 200px);\n}\n\n.autocomplete-content {\n padding: 4px;\n}\n\n.autocomplete-empty {\n padding: 8px 12px;\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text-secondary, #6a6a6a);\n text-align: center;\n}\n\n/* 非匹配候选隐藏:本地模式经 slot 投影,portal 模式为面板直接子元素 */\n::slotted(web-ui-option[data-filtered]) {\n display: none;\n}\n\n.autocomplete-content web-ui-option[data-filtered] {\n display: none;\n}\n\n:host([portal]) .autocomplete-overlay {\n display: none;\n}\n\n/* Shadow DOM idref 不能跨越 Portal 或 light DOM;保留同根可访问的语义镜像。 */\n.autocomplete-a11y-only,\n.autocomplete-a11y-listbox {\n position: absolute;\n\n overflow: hidden;\n\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n\n white-space: nowrap;\n\n clip-path: inset(50%);\n}\n"],"mappings":""}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/autocomplete/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n --wui-autocomplete-max-width: 500px;\n display: inline-block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.wui-autocomplete-inner {\n /* 与 select 的 .wui-select-inner 对齐:为本地绝对定位面板提供包含块,\n 避免面板 offsetParent(BODY)与实际包含块(远端定位祖先,如 layout header)不一致导致定位偏移。 */\n position: relative;\n}\n\n/*\n * trigger 包装 div:持 combobox ARIA、slot[name=\"trigger\"] 与事件委托监听。\n * 玻璃胶囊由默认触发器 web-ui-input 自带(与重构前的 .input-wrapper 同一套 token\n * 与度量:--wui-input-width / --wui-control-size / --wui-radius-control),这里只定义\n * 容器宽度与自定义触发器时的自适应。\n */\n.autocomplete-trigger {\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n width: var(--wui-input-width, 200px);\n min-width: var(--wui-control-size, 36px);\n border: none;\n\n background: transparent;\n}\n\n/* 自定义触发器自带度量,容器让位 */\n.autocomplete-trigger[data-custom-trigger] {\n width: auto;\n}\n\n/* 默认触发器填满容器:高度、内边距、玻璃底与 focus ring 由它自带 */\n.autocomplete-trigger web-ui-input {\n flex: 1;\n min-width: 0;\n}\n\n::slotted([slot='trigger']) {\n min-width: 0;\n}\n\n/* 自定义触发器场景下包装 div 可能成为 tab 位,补 focus ring(默认触发器自带) */\n.autocomplete-trigger:focus-visible {\n outline: var(--wui-focus-ring-width, 3px) solid var(--wui-color-focus-ring, rgb(0 136 255 / 0.4));\n outline-offset: 2px;\n}\n\n/* 禁用态:宿主已整体降透明度,默认触发器自身的 disabled 降透明度在此抵消,\n 保持与重构前(宿主 × 内部 input 两层)一致的观感 */\n:host([disabled]) .autocomplete-trigger web-ui-input {\n opacity: 1;\n}\n\n.autocomplete-overlay {\n /* autocomplete 不表示选中状态;隐藏共享 option 的勾选图标及其布局占位 */\n --wui-option-check-display: none;\n --wui-internal-glass-shadow: var(--wui-shadow-panel, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-glass-corner-radius: var(--wui-radius-menu, 18px);\n --wui-internal-duration-float-enter: var(--wui-duration-float-enter, 240ms);\n --wui-internal-duration-float-exit: var(--wui-duration-float-exit, 160ms);\n position: absolute;\n z-index: var(--wui-layer-inline-overlay, 1);\n\n overflow: hidden;\n\n box-sizing: border-box;\n min-width: var(--wui-overlay-min-width, 200px);\n max-width: var(--wui-autocomplete-max-width, 500px);\n border-radius: var(--wui-radius-menu, 18px);\n\n /* 玻璃背景:wui-glass 在面板自身,这里覆盖其默认玻璃底为菜单表面色 */\n background-color: var(--wui-color-surface-menu, rgb(254 254 254 / 0.76));\n\n &.portal {\n position: fixed;\n z-index: var(--wui-layer-menu, 100);\n }\n\n &.hidden {\n display: none;\n }\n}\n\n.autocomplete-scroll {\n overflow-y: auto;\n max-height: var(--wui-autocomplete-max-height, 200px);\n}\n\n.autocomplete-content {\n padding: 4px;\n}\n\n.autocomplete-empty {\n padding: 8px 12px;\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text-secondary, #6a6a6a);\n text-align: center;\n}\n\n/* 非匹配候选隐藏:本地模式经 slot 投影,portal 模式为面板直接子元素 */\n::slotted(web-ui-option[data-filtered]) {\n display: none;\n}\n\n.autocomplete-content web-ui-option[data-filtered] {\n display: none;\n}\n\n:host([portal]) .autocomplete-overlay {\n display: none;\n}\n\n/* Shadow DOM idref 不能跨越 Portal 或 light DOM;保留同根可访问的语义镜像。 */\n.autocomplete-a11y-only,\n.autocomplete-a11y-listbox {\n position: absolute;\n\n overflow: hidden;\n\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n\n white-space: nowrap;\n\n clip-path: inset(50%);\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/badge/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n user-select: none;\n display: inline-block;\n}\n\n.badge-wrapper {\n display: inline-flex;\n}\n\n.badge-wrapper-fixed {\n position: relative;\n}\n\n.badge {\n z-index: 1;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n min-width: 18px;\n height: 18px;\n padding: 0 4px;\n border: 1px solid var(--wui-color-page, #fff);\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n color: var(--wui-color-on-accent, #fff);\n white-space: nowrap;\n\n background-color: var(--wui-color-danger, #dc2626);\n}\n\n.badge-fixed {\n position: absolute;\n transform: translate(\n calc(var(--badge-x, 50%) + var(--badge-offset-x, 0px)),\n calc(var(--badge-y, -50%) + var(--badge-offset-y, 0px))\n );\n}\n\n:host([placement='top-right']) .badge {\n --badge-x: 50%;\n --badge-y: -50%;\n top: 0;\n right: 0;\n}\n\n:host([placement='top-left']) .badge {\n --badge-x: -50%;\n --badge-y: -50%;\n top: 0;\n left: 0;\n}\n\n:host([placement='bottom-right']) .badge {\n --badge-x: 50%;\n --badge-y: 50%;\n right: 0;\n bottom: 0;\n}\n\n:host([placement='bottom-left']) .badge {\n --badge-x: -50%;\n --badge-y: 50%;\n bottom: 0;\n left: 0;\n}\n\n.badge-dot {\n min-width: 8px;\n height: 8px;\n padding: 0;\n font-size: 0;\n}\n\n/* ===== Fixed mode (has slotted content) ===== */\n\n.badge-fixed.badge-dot {\n --badge-x: 40%;\n --badge-y: -40%;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/badge/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n user-select: none;\n display: inline-block;\n}\n\n.badge-wrapper {\n display: inline-flex;\n}\n\n.badge-wrapper-fixed {\n position: relative;\n}\n\n.badge {\n z-index: 1;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n min-width: 18px;\n height: 18px;\n padding: 0 4px;\n border: 1px solid var(--wui-color-page, #fff);\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n color: var(--wui-color-on-accent, #fff);\n white-space: nowrap;\n\n background-color: var(--wui-color-danger, #dc2626);\n}\n\n.badge-fixed {\n position: absolute;\n transform: translate(\n calc(var(--badge-x, 50%) + var(--badge-offset-x, 0px)),\n calc(var(--badge-y, -50%) + var(--badge-offset-y, 0px))\n );\n}\n\n:host([placement='top-right']) .badge {\n --badge-x: 50%;\n --badge-y: -50%;\n top: 0;\n right: 0;\n}\n\n:host([placement='top-left']) .badge {\n --badge-x: -50%;\n --badge-y: -50%;\n top: 0;\n left: 0;\n}\n\n:host([placement='bottom-right']) .badge {\n --badge-x: 50%;\n --badge-y: 50%;\n right: 0;\n bottom: 0;\n}\n\n:host([placement='bottom-left']) .badge {\n --badge-x: -50%;\n --badge-y: 50%;\n bottom: 0;\n left: 0;\n}\n\n.badge-dot {\n min-width: 8px;\n height: 8px;\n padding: 0;\n font-size: 0;\n}\n\n.badge-fixed.badge-dot {\n --badge-x: 40%;\n --badge-y: -40%;\n}\n"],"mappings":""}
@@ -1,6 +1,370 @@
1
1
  import { LitElement } from 'lit';
2
2
  declare const ALLOWED_TYPES: readonly ["button", "submit", "reset"];
3
- export declare class WebUiButton extends LitElement {
3
+ declare const WebUiButton_base: {
4
+ new (...args: any[]): {
5
+ formResetCallback(): void;
6
+ formDisabledCallback(disabled: boolean): void;
7
+ formStateRestoreCallback(state: File | FormData | string | null): void;
8
+ accessKey: string;
9
+ readonly accessKeyLabel: string;
10
+ autocapitalize: string;
11
+ autocorrect: boolean;
12
+ dir: string;
13
+ draggable: boolean;
14
+ hidden: boolean | "until-found";
15
+ inert: boolean;
16
+ innerText: string;
17
+ lang: string;
18
+ readonly offsetHeight: number;
19
+ readonly offsetLeft: number;
20
+ readonly offsetParent: Element | null;
21
+ readonly offsetTop: number;
22
+ readonly offsetWidth: number;
23
+ outerText: string;
24
+ popover: string | null;
25
+ spellcheck: boolean;
26
+ title: string;
27
+ translate: boolean;
28
+ writingSuggestions: string;
29
+ attachInternals(): ElementInternals;
30
+ click(): void;
31
+ hidePopover(): void;
32
+ showPopover(options?: ShowPopoverOptions): void;
33
+ togglePopover(options?: TogglePopoverOptions | boolean): boolean;
34
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
35
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
36
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
37
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
38
+ readonly attributes: NamedNodeMap;
39
+ get classList(): DOMTokenList;
40
+ set classList(value: string);
41
+ className: string;
42
+ readonly clientHeight: number;
43
+ readonly clientLeft: number;
44
+ readonly clientTop: number;
45
+ readonly clientWidth: number;
46
+ readonly currentCSSZoom: number;
47
+ readonly customElementRegistry: CustomElementRegistry | null;
48
+ id: string;
49
+ innerHTML: string;
50
+ readonly localName: string;
51
+ readonly namespaceURI: string | null;
52
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
53
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
54
+ outerHTML: string;
55
+ readonly ownerDocument: Document;
56
+ get part(): DOMTokenList;
57
+ set part(value: string);
58
+ readonly prefix: string | null;
59
+ readonly scrollHeight: number;
60
+ scrollLeft: number;
61
+ scrollTop: number;
62
+ readonly scrollWidth: number;
63
+ readonly shadowRoot: ShadowRoot | null;
64
+ slot: string;
65
+ readonly tagName: string;
66
+ attachShadow(init: ShadowRootInit): ShadowRoot;
67
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
68
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
69
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
70
+ closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
71
+ closest<E extends Element = Element>(selectors: string): E | null;
72
+ computedStyleMap(): StylePropertyMapReadOnly;
73
+ getAttribute(qualifiedName: string): string | null;
74
+ getAttributeNS(namespace: string | null, localName: string): string | null;
75
+ getAttributeNames(): string[];
76
+ getAttributeNode(qualifiedName: string): Attr | null;
77
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
78
+ getBoundingClientRect(): DOMRect;
79
+ getClientRects(): DOMRectList;
80
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
81
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
82
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
83
+ getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
84
+ getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
85
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
86
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
87
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
88
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
89
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
90
+ getHTML(options?: GetHTMLOptions): string;
91
+ hasAttribute(qualifiedName: string): boolean;
92
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
93
+ hasAttributes(): boolean;
94
+ hasPointerCapture(pointerId: number): boolean;
95
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
96
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
97
+ insertAdjacentText(where: InsertPosition, data: string): void;
98
+ matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
99
+ matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
100
+ matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
101
+ matches(selectors: string): boolean;
102
+ releasePointerCapture(pointerId: number): void;
103
+ removeAttribute(qualifiedName: string): void;
104
+ removeAttributeNS(namespace: string | null, localName: string): void;
105
+ removeAttributeNode(attr: Attr): Attr;
106
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
107
+ requestPointerLock(options?: PointerLockOptions): Promise<void>;
108
+ scroll(options?: ScrollToOptions): void;
109
+ scroll(x: number, y: number): void;
110
+ scrollBy(options?: ScrollToOptions): void;
111
+ scrollBy(x: number, y: number): void;
112
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
113
+ scrollTo(options?: ScrollToOptions): void;
114
+ scrollTo(x: number, y: number): void;
115
+ setAttribute(qualifiedName: string, value: string): void;
116
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
117
+ setAttributeNode(attr: Attr): Attr | null;
118
+ setAttributeNodeNS(attr: Attr): Attr | null;
119
+ setHTMLUnsafe(html: string): void;
120
+ setPointerCapture(pointerId: number): void;
121
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
122
+ webkitMatchesSelector(selectors: string): boolean;
123
+ get textContent(): string;
124
+ set textContent(value: string | null);
125
+ readonly baseURI: string;
126
+ readonly childNodes: NodeListOf<ChildNode>;
127
+ readonly firstChild: ChildNode | null;
128
+ readonly isConnected: boolean;
129
+ readonly lastChild: ChildNode | null;
130
+ readonly nextSibling: ChildNode | null;
131
+ readonly nodeName: string;
132
+ readonly nodeType: number;
133
+ nodeValue: string | null;
134
+ readonly parentElement: HTMLElement | null;
135
+ readonly parentNode: ParentNode | null;
136
+ readonly previousSibling: ChildNode | null;
137
+ appendChild<T extends Node>(node: T): T;
138
+ cloneNode(subtree?: boolean): Node;
139
+ compareDocumentPosition(other: Node): number;
140
+ contains(other: Node | null): boolean;
141
+ getRootNode(options?: GetRootNodeOptions): Node;
142
+ hasChildNodes(): boolean;
143
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
144
+ isDefaultNamespace(namespace: string | null): boolean;
145
+ isEqualNode(otherNode: Node | null): boolean;
146
+ isSameNode(otherNode: Node | null): boolean;
147
+ lookupNamespaceURI(prefix: string | null): string | null;
148
+ lookupPrefix(namespace: string | null): string | null;
149
+ normalize(): void;
150
+ removeChild<T extends Node>(child: T): T;
151
+ replaceChild<T extends Node>(node: Node, child: T): T;
152
+ readonly ELEMENT_NODE: 1;
153
+ readonly ATTRIBUTE_NODE: 2;
154
+ readonly TEXT_NODE: 3;
155
+ readonly CDATA_SECTION_NODE: 4;
156
+ readonly ENTITY_REFERENCE_NODE: 5;
157
+ readonly ENTITY_NODE: 6;
158
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
159
+ readonly COMMENT_NODE: 8;
160
+ readonly DOCUMENT_NODE: 9;
161
+ readonly DOCUMENT_TYPE_NODE: 10;
162
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
163
+ readonly NOTATION_NODE: 12;
164
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
165
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
166
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
167
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
168
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
169
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
170
+ dispatchEvent(event: Event): boolean;
171
+ ariaActiveDescendantElement: Element | null;
172
+ ariaAtomic: string | null;
173
+ ariaAutoComplete: string | null;
174
+ ariaBrailleLabel: string | null;
175
+ ariaBrailleRoleDescription: string | null;
176
+ ariaBusy: string | null;
177
+ ariaChecked: string | null;
178
+ ariaColCount: string | null;
179
+ ariaColIndex: string | null;
180
+ ariaColIndexText: string | null;
181
+ ariaColSpan: string | null;
182
+ ariaControlsElements: ReadonlyArray<Element> | null;
183
+ ariaCurrent: string | null;
184
+ ariaDescribedByElements: ReadonlyArray<Element> | null;
185
+ ariaDescription: string | null;
186
+ ariaDetailsElements: ReadonlyArray<Element> | null;
187
+ ariaDisabled: string | null;
188
+ ariaErrorMessageElements: ReadonlyArray<Element> | null;
189
+ ariaExpanded: string | null;
190
+ ariaFlowToElements: ReadonlyArray<Element> | null;
191
+ ariaHasPopup: string | null;
192
+ ariaHidden: string | null;
193
+ ariaInvalid: string | null;
194
+ ariaKeyShortcuts: string | null;
195
+ ariaLabel: string | null;
196
+ ariaLabelledByElements: ReadonlyArray<Element> | null;
197
+ ariaLevel: string | null;
198
+ ariaLive: string | null;
199
+ ariaModal: string | null;
200
+ ariaMultiLine: string | null;
201
+ ariaMultiSelectable: string | null;
202
+ ariaOrientation: string | null;
203
+ ariaOwnsElements: ReadonlyArray<Element> | null;
204
+ ariaPlaceholder: string | null;
205
+ ariaPosInSet: string | null;
206
+ ariaPressed: string | null;
207
+ ariaReadOnly: string | null;
208
+ ariaRelevant: string | null;
209
+ ariaRequired: string | null;
210
+ ariaRoleDescription: string | null;
211
+ ariaRowCount: string | null;
212
+ ariaRowIndex: string | null;
213
+ ariaRowIndexText: string | null;
214
+ ariaRowSpan: string | null;
215
+ ariaSelected: string | null;
216
+ ariaSetSize: string | null;
217
+ ariaSort: string | null;
218
+ ariaValueMax: string | null;
219
+ ariaValueMin: string | null;
220
+ ariaValueNow: string | null;
221
+ ariaValueText: string | null;
222
+ role: string | null;
223
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
224
+ getAnimations(options?: GetAnimationsOptions): Animation[];
225
+ after(...nodes: (Node | string)[]): void;
226
+ before(...nodes: (Node | string)[]): void;
227
+ remove(): void;
228
+ replaceWith(...nodes: (Node | string)[]): void;
229
+ readonly nextElementSibling: Element | null;
230
+ readonly previousElementSibling: Element | null;
231
+ readonly childElementCount: number;
232
+ readonly children: HTMLCollection;
233
+ readonly firstElementChild: Element | null;
234
+ readonly lastElementChild: Element | null;
235
+ append(...nodes: (Node | string)[]): void;
236
+ moveBefore(node: Node, child: Node | null): void;
237
+ prepend(...nodes: (Node | string)[]): void;
238
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
239
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
240
+ querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
241
+ querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
242
+ querySelector<E extends Element = Element>(selectors: string): E | null;
243
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
244
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
245
+ querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
246
+ querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
247
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
248
+ replaceChildren(...nodes: (Node | string)[]): void;
249
+ readonly assignedSlot: HTMLSlotElement | null;
250
+ readonly attributeStyleMap: StylePropertyMap;
251
+ get style(): CSSStyleDeclaration;
252
+ set style(cssText: string);
253
+ contentEditable: string;
254
+ enterKeyHint: string;
255
+ inputMode: string;
256
+ readonly isContentEditable: boolean;
257
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
258
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
259
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
260
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
261
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
262
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
263
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
264
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
265
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
266
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
267
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
268
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
272
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
+ oncommand: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
275
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
276
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
277
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
278
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
279
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
280
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
281
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
282
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
283
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
284
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
285
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
286
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
287
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
288
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
289
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
290
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
291
+ onerror: OnErrorEventHandler;
292
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
293
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
294
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
295
+ oninput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
296
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
297
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
298
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
299
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
300
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
302
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
303
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
304
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
305
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
306
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
307
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
308
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
309
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
310
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
311
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
312
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
313
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
315
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
316
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
317
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
319
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
320
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
321
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
322
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
323
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
324
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
325
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
326
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
327
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
328
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
329
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
330
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
331
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
332
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
333
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
334
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
335
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
336
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
339
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
340
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
342
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
343
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
344
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
345
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
346
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
347
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
348
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
349
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
350
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
351
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
353
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
354
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
355
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
356
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
357
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
358
+ autofocus: boolean;
359
+ readonly dataset: DOMStringMap;
360
+ nonce: string;
361
+ tabIndex: number;
362
+ blur(): void;
363
+ focus(options?: FocusOptions): void;
364
+ };
365
+ formAssociated: boolean;
366
+ } & typeof LitElement;
367
+ export declare class WebUiButton extends WebUiButton_base {
4
368
  static styles: import('lit').CSSResult[];
5
369
  get variant(): 'primary' | 'secondary' | 'ghost' | 'danger' | 'glass';
6
370
  set variant(v: string);
@@ -16,6 +380,9 @@ export declare class WebUiButton extends LitElement {
16
380
  ariaLabel: string | null;
17
381
  private readonly _groupManagement;
18
382
  private get _groupContext();
383
+ private readonly _formAssociation;
384
+ private readonly _formAssociationController;
385
+ private get _isDisabled();
19
386
  private get _sizeStyle();
20
387
  private handleClick;
21
388
  render(): import('lit').TemplateResult<1>;