@greypan/web-ui 6.0.0 → 6.2.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 (187) hide show
  1. package/README.CN.md +285 -93
  2. package/README.md +266 -87
  3. package/dist/assets/glass.js +1 -1
  4. package/dist/assets/glass.js.map +1 -1
  5. package/dist/assets/menu-portal.js +1 -1
  6. package/dist/assets/menu-portal.js.map +1 -1
  7. package/dist/assets/overlay-motion.js +1 -1
  8. package/dist/assets/overlay-motion.js.map +1 -1
  9. package/dist/components/autocomplete/index.d.ts +367 -4
  10. package/dist/components/autocomplete/index.js +87 -80
  11. package/dist/components/autocomplete/index.js.map +1 -1
  12. package/dist/components/autocomplete/style.js +1 -1
  13. package/dist/components/autocomplete/style.js.map +1 -1
  14. package/dist/components/avatar/style.js +1 -1
  15. package/dist/components/avatar/style.js.map +1 -1
  16. package/dist/components/back-top/style.js +1 -1
  17. package/dist/components/back-top/style.js.map +1 -1
  18. package/dist/components/badge/style.js +1 -1
  19. package/dist/components/badge/style.js.map +1 -1
  20. package/dist/components/button/index.js +36 -32
  21. package/dist/components/button/index.js.map +1 -1
  22. package/dist/components/button/style.js +1 -1
  23. package/dist/components/button/style.js.map +1 -1
  24. package/dist/components/button-group/style.js +1 -1
  25. package/dist/components/button-group/style.js.map +1 -1
  26. package/dist/components/checkbox/index.d.ts +366 -5
  27. package/dist/components/checkbox/index.js +19 -31
  28. package/dist/components/checkbox/index.js.map +1 -1
  29. package/dist/components/checkbox/style.js +1 -1
  30. package/dist/components/checkbox/style.js.map +1 -1
  31. package/dist/components/checkbox-group/index.d.ts +366 -4
  32. package/dist/components/checkbox-group/index.js +16 -25
  33. package/dist/components/checkbox-group/index.js.map +1 -1
  34. package/dist/components/collapse/index.d.ts +29 -1
  35. package/dist/components/collapse/index.js +105 -46
  36. package/dist/components/collapse/index.js.map +1 -1
  37. package/dist/components/collapse/style.js +1 -1
  38. package/dist/components/collapse/style.js.map +1 -1
  39. package/dist/components/context-menu/index.d.ts +7 -14
  40. package/dist/components/context-menu/index.js +113 -164
  41. package/dist/components/context-menu/index.js.map +1 -1
  42. package/dist/components/dialog/index.js +26 -25
  43. package/dist/components/dialog/index.js.map +1 -1
  44. package/dist/components/dialog/style.js +1 -1
  45. package/dist/components/dialog/style.js.map +1 -1
  46. package/dist/components/drawer/index.js +71 -64
  47. package/dist/components/drawer/index.js.map +1 -1
  48. package/dist/components/drawer/style.js +1 -1
  49. package/dist/components/drawer/style.js.map +1 -1
  50. package/dist/components/dropdown/index.d.ts +6 -14
  51. package/dist/components/dropdown/index.js +100 -156
  52. package/dist/components/dropdown/index.js.map +1 -1
  53. package/dist/components/dropdown-header/style.js +1 -1
  54. package/dist/components/dropdown-header/style.js.map +1 -1
  55. package/dist/components/dropdown-item/style.js +1 -1
  56. package/dist/components/dropdown-item/style.js.map +1 -1
  57. package/dist/components/empty/style.js +1 -1
  58. package/dist/components/empty/style.js.map +1 -1
  59. package/dist/components/image-preview/index.d.ts +58 -0
  60. package/dist/components/image-preview/index.js +481 -0
  61. package/dist/components/image-preview/index.js.map +1 -0
  62. package/dist/components/image-preview/style.js +6 -0
  63. package/dist/components/image-preview/style.js.map +1 -0
  64. package/dist/components/index.d.ts +1 -0
  65. package/dist/components/index.js +20 -19
  66. package/dist/components/input/index.d.ts +366 -5
  67. package/dist/components/input/index.js +35 -47
  68. package/dist/components/input/index.js.map +1 -1
  69. package/dist/components/input/style.js +1 -1
  70. package/dist/components/input/style.js.map +1 -1
  71. package/dist/components/input-number/index.d.ts +366 -5
  72. package/dist/components/input-number/index.js +31 -44
  73. package/dist/components/input-number/index.js.map +1 -1
  74. package/dist/components/input-number/style.js +1 -1
  75. package/dist/components/input-number/style.js.map +1 -1
  76. package/dist/components/layout/index.d.ts +1 -1
  77. package/dist/components/layout/index.js +5 -3
  78. package/dist/components/layout/index.js.map +1 -1
  79. package/dist/components/layout/style.js +1 -1
  80. package/dist/components/layout/style.js.map +1 -1
  81. package/dist/components/option/style.js +1 -1
  82. package/dist/components/option/style.js.map +1 -1
  83. package/dist/components/popover/index.d.ts +1 -0
  84. package/dist/components/popover/index.js +55 -60
  85. package/dist/components/popover/index.js.map +1 -1
  86. package/dist/components/popover/style.js +1 -1
  87. package/dist/components/popover/style.js.map +1 -1
  88. package/dist/components/radio/index.d.ts +366 -5
  89. package/dist/components/radio/index.js +21 -31
  90. package/dist/components/radio/index.js.map +1 -1
  91. package/dist/components/radio/style.js +1 -1
  92. package/dist/components/radio/style.js.map +1 -1
  93. package/dist/components/radio-group/index.d.ts +366 -4
  94. package/dist/components/radio-group/index.js +16 -25
  95. package/dist/components/radio-group/index.js.map +1 -1
  96. package/dist/components/segmented/index.d.ts +366 -4
  97. package/dist/components/segmented/index.js +28 -35
  98. package/dist/components/segmented/index.js.map +1 -1
  99. package/dist/components/segmented/style.js +1 -1
  100. package/dist/components/segmented/style.js.map +1 -1
  101. package/dist/components/segmented-trigger/index.js +17 -15
  102. package/dist/components/segmented-trigger/index.js.map +1 -1
  103. package/dist/components/segmented-trigger/style.js +1 -1
  104. package/dist/components/segmented-trigger/style.js.map +1 -1
  105. package/dist/components/select/index.d.ts +368 -5
  106. package/dist/components/select/index.js +71 -68
  107. package/dist/components/select/index.js.map +1 -1
  108. package/dist/components/select/style.js +1 -1
  109. package/dist/components/select/style.js.map +1 -1
  110. package/dist/components/slider/index.d.ts +366 -5
  111. package/dist/components/slider/index.js +40 -50
  112. package/dist/components/slider/index.js.map +1 -1
  113. package/dist/components/slider/style.js +1 -1
  114. package/dist/components/slider/style.js.map +1 -1
  115. package/dist/components/spinner/style.js +1 -1
  116. package/dist/components/spinner/style.js.map +1 -1
  117. package/dist/components/svg-draw-lines/index.js +1 -1
  118. package/dist/components/svg-draw-lines/index.js.map +1 -1
  119. package/dist/components/switch/index.d.ts +366 -5
  120. package/dist/components/switch/index.js +28 -38
  121. package/dist/components/switch/index.js.map +1 -1
  122. package/dist/components/switch/style.js +1 -1
  123. package/dist/components/switch/style.js.map +1 -1
  124. package/dist/components/textarea/index.d.ts +366 -5
  125. package/dist/components/textarea/index.js +43 -57
  126. package/dist/components/textarea/index.js.map +1 -1
  127. package/dist/components/textarea/style.js +1 -1
  128. package/dist/components/textarea/style.js.map +1 -1
  129. package/dist/components/theme/index.js +1 -1
  130. package/dist/components/theme/index.js.map +1 -1
  131. package/dist/components/theme/style.js +1 -1
  132. package/dist/components/theme/style.js.map +1 -1
  133. package/dist/components/toast/manager.js +2 -2
  134. package/dist/components/toast/manager.js.map +1 -1
  135. package/dist/components/toast/style.js +1 -1
  136. package/dist/components/toast/style.js.map +1 -1
  137. package/dist/components/tooltip/index.d.ts +1 -0
  138. package/dist/components/tooltip/index.js +43 -58
  139. package/dist/components/tooltip/index.js.map +1 -1
  140. package/dist/components/tooltip/style.js +1 -1
  141. package/dist/components/tooltip/style.js.map +1 -1
  142. package/dist/icons/generated/radix-icons-reset.d.ts +6 -0
  143. package/dist/icons/generated/radix-icons-reset.js +10 -0
  144. package/dist/icons/generated/radix-icons-reset.js.map +1 -0
  145. package/dist/icons/index.d.ts +1 -0
  146. package/dist/icons/index.js +2 -1
  147. package/dist/shared/focus/pointer-focus.js +37 -0
  148. package/dist/shared/focus/pointer-focus.js.map +1 -0
  149. package/dist/shared/form-association/index.js +31 -4
  150. package/dist/shared/form-association/index.js.map +1 -1
  151. package/dist/shared/gesture/drag-gesture.js +53 -30
  152. package/dist/shared/gesture/drag-gesture.js.map +1 -1
  153. package/dist/shared/gesture/pinch-gesture.js +84 -0
  154. package/dist/shared/gesture/pinch-gesture.js.map +1 -0
  155. package/dist/shared/group-management/index.js.map +1 -1
  156. package/dist/shared/menu-behavior/index.js +112 -0
  157. package/dist/shared/menu-behavior/index.js.map +1 -0
  158. package/dist/shared/menu-portal/menu-portal.js.map +1 -1
  159. package/dist/shared/open-state/index.js +12 -0
  160. package/dist/shared/open-state/index.js.map +1 -0
  161. package/dist/shared/option-portal/combobox-shell.js +43 -0
  162. package/dist/shared/option-portal/combobox-shell.js.map +1 -0
  163. package/dist/shared/option-portal/index.js +22 -21
  164. package/dist/shared/option-portal/index.js.map +1 -1
  165. package/dist/shared/overlay/anchored-panel.js +33 -30
  166. package/dist/shared/overlay/anchored-panel.js.map +1 -1
  167. package/dist/shared/overlay/composition.js +57 -0
  168. package/dist/shared/overlay/composition.js.map +1 -0
  169. package/dist/shared/overlay/lifecycle.js +41 -0
  170. package/dist/shared/overlay/lifecycle.js.map +1 -0
  171. package/dist/shared/overlay/native-dialog-presence.js +15 -15
  172. package/dist/shared/overlay/native-dialog-presence.js.map +1 -1
  173. package/dist/shared/{theme → overlay}/overlay-root.js +1 -1
  174. package/dist/shared/overlay/overlay-root.js.map +1 -0
  175. package/dist/shared/overlay/overlay.js +43 -41
  176. package/dist/shared/overlay/overlay.js.map +1 -1
  177. package/dist/shared/overlay/placement-props.js +19 -0
  178. package/dist/shared/overlay/placement-props.js.map +1 -0
  179. package/dist/shared/overlay/portal.js +6 -4
  180. package/dist/shared/overlay/portal.js.map +1 -1
  181. package/dist/shared/overlay/positioning-generation.js +20 -0
  182. package/dist/shared/overlay/positioning-generation.js.map +1 -0
  183. package/dist/shared/{theme/theme-scope.js → overlay/theme-overlay-scope.js} +2 -2
  184. package/dist/shared/overlay/theme-overlay-scope.js.map +1 -0
  185. package/package.json +6 -10
  186. package/dist/shared/theme/overlay-root.js.map +0 -1
  187. package/dist/shared/theme/theme-scope.js.map +0 -1
@@ -2,17 +2,17 @@ import e from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/decorate
2
2
  import "../icon/index.js";
3
3
  import t from "../../icons/generated/jam-close-circle-f.js";
4
4
  import n from "../../assets/glass.js";
5
- import { FormAssociationController as r, defineFormAssociation as i } from "../../shared/form-association/index.js";
5
+ import { FormAssociated as r, FormAssociationController as i, defineFormAssociation as a, forwardInputValidity as o } from "../../shared/form-association/index.js";
6
6
  import "../button/index.js";
7
- import a from "./style.js";
8
- import { LitElement as o, html as s, unsafeCSS as c } from "lit";
9
- import { customElement as l, property as u, state as d } from "lit/decorators.js";
10
- import { ifDefined as f } from "lit/directives/if-defined.js";
11
- import { classMap as p } from "lit/directives/class-map.js";
7
+ import s from "./style.js";
8
+ import { LitElement as c, html as l, unsafeCSS as u } from "lit";
9
+ import { customElement as d, property as f, state as p } from "lit/decorators.js";
10
+ import { ifDefined as m } from "lit/directives/if-defined.js";
11
+ import { classMap as h } from "lit/directives/class-map.js";
12
12
  //#region src/components/input/index.ts
13
- var m = class extends o {
13
+ var g = class extends r(c) {
14
14
  constructor(...e) {
15
- super(...e), this.type = "text", this.placeholder = "", this.name = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.clearable = !1, this.full = !1, this.borderless = !1, this.ariaLabel = null, this._value = "", this._focused = !1, this._hasPrefix = !1, this._hasSuffix = !1, this._formAssociation = i({
15
+ super(...e), this.type = "text", this.placeholder = "", this.name = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.clearable = !1, this.full = !1, this.borderless = !1, this.ariaLabel = null, this._value = "", this._focused = !1, this._hasPrefix = !1, this._hasSuffix = !1, this._formAssociation = a({
16
16
  host: this,
17
17
  getState: () => this._value,
18
18
  setState: (e) => {
@@ -24,13 +24,10 @@ var m = class extends o {
24
24
  typeof e == "string" && (this.value = e);
25
25
  },
26
26
  syncValidity: () => this._syncValidity()
27
- }).make(), this._formAssociationController = new r(this, this._formAssociation);
27
+ }).make(), this._formAssociationController = new i(this, this._formAssociation);
28
28
  }
29
29
  static {
30
- this.formAssociated = !0;
31
- }
32
- static {
33
- this.styles = [c(n), c(a)];
30
+ this.styles = [u(n), u(s)];
34
31
  }
35
32
  get value() {
36
33
  return this._value;
@@ -49,24 +46,15 @@ var m = class extends o {
49
46
  }
50
47
  this._syncValidity(), this.toggleAttribute("focused", this._focused);
51
48
  }
52
- formResetCallback() {
53
- this._formAssociation.reset();
54
- }
55
- formDisabledCallback(e) {
56
- this._formAssociation.setDisabled(e);
57
- }
58
- formStateRestoreCallback(e) {
59
- this._formAssociation.restore(e);
60
- }
61
49
  _syncValidity() {
62
50
  let e = this.shadowRoot?.querySelector("input"), t = this._formAssociation.getInternals();
63
- if (!t || !e || typeof t.setValidity != "function") return;
64
- if (this._isDisabled || e.validity.valid) {
65
- t.setValidity({});
66
- return;
67
- }
68
- let n = {};
69
- e.validity.valueMissing && (n.valueMissing = !0), e.validity.typeMismatch && (n.typeMismatch = !0), e.validity.patternMismatch && (n.patternMismatch = !0), e.validity.tooLong && (n.tooLong = !0), e.validity.tooShort && (n.tooShort = !0), t.setValidity(n, e.validationMessage, e);
51
+ !t || !e || typeof t.setValidity != "function" || o(t, e, [
52
+ "valueMissing",
53
+ "typeMismatch",
54
+ "patternMismatch",
55
+ "tooLong",
56
+ "tooShort"
57
+ ], this._isDisabled);
70
58
  }
71
59
  _onSlotChange(e) {
72
60
  if (!(e.target instanceof HTMLSlotElement)) return;
@@ -102,14 +90,14 @@ var m = class extends o {
102
90
  }
103
91
  render() {
104
92
  let e = this.clearable && this._value && !this.readonly;
105
- return s`
93
+ return l`
106
94
  <div class="wui-glass wui-input-inner" @click=${this.focusInput}>
107
- <slot name="prefix" class=${p({ empty: !this._hasPrefix })} @slotchange=${this._onSlotChange}></slot>
95
+ <slot name="prefix" class=${h({ empty: !this._hasPrefix })} @slotchange=${this._onSlotChange}></slot>
108
96
  <input
109
97
  type=${this.type}
110
98
  placeholder=${this.placeholder}
111
99
  name=${this.name}
112
- aria-label=${f(this.ariaLabel)}
100
+ aria-label=${m(this.ariaLabel)}
113
101
  ?disabled=${this._isDisabled}
114
102
  ?readonly=${this.readonly}
115
103
  ?required=${this.required}
@@ -119,7 +107,7 @@ var m = class extends o {
119
107
  @focus=${this.handleFocus}
120
108
  @blur=${this.handleBlur}
121
109
  />
122
- ${e ? s`<web-ui-button
110
+ ${e ? l`<web-ui-button
123
111
  icon
124
112
  variant="ghost"
125
113
  size="24"
@@ -129,46 +117,46 @@ var m = class extends o {
129
117
  >
130
118
  <web-ui-icon .icon=${t}></web-ui-icon>
131
119
  </web-ui-button>` : ""}
132
- <slot name="suffix" class=${p({ empty: !this._hasSuffix })} @slotchange=${this._onSlotChange}></slot>
120
+ <slot name="suffix" class=${h({ empty: !this._hasSuffix })} @slotchange=${this._onSlotChange}></slot>
133
121
  </div>
134
122
  `;
135
123
  }
136
124
  };
137
- e([u({
125
+ e([f({
138
126
  type: String,
139
127
  reflect: !0
140
- })], m.prototype, "type", void 0), e([u({
128
+ })], g.prototype, "type", void 0), e([f({
141
129
  type: String,
142
130
  reflect: !0
143
- })], m.prototype, "placeholder", void 0), e([u({
131
+ })], g.prototype, "placeholder", void 0), e([f({
144
132
  type: String,
145
133
  reflect: !0
146
- })], m.prototype, "name", void 0), e([u({
134
+ })], g.prototype, "name", void 0), e([f({
147
135
  type: Boolean,
148
136
  reflect: !0
149
- })], m.prototype, "disabled", void 0), e([u({
137
+ })], g.prototype, "disabled", void 0), e([f({
150
138
  type: Boolean,
151
139
  reflect: !0
152
- })], m.prototype, "readonly", void 0), e([u({
140
+ })], g.prototype, "readonly", void 0), e([f({
153
141
  type: Boolean,
154
142
  reflect: !0
155
- })], m.prototype, "required", void 0), e([u({
143
+ })], g.prototype, "required", void 0), e([f({
156
144
  type: Boolean,
157
145
  reflect: !0
158
- })], m.prototype, "clearable", void 0), e([u({
146
+ })], g.prototype, "clearable", void 0), e([f({
159
147
  type: Boolean,
160
148
  reflect: !0
161
- })], m.prototype, "full", void 0), e([u({
149
+ })], g.prototype, "full", void 0), e([f({
162
150
  type: Boolean,
163
151
  reflect: !0
164
- })], m.prototype, "borderless", void 0), e([u({
152
+ })], g.prototype, "borderless", void 0), e([f({
165
153
  type: String,
166
154
  attribute: "aria-label"
167
- })], m.prototype, "ariaLabel", void 0), e([d()], m.prototype, "_value", void 0), e([d()], m.prototype, "_focused", void 0), e([d()], m.prototype, "_hasPrefix", void 0), e([d()], m.prototype, "_hasSuffix", void 0), e([u({
155
+ })], g.prototype, "ariaLabel", void 0), e([p()], g.prototype, "_value", void 0), e([p()], g.prototype, "_focused", void 0), e([p()], g.prototype, "_hasPrefix", void 0), e([p()], g.prototype, "_hasSuffix", void 0), e([f({
168
156
  type: String,
169
157
  reflect: !0
170
- })], m.prototype, "value", null), m = e([l("web-ui-input")], m);
158
+ })], g.prototype, "value", null), g = e([d("web-ui-input")], g);
171
159
  //#endregion
172
- export { m as WebUiInput };
160
+ export { g as WebUiInput };
173
161
 
174
162
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/input/index.ts"],"sourcesContent":["import { html, LitElement, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport '@/components/icon'\nimport '@/components/button'\nimport glass from '@/assets/glass.css?inline'\nimport { jamCloseCircleF } from '@/icons'\nimport { defineFormAssociation, FormAssociationController } from '@/shared/form-association'\n\nimport style from './style.css?inline'\n\n@customElement('web-ui-input')\nexport class WebUiInput extends LitElement {\n static formAssociated = true\n static override styles = [unsafeCSS(glass), unsafeCSS(style)]\n\n @property({ type: String, reflect: true }) type = 'text'\n @property({ type: String, reflect: true }) placeholder = ''\n @property({ type: String, reflect: true }) name = ''\n @property({ type: Boolean, reflect: true }) disabled = false\n @property({ type: Boolean, reflect: true }) readonly = false\n @property({ type: Boolean, reflect: true }) required = false\n @property({ type: Boolean, reflect: true }) clearable = false\n @property({ type: Boolean, reflect: true }) full = false\n @property({ type: Boolean, reflect: true }) borderless = false\n @property({ type: String, attribute: 'aria-label' }) override ariaLabel: string | null = null\n\n @state() private _value = ''\n @state() private _focused = false\n @state() private _hasPrefix = false\n @state() private _hasSuffix = false\n\n @property({ type: String, reflect: true })\n get value(): string {\n return this._value\n }\n\n set value(v: string) {\n const old = this._value\n this._value = v\n this._formAssociation.sync()\n this.requestUpdate('value', old)\n }\n\n private get _isDisabled(): boolean {\n return this.disabled || this._formAssociation.isFormDisabled()\n }\n\n private readonly _formAssociation = defineFormAssociation<string>({\n host: this,\n getState: () => this._value,\n setState: value => {\n this.value = value\n },\n getFormValue: () => this._value,\n getFormState: () => this._value,\n restoreState: state => {\n if (typeof state === 'string') this.value = state\n },\n syncValidity: () => this._syncValidity()\n }).make()\n\n private readonly _formAssociationController = new FormAssociationController(this, this._formAssociation)\n\n override updated(changed: Map<string, unknown>) {\n if (changed.has('_value')) {\n const input = this.shadowRoot?.querySelector('input')\n if (input && input.value !== this._value) {\n input.value = this._value\n }\n }\n this._syncValidity()\n this.toggleAttribute('focused', this._focused)\n }\n\n formResetCallback() {\n this._formAssociation.reset()\n }\n\n formDisabledCallback(disabled: boolean) {\n this._formAssociation.setDisabled(disabled)\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this._formAssociation.restore(state)\n }\n\n private _syncValidity() {\n const input = this.shadowRoot?.querySelector('input')\n const internals = this._formAssociation.getInternals()\n if (!internals || !input || typeof internals.setValidity !== 'function') return\n if (this._isDisabled || input.validity.valid) {\n internals.setValidity({})\n return\n }\n\n const flags: ValidityStateFlags = {}\n if (input.validity.valueMissing) flags.valueMissing = true\n if (input.validity.typeMismatch) flags.typeMismatch = true\n if (input.validity.patternMismatch) flags.patternMismatch = true\n if (input.validity.tooLong) flags.tooLong = true\n if (input.validity.tooShort) flags.tooShort = true\n internals.setValidity(flags, input.validationMessage, input)\n }\n\n private _onSlotChange(e: Event) {\n if (!(e.target instanceof HTMLSlotElement)) return\n const slot = e.target\n const hasContent = slot.assignedElements().length > 0\n if (slot.name === 'prefix') this._hasPrefix = hasContent\n if (slot.name === 'suffix') this._hasSuffix = hasContent\n }\n\n private handleInput(e: Event) {\n if (this._isDisabled || this.readonly) return\n if (!(e.target instanceof HTMLInputElement)) return\n this._value = e.target.value\n this._formAssociation.sync()\n }\n\n // 原生 change 不 composed,被 shadow root 挡住;这里补发 composed 事件,\n // 兑现 $events/README 声明的公共 change 契约。\n private handleNativeChange(e: Event) {\n if (this.readonly) return\n if (!(e.target instanceof HTMLInputElement)) return\n this._value = e.target.value\n this._formAssociation.sync()\n this.dispatchEvent(new Event('change', { bubbles: true, composed: true }))\n }\n\n private handleFocus() {\n if (!this._isDisabled) this._focused = true\n }\n\n private handleBlur() {\n this._focused = false\n }\n\n private handleClear() {\n if (this._isDisabled || this.readonly) return\n this._value = ''\n this._formAssociation.sync()\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }))\n }\n\n private preventMouseDownBlur(e: Event) {\n e.preventDefault()\n }\n\n private focusInput() {\n if (this._isDisabled) return\n this.shadowRoot?.querySelector('input')?.focus()\n }\n\n override render() {\n // readonly 下不可清除:清空按钮会修改值,与只读语义冲突\n const showClear = this.clearable && this._value && !this.readonly\n\n return html`\n <div class=\"wui-glass wui-input-inner\" @click=${this.focusInput}>\n <slot name=\"prefix\" class=${classMap({ empty: !this._hasPrefix })} @slotchange=${this._onSlotChange}></slot>\n <input\n type=${this.type}\n placeholder=${this.placeholder}\n name=${this.name}\n aria-label=${ifDefined(this.ariaLabel)}\n ?disabled=${this._isDisabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${this._value}\n @input=${this.handleInput}\n @change=${this.handleNativeChange}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n ${\n showClear\n ? html`<web-ui-button\n icon\n variant=\"ghost\"\n size=\"24\"\n aria-label=\"清除\"\n @pointerdown=${this.preventMouseDownBlur}\n @click=${this.handleClear}\n >\n <web-ui-icon .icon=${jamCloseCircleF}></web-ui-icon>\n </web-ui-button>`\n : ''\n }\n <slot name=\"suffix\" class=${classMap({ empty: !this._hasSuffix })} @slotchange=${this._onSlotChange}></slot>\n </div>\n `\n }\n\n declare readonly $events: {\n input: Event\n change: Event\n focus: FocusEvent\n blur: FocusEvent\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'web-ui-input': WebUiInput\n }\n}\n"],"mappings":";;;;;;;;;;;;AAcO,IAAM,IAAN,cAAyB,EAAW;;EAkDK,aA9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AE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GACzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GACzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GACzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GACzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GACzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GACzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAElD,EAAA,CAAA,EAAM,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GACN,EAAA,CAAA,EAAM,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GACN,EAAA,CAAA,EAAM,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GACN,EAAA,CAAA,EAAM,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GAEN,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,IAAA,GArB1C,IAAA,EAAA,CAAA,EAAc,cAAc,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/input/index.ts"],"sourcesContent":["import { html, LitElement, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport '@/components/icon'\nimport '@/components/button'\nimport glass from '@/assets/glass.css?inline'\nimport { jamCloseCircleF } from '@/icons'\nimport {\n FormAssociated,\n defineFormAssociation,\n forwardInputValidity,\n FormAssociationController\n} from '@/shared/form-association'\n\nimport style from './style.css?inline'\n\n@customElement('web-ui-input')\nexport class WebUiInput extends FormAssociated(LitElement) {\n static override styles = [unsafeCSS(glass), unsafeCSS(style)]\n\n @property({ type: String, reflect: true }) type = 'text'\n @property({ type: String, reflect: true }) placeholder = ''\n @property({ type: String, reflect: true }) name = ''\n @property({ type: Boolean, reflect: true }) disabled = false\n @property({ type: Boolean, reflect: true }) readonly = false\n @property({ type: Boolean, reflect: true }) required = false\n @property({ type: Boolean, reflect: true }) clearable = false\n @property({ type: Boolean, reflect: true }) full = false\n @property({ type: Boolean, reflect: true }) borderless = false\n @property({ type: String, attribute: 'aria-label' }) override ariaLabel: string | null = null\n\n @state() private _value = ''\n @state() private _focused = false\n @state() private _hasPrefix = false\n @state() private _hasSuffix = false\n\n @property({ type: String, reflect: true })\n get value(): string {\n return this._value\n }\n\n set value(v: string) {\n const old = this._value\n this._value = v\n this._formAssociation.sync()\n this.requestUpdate('value', old)\n }\n\n private get _isDisabled(): boolean {\n return this.disabled || this._formAssociation.isFormDisabled()\n }\n\n private readonly _formAssociation = defineFormAssociation<string>({\n host: this,\n getState: () => this._value,\n setState: value => {\n this.value = value\n },\n getFormValue: () => this._value,\n getFormState: () => this._value,\n restoreState: state => {\n if (typeof state === 'string') this.value = state\n },\n syncValidity: () => this._syncValidity()\n }).make()\n\n private readonly _formAssociationController = new FormAssociationController(this, this._formAssociation)\n\n override updated(changed: Map<string, unknown>) {\n if (changed.has('_value')) {\n const input = this.shadowRoot?.querySelector('input')\n if (input && input.value !== this._value) {\n input.value = this._value\n }\n }\n this._syncValidity()\n this.toggleAttribute('focused', this._focused)\n }\n\n private _syncValidity() {\n const input = this.shadowRoot?.querySelector('input')\n const internals = this._formAssociation.getInternals()\n if (!internals || !input || typeof internals.setValidity !== 'function') return\n forwardInputValidity(\n internals,\n input,\n ['valueMissing', 'typeMismatch', 'patternMismatch', 'tooLong', 'tooShort'],\n this._isDisabled\n )\n }\n\n private _onSlotChange(e: Event) {\n if (!(e.target instanceof HTMLSlotElement)) return\n const slot = e.target\n const hasContent = slot.assignedElements().length > 0\n if (slot.name === 'prefix') this._hasPrefix = hasContent\n if (slot.name === 'suffix') this._hasSuffix = hasContent\n }\n\n private handleInput(e: Event) {\n if (this._isDisabled || this.readonly) return\n if (!(e.target instanceof HTMLInputElement)) return\n this._value = e.target.value\n this._formAssociation.sync()\n }\n\n // 原生 change 不 composed,被 shadow root 挡住;这里补发 composed 事件,\n // 兑现 $events/README 声明的公共 change 契约。\n private handleNativeChange(e: Event) {\n if (this.readonly) return\n if (!(e.target instanceof HTMLInputElement)) return\n this._value = e.target.value\n this._formAssociation.sync()\n this.dispatchEvent(new Event('change', { bubbles: true, composed: true }))\n }\n\n private handleFocus() {\n if (!this._isDisabled) this._focused = true\n }\n\n private handleBlur() {\n this._focused = false\n }\n\n private handleClear() {\n if (this._isDisabled || this.readonly) return\n this._value = ''\n this._formAssociation.sync()\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }))\n }\n\n private preventMouseDownBlur(e: Event) {\n e.preventDefault()\n }\n\n private focusInput() {\n if (this._isDisabled) return\n this.shadowRoot?.querySelector('input')?.focus()\n }\n\n override render() {\n // readonly 下不可清除:清空按钮会修改值,与只读语义冲突\n const showClear = this.clearable && this._value && !this.readonly\n\n return html`\n <div class=\"wui-glass wui-input-inner\" @click=${this.focusInput}>\n <slot name=\"prefix\" class=${classMap({ empty: !this._hasPrefix })} @slotchange=${this._onSlotChange}></slot>\n <input\n type=${this.type}\n placeholder=${this.placeholder}\n name=${this.name}\n aria-label=${ifDefined(this.ariaLabel)}\n ?disabled=${this._isDisabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${this._value}\n @input=${this.handleInput}\n @change=${this.handleNativeChange}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n ${\n showClear\n ? html`<web-ui-button\n icon\n variant=\"ghost\"\n size=\"24\"\n aria-label=\"清除\"\n @pointerdown=${this.preventMouseDownBlur}\n @click=${this.handleClear}\n >\n <web-ui-icon .icon=${jamCloseCircleF}></web-ui-icon>\n </web-ui-button>`\n : ''\n }\n <slot name=\"suffix\" class=${classMap({ empty: !this._hasSuffix })} @slotchange=${this._onSlotChange}></slot>\n </div>\n `\n }\n\n declare readonly $events: {\n input: Event\n change: Event\n focus: FocusEvent\n blur: FocusEvent\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'web-ui-input': WebUiInput\n }\n}\n"],"mappings":";;;;;;;;;;;;AAmBO,IAAM,IAAN,cAAyB,EAAe,CAAU,CAAC,CAAC;;EAiDX,aA9CI,KAAA,OAAA,QACO,KAAA,cAAA,IACP,KAAA,OAAA,IACK,KAAA,WAAA,IACA,KAAA,WAAA,IACA,KAAA,WAAA,IACC,KAAA,YAAA,IACL,KAAA,OAAA,IACM,KAAA,aAAA,IACgC,KAAA,YAAA,MAE/D,KAAA,SAAA,IACE,KAAA,WAAA,IACE,KAAA,aAAA,IACA,KAAA,aAAA,IAkBM,KAAA,mBAAA,EAA8B;GAChE,MAAM;GACN,gBAAgB,KAAK;GACrB,WAAU,MAAS;IACjB,KAAK,QAAQ;GACf;GACA,oBAAoB,KAAK;GACzB,oBAAoB,KAAK;GACzB,eAAc,MAAS;IACrB,AAAI,OAAO,KAAU,aAAU,KAAK,QAAQ;GAC9C;GACA,oBAAoB,KAAK,cAAc;EACzC,CAAC,CAAC,CAAC,KAAK,GAEsC,KAAA,6BAAA,IAAI,EAA0B,MAAM,KAAK,gBAAgB;;;EAhD9E,KAAA,SAAA,CAAC,EAAU,CAAK,GAAG,EAAU,CAAK,CAAC;;CAkB5D,IACI,QAAgB;EAClB,OAAO,KAAK;CACd;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css?inline
2
- var e = "*,:before,:after{box-sizing:border-box}:host{--wui-input-clear-color:var(--wui-color-text-tertiary,#1b1b1b59);display:inline-block}:host([disabled]){cursor:not-allowed;opacity:.4}.wui-input-inner{--wui-glass-corner-radius:calc(var(--wui-control-size,36px) / 2);box-sizing:border-box;width:var(--wui-input-width,200px);min-width:var(--wui-control-size,36px);height:var(--wui-control-size,36px);transition:border-color var(--wui-duration-focus,.2s), box-shadow var(--wui-duration-focus,.2s);border-radius:2147483647px;align-items:center;gap:8px;padding:0 12px;display:flex;position:relative}:host([full]){display:block}:host([full]) .wui-input-inner{width:100%}:host([borderless]) .wui-input-inner{-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none;background:0 0;border:none}:host([borderless]) .wui-input-inner:before{content:none}:host([focused]) .wui-input-inner{--wui-internal-glass-focus-ring:inset 0 0 0 1px var(--wui-color-accent,#08f), 0 0 0 var(--wui-focus-ring-width,3px) var(--wui-color-focus-ring,#08f6)}:host([borderless][focused]) .wui-input-inner{box-shadow:var(--wui-internal-glass-focus-ring,0 0 0 0 transparent)}input{min-width:0;height:100%;font:inherit;font-size:var(--wui-font-size,14px);color:var(--wui-color-text,#1b1b1b);background:0 0;border:none;outline:none;flex:1;margin:0;padding:0}input::placeholder{color:var(--wui-color-text-secondary,#6a6a6a)}input:disabled{cursor:not-allowed;opacity:.4}slot{font-size:var(--wui-font-size,14px);color:var(--wui-color-text-secondary,#6a6a6a);flex-shrink:0;align-items:center;display:flex}slot.empty{display:none}.wui-input-inner web-ui-button[variant=ghost]{--wui-button-color:var(--wui-input-clear-color);margin-left:-8px;margin-right:-4px}";
2
+ var e = "*,:before,:after{box-sizing:border-box}:host{--wui-input-clear-color:var(--wui-color-text-tertiary,color-mix(in srgb, var(--wui-color-text) 35%, transparent));display:inline-block}:host([disabled]){cursor:not-allowed;opacity:.4}.wui-input-inner{--wui-glass-corner-radius:calc(var(--wui-control-size,36px) / 2);box-sizing:border-box;width:var(--wui-input-width,200px);min-width:var(--wui-control-size,36px);height:var(--wui-control-size,36px);border-radius:var(--wui-radius-control,calc(infinity * 1px));align-items:center;gap:8px;padding:0 12px;display:flex;position:relative}:host([full]){display:block}:host([full]) .wui-input-inner{width:100%}:host([borderless]) .wui-input-inner{-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none;background:0 0;border:none}:host([borderless]) .wui-input-inner:before{content:none}.wui-input-inner:after{pointer-events:none;content:\"\";border-radius:inherit;box-shadow:inset 0 0 0 1px transparent, 0 0 0 var(--wui-focus-ring-width,3px) transparent;transition:box-shadow var(--wui-duration-focus,.2s);position:absolute;inset:0}:host([focused]) .wui-input-inner:after{box-shadow:inset 0 0 0 1px var(--wui-color-accent,#08f), 0 0 0 var(--wui-focus-ring-width,3px) var(--wui-color-focus-ring,#08f6)}input{min-width:0;height:100%;font:inherit;font-size:var(--wui-font-size,14px);color:var(--wui-color-text,#1b1b1b);background:0 0;border:none;outline:none;flex:1;margin:0;padding:0}input::placeholder{color:var(--wui-color-text-secondary,#6a6a6a)}input:disabled{cursor:not-allowed;opacity:.4}@media (pointer:coarse){input{font-size:max(16px, var(--wui-font-size,14px))}}slot{font-size:var(--wui-font-size,14px);color:var(--wui-color-text-secondary,#6a6a6a);flex-shrink:0;align-items:center;display:flex}slot.empty{display:none}.wui-input-inner web-ui-button[variant=ghost]{--wui-button-color:var(--wui-input-clear-color);margin-left:-8px;margin-right:-4px}";
3
3
  //#endregion
4
4
  export { e as default };
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/input/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n --wui-input-clear-color: var(--wui-color-text-tertiary, rgb(27 27 27 / 0.35));\n display: inline-block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.wui-input-inner {\n --wui-glass-corner-radius: calc(var(--wui-control-size, 36px) / 2);\n position: relative;\n\n display: flex;\n gap: 8px;\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 height: var(--wui-control-size, 36px);\n padding: 0 12px;\n border-radius: calc(infinity * 1px);\n\n transition:\n border-color var(--wui-duration-focus, 200ms),\n box-shadow var(--wui-duration-focus, 200ms);\n}\n\n:host([full]) {\n display: block;\n}\n\n:host([full]) .wui-input-inner {\n width: 100%;\n}\n\n/* ===== Borderless ===== */\n\n:host([borderless]) .wui-input-inner {\n border: none;\n\n background: transparent;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow: none;\n}\n\n/* borderless 必须移除 glass 描边环(.wui-glass::before 底环 + 对角光泽),\n 否则无框后仍残留 1px 胶囊描边 */\n:host([borderless]) .wui-input-inner::before {\n content: none;\n}\n\n:host([focused]) .wui-input-inner {\n --wui-internal-glass-focus-ring:\n inset 0 0 0 1px var(--wui-color-accent, #08f),\n 0 0 0 var(--wui-focus-ring-width, 3px) var(--wui-color-focus-ring, rgb(0 136 255 / 0.4));\n}\n\n/* borderless 基线的 box-shadow: none 压掉了 .wui-glass 的整列阴影,\n 聚焦时改为直接消费 focus ring 变量,与 normal 变体同款并走既有 box-shadow 过渡 */\n:host([borderless][focused]) .wui-input-inner {\n box-shadow: var(--wui-internal-glass-focus-ring, 0 0 0 0 transparent);\n}\n\n/* ===== Input ===== */\n\ninput {\n flex: 1;\n\n min-width: 0;\n height: 100%;\n margin: 0;\n padding: 0;\n border: none;\n\n /* 表单控件不继承字体;显式继承以对齐宿主排版,避免 UA 默认字体差异 */\n font: inherit;\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text, #1b1b1b);\n\n background: transparent;\n outline: none;\n\n &::placeholder {\n color: var(--wui-color-text-secondary, #6a6a6a);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n }\n}\n\n/* ===== Prefix / Suffix ===== */\n\nslot {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n/* slot 无 slotted 内容时折叠 */\nslot.empty {\n display: none;\n}\n\n/* ===== Clear button ===== */\n\n/* 复用 web-ui-button icon ghost:仅覆盖颜色为 faint,保持弱意图清除图标观感;\n 负 margin-left 抵消容器 flex gap,让清除按钮紧贴输入文本\n 负 margin-right 抵消 button padding,让清除按钮右侧 spacing 视觉上协调 */\n.wui-input-inner web-ui-button[variant='ghost'] {\n --wui-button-color: var(--wui-input-clear-color);\n margin-right: -4px;\n margin-left: -8px;\n}\n\n/* ===== Disabled ===== */\n"],"mappings":""}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/input/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n --wui-input-clear-color: var(--wui-color-text-tertiary, color-mix(in srgb, var(--wui-color-text) 35%, transparent));\n display: inline-block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.wui-input-inner {\n --wui-glass-corner-radius: calc(var(--wui-control-size, 36px) / 2);\n position: relative;\n\n display: flex;\n gap: 8px;\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 height: var(--wui-control-size, 36px);\n padding: 0 12px;\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n}\n\n:host([full]) {\n display: block;\n}\n\n:host([full]) .wui-input-inner {\n width: 100%;\n}\n\n/* ===== Borderless ===== */\n\n:host([borderless]) .wui-input-inner {\n border: none;\n\n background: transparent;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow: none;\n}\n\n/* borderless 必须移除 glass 描边环(.wui-glass::before 底环 + 对角光泽),\n 否则无框后仍残留 1px 胶囊描边 */\n:host([borderless]) .wui-input-inner::before {\n content: none;\n}\n\n/* Focus ring 独立成 ::after 层:base/focused 都是显式 box-shadow,保证所有变体都能过渡 */\n.wui-input-inner::after {\n pointer-events: none;\n content: '';\n\n position: absolute;\n inset: 0;\n\n border-radius: inherit;\n\n box-shadow:\n inset 0 0 0 1px transparent,\n 0 0 0 var(--wui-focus-ring-width, 3px) transparent;\n\n transition: box-shadow var(--wui-duration-focus, 200ms);\n}\n\n:host([focused]) .wui-input-inner::after {\n box-shadow:\n inset 0 0 0 1px var(--wui-color-accent, #08f),\n 0 0 0 var(--wui-focus-ring-width, 3px) var(--wui-color-focus-ring, rgb(0 136 255 / 0.4));\n}\n\n/* ===== Input ===== */\n\ninput {\n flex: 1;\n\n min-width: 0;\n height: 100%;\n margin: 0;\n padding: 0;\n border: none;\n\n /* 表单控件不继承字体;显式继承以对齐宿主排版,避免 UA 默认字体差异 */\n font: inherit;\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text, #1b1b1b);\n\n background: transparent;\n outline: none;\n\n &::placeholder {\n color: var(--wui-color-text-secondary, #6a6a6a);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n }\n}\n\n/* Coarse pointers include iOS Safari, where a sub-16px font triggers focus zoom. */\n@media (pointer: coarse) {\n input {\n font-size: max(16px, var(--wui-font-size, 14px));\n }\n}\n\n/* ===== Prefix / Suffix ===== */\n\nslot {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n/* slot 无 slotted 内容时折叠 */\nslot.empty {\n display: none;\n}\n\n/* ===== Clear button ===== */\n\n/* 复用 web-ui-button icon ghost:仅覆盖颜色为 faint,保持弱意图清除图标观感;\n 负 margin-left 抵消容器 flex gap,让清除按钮紧贴输入文本\n 负 margin-right 抵消 button padding,让清除按钮右侧 spacing 视觉上协调 */\n.wui-input-inner web-ui-button[variant='ghost'] {\n --wui-button-color: var(--wui-input-clear-color);\n margin-right: -4px;\n margin-left: -8px;\n}\n\n/* ===== Disabled ===== */\n"],"mappings":""}
@@ -1,6 +1,369 @@
1
1
  import { LitElement } from 'lit';
2
- export declare class WebUiInputNumber extends LitElement {
3
- static formAssociated: boolean;
2
+ declare const WebUiInputNumber_base: {
3
+ new (...args: any[]): {
4
+ formResetCallback(): void;
5
+ formDisabledCallback(disabled: boolean): void;
6
+ formStateRestoreCallback(state: File | FormData | string | null): void;
7
+ accessKey: string;
8
+ readonly accessKeyLabel: string;
9
+ autocapitalize: string;
10
+ autocorrect: boolean;
11
+ dir: string;
12
+ draggable: boolean;
13
+ hidden: boolean | "until-found";
14
+ inert: boolean;
15
+ innerText: string;
16
+ lang: string;
17
+ readonly offsetHeight: number;
18
+ readonly offsetLeft: number;
19
+ readonly offsetParent: Element | null;
20
+ readonly offsetTop: number;
21
+ readonly offsetWidth: number;
22
+ outerText: string;
23
+ popover: string | null;
24
+ spellcheck: boolean;
25
+ title: string;
26
+ translate: boolean;
27
+ writingSuggestions: string;
28
+ attachInternals(): ElementInternals;
29
+ click(): void;
30
+ hidePopover(): void;
31
+ showPopover(options?: ShowPopoverOptions): void;
32
+ togglePopover(options?: TogglePopoverOptions | boolean): boolean;
33
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
34
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
35
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
36
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
37
+ readonly attributes: NamedNodeMap;
38
+ get classList(): DOMTokenList;
39
+ set classList(value: string);
40
+ className: string;
41
+ readonly clientHeight: number;
42
+ readonly clientLeft: number;
43
+ readonly clientTop: number;
44
+ readonly clientWidth: number;
45
+ readonly currentCSSZoom: number;
46
+ readonly customElementRegistry: CustomElementRegistry | null;
47
+ id: string;
48
+ innerHTML: string;
49
+ readonly localName: string;
50
+ readonly namespaceURI: string | null;
51
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
52
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
53
+ outerHTML: string;
54
+ readonly ownerDocument: Document;
55
+ get part(): DOMTokenList;
56
+ set part(value: string);
57
+ readonly prefix: string | null;
58
+ readonly scrollHeight: number;
59
+ scrollLeft: number;
60
+ scrollTop: number;
61
+ readonly scrollWidth: number;
62
+ readonly shadowRoot: ShadowRoot | null;
63
+ slot: string;
64
+ readonly tagName: string;
65
+ attachShadow(init: ShadowRootInit): ShadowRoot;
66
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
67
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
68
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
69
+ closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
70
+ closest<E extends Element = Element>(selectors: string): E | null;
71
+ computedStyleMap(): StylePropertyMapReadOnly;
72
+ getAttribute(qualifiedName: string): string | null;
73
+ getAttributeNS(namespace: string | null, localName: string): string | null;
74
+ getAttributeNames(): string[];
75
+ getAttributeNode(qualifiedName: string): Attr | null;
76
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
77
+ getBoundingClientRect(): DOMRect;
78
+ getClientRects(): DOMRectList;
79
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
80
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
81
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
82
+ getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
83
+ getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
84
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
85
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
86
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
87
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
88
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
89
+ getHTML(options?: GetHTMLOptions): string;
90
+ hasAttribute(qualifiedName: string): boolean;
91
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
92
+ hasAttributes(): boolean;
93
+ hasPointerCapture(pointerId: number): boolean;
94
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
95
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
96
+ insertAdjacentText(where: InsertPosition, data: string): void;
97
+ matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
98
+ matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
99
+ matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
100
+ matches(selectors: string): boolean;
101
+ releasePointerCapture(pointerId: number): void;
102
+ removeAttribute(qualifiedName: string): void;
103
+ removeAttributeNS(namespace: string | null, localName: string): void;
104
+ removeAttributeNode(attr: Attr): Attr;
105
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
106
+ requestPointerLock(options?: PointerLockOptions): Promise<void>;
107
+ scroll(options?: ScrollToOptions): void;
108
+ scroll(x: number, y: number): void;
109
+ scrollBy(options?: ScrollToOptions): void;
110
+ scrollBy(x: number, y: number): void;
111
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
112
+ scrollTo(options?: ScrollToOptions): void;
113
+ scrollTo(x: number, y: number): void;
114
+ setAttribute(qualifiedName: string, value: string): void;
115
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
116
+ setAttributeNode(attr: Attr): Attr | null;
117
+ setAttributeNodeNS(attr: Attr): Attr | null;
118
+ setHTMLUnsafe(html: string): void;
119
+ setPointerCapture(pointerId: number): void;
120
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
121
+ webkitMatchesSelector(selectors: string): boolean;
122
+ get textContent(): string;
123
+ set textContent(value: string | null);
124
+ readonly baseURI: string;
125
+ readonly childNodes: NodeListOf<ChildNode>;
126
+ readonly firstChild: ChildNode | null;
127
+ readonly isConnected: boolean;
128
+ readonly lastChild: ChildNode | null;
129
+ readonly nextSibling: ChildNode | null;
130
+ readonly nodeName: string;
131
+ readonly nodeType: number;
132
+ nodeValue: string | null;
133
+ readonly parentElement: HTMLElement | null;
134
+ readonly parentNode: ParentNode | null;
135
+ readonly previousSibling: ChildNode | null;
136
+ appendChild<T extends Node>(node: T): T;
137
+ cloneNode(subtree?: boolean): Node;
138
+ compareDocumentPosition(other: Node): number;
139
+ contains(other: Node | null): boolean;
140
+ getRootNode(options?: GetRootNodeOptions): Node;
141
+ hasChildNodes(): boolean;
142
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
143
+ isDefaultNamespace(namespace: string | null): boolean;
144
+ isEqualNode(otherNode: Node | null): boolean;
145
+ isSameNode(otherNode: Node | null): boolean;
146
+ lookupNamespaceURI(prefix: string | null): string | null;
147
+ lookupPrefix(namespace: string | null): string | null;
148
+ normalize(): void;
149
+ removeChild<T extends Node>(child: T): T;
150
+ replaceChild<T extends Node>(node: Node, child: T): T;
151
+ readonly ELEMENT_NODE: 1;
152
+ readonly ATTRIBUTE_NODE: 2;
153
+ readonly TEXT_NODE: 3;
154
+ readonly CDATA_SECTION_NODE: 4;
155
+ readonly ENTITY_REFERENCE_NODE: 5;
156
+ readonly ENTITY_NODE: 6;
157
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
158
+ readonly COMMENT_NODE: 8;
159
+ readonly DOCUMENT_NODE: 9;
160
+ readonly DOCUMENT_TYPE_NODE: 10;
161
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
162
+ readonly NOTATION_NODE: 12;
163
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
164
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
165
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
166
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
167
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
168
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
169
+ dispatchEvent(event: Event): boolean;
170
+ ariaActiveDescendantElement: Element | null;
171
+ ariaAtomic: string | null;
172
+ ariaAutoComplete: string | null;
173
+ ariaBrailleLabel: string | null;
174
+ ariaBrailleRoleDescription: string | null;
175
+ ariaBusy: string | null;
176
+ ariaChecked: string | null;
177
+ ariaColCount: string | null;
178
+ ariaColIndex: string | null;
179
+ ariaColIndexText: string | null;
180
+ ariaColSpan: string | null;
181
+ ariaControlsElements: ReadonlyArray<Element> | null;
182
+ ariaCurrent: string | null;
183
+ ariaDescribedByElements: ReadonlyArray<Element> | null;
184
+ ariaDescription: string | null;
185
+ ariaDetailsElements: ReadonlyArray<Element> | null;
186
+ ariaDisabled: string | null;
187
+ ariaErrorMessageElements: ReadonlyArray<Element> | null;
188
+ ariaExpanded: string | null;
189
+ ariaFlowToElements: ReadonlyArray<Element> | null;
190
+ ariaHasPopup: string | null;
191
+ ariaHidden: string | null;
192
+ ariaInvalid: string | null;
193
+ ariaKeyShortcuts: string | null;
194
+ ariaLabel: string | null;
195
+ ariaLabelledByElements: ReadonlyArray<Element> | null;
196
+ ariaLevel: string | null;
197
+ ariaLive: string | null;
198
+ ariaModal: string | null;
199
+ ariaMultiLine: string | null;
200
+ ariaMultiSelectable: string | null;
201
+ ariaOrientation: string | null;
202
+ ariaOwnsElements: ReadonlyArray<Element> | null;
203
+ ariaPlaceholder: string | null;
204
+ ariaPosInSet: string | null;
205
+ ariaPressed: string | null;
206
+ ariaReadOnly: string | null;
207
+ ariaRelevant: string | null;
208
+ ariaRequired: string | null;
209
+ ariaRoleDescription: string | null;
210
+ ariaRowCount: string | null;
211
+ ariaRowIndex: string | null;
212
+ ariaRowIndexText: string | null;
213
+ ariaRowSpan: string | null;
214
+ ariaSelected: string | null;
215
+ ariaSetSize: string | null;
216
+ ariaSort: string | null;
217
+ ariaValueMax: string | null;
218
+ ariaValueMin: string | null;
219
+ ariaValueNow: string | null;
220
+ ariaValueText: string | null;
221
+ role: string | null;
222
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
223
+ getAnimations(options?: GetAnimationsOptions): Animation[];
224
+ after(...nodes: (Node | string)[]): void;
225
+ before(...nodes: (Node | string)[]): void;
226
+ remove(): void;
227
+ replaceWith(...nodes: (Node | string)[]): void;
228
+ readonly nextElementSibling: Element | null;
229
+ readonly previousElementSibling: Element | null;
230
+ readonly childElementCount: number;
231
+ readonly children: HTMLCollection;
232
+ readonly firstElementChild: Element | null;
233
+ readonly lastElementChild: Element | null;
234
+ append(...nodes: (Node | string)[]): void;
235
+ moveBefore(node: Node, child: Node | null): void;
236
+ prepend(...nodes: (Node | string)[]): void;
237
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
238
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
239
+ querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
240
+ querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
241
+ querySelector<E extends Element = Element>(selectors: string): E | null;
242
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
243
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
244
+ querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
245
+ querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
246
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
247
+ replaceChildren(...nodes: (Node | string)[]): void;
248
+ readonly assignedSlot: HTMLSlotElement | null;
249
+ readonly attributeStyleMap: StylePropertyMap;
250
+ get style(): CSSStyleDeclaration;
251
+ set style(cssText: string);
252
+ contentEditable: string;
253
+ enterKeyHint: string;
254
+ inputMode: string;
255
+ readonly isContentEditable: boolean;
256
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
257
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
258
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
259
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
260
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
261
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
262
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
263
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
265
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
266
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
267
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
268
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
271
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
+ oncommand: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
275
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
276
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
277
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
278
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
279
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
280
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
281
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
282
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
283
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
284
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
285
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
286
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
287
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
288
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
289
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
290
+ onerror: OnErrorEventHandler;
291
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
292
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
293
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
294
+ oninput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
295
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
297
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
298
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
299
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
302
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
303
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
304
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
305
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
306
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
307
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
308
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
309
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
310
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
311
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
312
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
315
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
316
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
317
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
319
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
320
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
321
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
322
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
323
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
324
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
325
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
326
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
327
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
328
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
329
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
330
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
331
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
332
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
333
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
334
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
335
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
336
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
339
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
340
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
342
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
343
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
344
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
345
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
346
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
347
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
348
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
349
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
350
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
351
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
353
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
354
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
355
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
356
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
357
+ autofocus: boolean;
358
+ readonly dataset: DOMStringMap;
359
+ nonce: string;
360
+ tabIndex: number;
361
+ blur(): void;
362
+ focus(options?: FocusOptions): void;
363
+ };
364
+ formAssociated: boolean;
365
+ } & typeof LitElement;
366
+ export declare class WebUiInputNumber extends WebUiInputNumber_base {
4
367
  static styles: import('lit').CSSResult[];
5
368
  placeholder: string;
6
369
  name: string;
@@ -29,9 +392,6 @@ export declare class WebUiInputNumber extends LitElement {
29
392
  private get atMax();
30
393
  private readonly _formAssociation;
31
394
  private readonly _formAssociationController;
32
- formResetCallback(): void;
33
- formDisabledCallback(disabled: boolean): void;
34
- formStateRestoreCallback(state: string | File | FormData | null): void;
35
395
  updated(): void;
36
396
  private _syncValidity;
37
397
  private clamp;
@@ -54,3 +414,4 @@ declare global {
54
414
  'web-ui-input-number': WebUiInputNumber;
55
415
  }
56
416
  }
417
+ export {};