@varlet/ui 3.3.15 → 3.4.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 (39) hide show
  1. package/es/auto-complete/AutoComplete.mjs +352 -0
  2. package/es/auto-complete/AutoCompleteSfc.css +0 -0
  3. package/es/auto-complete/autoComplete.css +1 -0
  4. package/es/auto-complete/index.mjs +11 -0
  5. package/es/auto-complete/props.mjs +63 -0
  6. package/es/auto-complete/provide.mjs +0 -0
  7. package/es/auto-complete/style/index.mjs +11 -0
  8. package/es/checkbox-group/CheckboxGroup.mjs +3 -5
  9. package/es/checkbox-group/props.mjs +4 -1
  10. package/es/field-decorator/FieldDecorator.mjs +8 -8
  11. package/es/field-decorator/props.mjs +1 -1
  12. package/es/index.bundle.mjs +7 -1
  13. package/es/index.mjs +6 -1
  14. package/es/input/Input.mjs +12 -13
  15. package/es/input/props.mjs +21 -2
  16. package/es/menu-option/MenuOption.mjs +5 -2
  17. package/es/menu-option/menuOption.css +1 -1
  18. package/es/menu-select/MenuSelect.mjs +3 -5
  19. package/es/menu-select/props.mjs +4 -1
  20. package/es/radio-group/RadioGroup.mjs +4 -6
  21. package/es/radio-group/props.mjs +4 -1
  22. package/es/select/Select.mjs +3 -5
  23. package/es/select/props.mjs +4 -1
  24. package/es/snackbar/style/index.mjs +1 -1
  25. package/es/style.css +1 -1
  26. package/es/style.mjs +1 -0
  27. package/es/varlet.esm.js +13599 -13253
  28. package/highlight/web-types.en-US.json +239 -10
  29. package/highlight/web-types.zh-CN.json +239 -10
  30. package/json/area.json +1 -1
  31. package/lib/style.css +1 -1
  32. package/lib/varlet.cjs.js +15289 -14861
  33. package/package.json +8 -8
  34. package/types/autoComplete.d.ts +84 -0
  35. package/types/checkbox.d.ts +2 -2
  36. package/types/index.d.ts +2 -0
  37. package/types/input.d.ts +1 -0
  38. package/types/styleVars.d.ts +1 -0
  39. package/umd/varlet.js +8 -8
@@ -0,0 +1,352 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import VarInput from "../input/index.mjs";
22
+ import VarMenuSelect from "../menu-select/index.mjs";
23
+ import VarMenuOption from "../menu-option/index.mjs";
24
+ import VarFormDetails from "../form-details/index.mjs";
25
+ import { computed, defineComponent, nextTick, ref, watch } from "vue";
26
+ import { props } from "./props.mjs";
27
+ import { createNamespace, useValidation } from "../utils/components.mjs";
28
+ import { useClickOutside, useEventListener, useVModel } from "@varlet/use";
29
+ import { call, isEmpty, preventDefault, raf, toNumber } from "@varlet/shared";
30
+ import { useForm } from "../form/provide.mjs";
31
+ const { name, n } = createNamespace("auto-complete");
32
+ import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, mergeProps as _mergeProps, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
33
+ const _withScopeId = (n2) => (_pushScopeId(""), n2 = n2(), _popScopeId(), n2);
34
+ const _hoisted_1 = ["tabindex"];
35
+ function __render__(_ctx, _cache) {
36
+ const _component_var_input = _resolveComponent("var-input");
37
+ const _component_var_menu_option = _resolveComponent("var-menu-option");
38
+ const _component_var_menu_select = _resolveComponent("var-menu-select");
39
+ const _component_var_form_details = _resolveComponent("var-form-details");
40
+ return _openBlock(), _createElementBlock("div", {
41
+ ref: "root",
42
+ class: _normalizeClass(_ctx.n()),
43
+ tabindex: _ctx.disabled || _ctx.formDisabled ? void 0 : "0",
44
+ onFocusin: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
45
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
46
+ }, [
47
+ _createVNode(_component_var_menu_select, {
48
+ "same-width": "",
49
+ "auto-complete-cover": "",
50
+ scrollable: "",
51
+ trigger: "manual",
52
+ placement: "bottom",
53
+ disabled: _ctx.disabled || _ctx.formDisabled || _ctx.readonly || _ctx.formReadonly,
54
+ class: _normalizeClass(_ctx.n("menu-select")),
55
+ "popover-class": _ctx.variant === "standard" ? _ctx.n("--standard-menu-margin") : void 0,
56
+ show: _ctx.isShowMenuSelect,
57
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => _ctx.isShowMenuSelect = $event),
58
+ "onUpdate:modelValue": _ctx.handleAutoComplete
59
+ }, {
60
+ options: _withCtx(() => [
61
+ _createElementVNode(
62
+ "div",
63
+ {
64
+ class: _normalizeClass(_ctx.n("options"))
65
+ },
66
+ [
67
+ (_openBlock(true), _createElementBlock(
68
+ _Fragment,
69
+ null,
70
+ _renderList(_ctx.viewOptions, (option) => {
71
+ return _openBlock(), _createBlock(_component_var_menu_option, {
72
+ key: option[_ctx.valueKey],
73
+ label: option[_ctx.labelKey],
74
+ value: option[_ctx.valueKey],
75
+ option,
76
+ disabled: option.disabled
77
+ }, null, 8, ["label", "value", "option", "disabled"]);
78
+ }),
79
+ 128
80
+ /* KEYED_FRAGMENT */
81
+ ))
82
+ ],
83
+ 2
84
+ /* CLASS */
85
+ )
86
+ ]),
87
+ default: _withCtx(() => [
88
+ _createVNode(_component_var_input, _mergeProps({ ref: "input" }, {
89
+ maxlength: _ctx.maxlength,
90
+ enterkeyhint: _ctx.enterkeyhint,
91
+ placeholder: _ctx.placeholder,
92
+ size: _ctx.size,
93
+ variant: _ctx.variant,
94
+ line: _ctx.line,
95
+ hint: _ctx.hint,
96
+ textColor: _ctx.textColor,
97
+ focusColor: _ctx.focusColor,
98
+ blurColor: _ctx.blurColor,
99
+ readonly: _ctx.readonly,
100
+ disabled: _ctx.disabled,
101
+ clearable: _ctx.clearable
102
+ }, {
103
+ autocomplete: "off",
104
+ "is-force-focusing-effect": _ctx.isFocusing,
105
+ "is-force-error-effect": !!_ctx.errorMessage,
106
+ "is-show-form-details": false,
107
+ onInput: _ctx.handleInput,
108
+ onBlur: _ctx.handleBlur,
109
+ onClear: _ctx.handleClear,
110
+ onChange: _ctx.handleChange,
111
+ modelValue: _ctx.value,
112
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event)
113
+ }), _createSlots({
114
+ _: 2
115
+ /* DYNAMIC */
116
+ }, [
117
+ _ctx.$slots["prepend-icon"] ? {
118
+ name: "prepend-icon",
119
+ fn: _withCtx(() => [
120
+ _renderSlot(_ctx.$slots, "prepend-icon")
121
+ ]),
122
+ key: "0"
123
+ } : void 0,
124
+ _ctx.$slots["append-icon"] ? {
125
+ name: "append-icon",
126
+ fn: _withCtx(() => [
127
+ _renderSlot(_ctx.$slots, "append-icon")
128
+ ]),
129
+ key: "1"
130
+ } : void 0,
131
+ _ctx.$slots["clear-icon"] ? {
132
+ name: "clear-icon",
133
+ fn: _withCtx(({ clear }) => [
134
+ _renderSlot(_ctx.$slots, "clear-icon", { clear })
135
+ ]),
136
+ key: "2"
137
+ } : void 0,
138
+ _ctx.$slots["extra-message"] ? {
139
+ name: "extra-message",
140
+ fn: _withCtx(() => [
141
+ _renderSlot(_ctx.$slots, "extra-message")
142
+ ]),
143
+ key: "3"
144
+ } : void 0
145
+ ]), 1040, ["is-force-focusing-effect", "is-force-error-effect", "onInput", "onBlur", "onClear", "onChange", "modelValue"])
146
+ ]),
147
+ _: 3
148
+ /* FORWARDED */
149
+ }, 8, ["disabled", "class", "popover-class", "show", "onUpdate:modelValue"]),
150
+ _createVNode(_component_var_form_details, {
151
+ "error-message": _ctx.errorMessage,
152
+ "extra-message": _ctx.maxlengthText
153
+ }, null, 8, ["error-message", "extra-message"])
154
+ ], 42, _hoisted_1);
155
+ }
156
+ const __sfc__ = defineComponent({
157
+ name,
158
+ components: {
159
+ VarInput,
160
+ VarMenuSelect,
161
+ VarMenuOption,
162
+ VarFormDetails
163
+ },
164
+ props,
165
+ setup(props2) {
166
+ const root = ref();
167
+ const input = ref();
168
+ const isFocusing = ref(false);
169
+ const value = useVModel(props2, "modelValue");
170
+ const viewOptions = ref([]);
171
+ const isShowMenuSelect = ref(false);
172
+ const maxlengthText = computed(() => {
173
+ const { maxlength } = props2;
174
+ if (!maxlength) {
175
+ return "";
176
+ }
177
+ if (isEmpty(value.value)) {
178
+ return `0 / ${maxlength}`;
179
+ }
180
+ return `${String(value.value).length}/${maxlength}`;
181
+ });
182
+ const {
183
+ errorMessage,
184
+ validateWithTrigger: vt,
185
+ validate: v,
186
+ // expose
187
+ resetValidation
188
+ } = useValidation();
189
+ const { bindForm, form } = useForm();
190
+ let clearing = false;
191
+ const autoCompleteProvider = {
192
+ reset,
193
+ resetValidation,
194
+ validate
195
+ };
196
+ useClickOutside(
197
+ () => root.value,
198
+ "click",
199
+ () => {
200
+ if (clearing) {
201
+ clearing = false;
202
+ return;
203
+ }
204
+ blur();
205
+ }
206
+ );
207
+ watch(() => [props2.options, isFocusing.value], changeMenuState);
208
+ call(bindForm, autoCompleteProvider);
209
+ useEventListener(() => window, "keydown", handleKeydown);
210
+ function reset() {
211
+ call(props2["onUpdate:modelValue"], "");
212
+ resetValidation();
213
+ }
214
+ function validate() {
215
+ return v(props2.rules, props2.modelValue);
216
+ }
217
+ function focus() {
218
+ if (isFocusing.value || props2.disabled || (form == null ? void 0 : form.disabled.value)) {
219
+ return;
220
+ }
221
+ isFocusing.value = true;
222
+ input.value.focus();
223
+ call(props2.onFocus);
224
+ validateWithTrigger("onFocus");
225
+ }
226
+ function blur() {
227
+ if (!isFocusing.value) {
228
+ return;
229
+ }
230
+ isFocusing.value = false;
231
+ isShowMenuSelect.value = false;
232
+ input.value.blur();
233
+ call(props2.onBlur);
234
+ validateWithTrigger("onBlur");
235
+ }
236
+ function handleBlur() {
237
+ if (isShowMenuSelect.value) {
238
+ return;
239
+ }
240
+ blur();
241
+ }
242
+ function validateWithTrigger(trigger) {
243
+ nextTick(() => {
244
+ const { validateTrigger, rules, modelValue } = props2;
245
+ vt(validateTrigger, trigger, rules, modelValue);
246
+ });
247
+ }
248
+ function handleKeydown(event) {
249
+ return __async(this, null, function* () {
250
+ var _a;
251
+ if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || props2.disabled || props2.readonly || !isFocusing.value || !isShowMenuSelect.value) {
252
+ return;
253
+ }
254
+ const { key } = event;
255
+ if (key === "Tab") {
256
+ preventDefault(event);
257
+ root.value.focus();
258
+ isShowMenuSelect.value = false;
259
+ return;
260
+ }
261
+ if (!["ArrowUp", "ArrowDown", "Enter"].includes(key)) {
262
+ input.value.focus();
263
+ return;
264
+ }
265
+ if (key === "Enter") {
266
+ yield raf();
267
+ (_a = input.value) == null ? void 0 : _a.focus();
268
+ }
269
+ });
270
+ }
271
+ function changeMenuState() {
272
+ return __async(this, null, function* () {
273
+ if (isFocusing.value) {
274
+ isShowMenuSelect.value = getShowMenuSelect(value.value);
275
+ }
276
+ if (isShowMenuSelect.value) {
277
+ viewOptions.value = props2.options;
278
+ }
279
+ });
280
+ }
281
+ function handleInput(newValue, event) {
282
+ return __async(this, null, function* () {
283
+ changeMenuState();
284
+ call(props2.onInput, newValue, event);
285
+ validateWithTrigger("onInput");
286
+ });
287
+ }
288
+ function handleClear() {
289
+ clearing = true;
290
+ changeMenuState();
291
+ call(props2.onClear, value.value);
292
+ validateWithTrigger("onClear");
293
+ }
294
+ function handleClick(event) {
295
+ if (props2.disabled || (form == null ? void 0 : form.disabled.value)) {
296
+ return;
297
+ }
298
+ call(props2.onClick, event);
299
+ validateWithTrigger("onClick");
300
+ }
301
+ function handleChange(newValue) {
302
+ call(props2.onChange, newValue);
303
+ validateWithTrigger("onChange");
304
+ }
305
+ function handleAutoComplete(newValue) {
306
+ if (props2.maxlength != null) {
307
+ newValue = newValue.slice(0, toNumber(props2.maxlength));
308
+ }
309
+ if (newValue === value.value) {
310
+ return;
311
+ }
312
+ value.value = newValue;
313
+ call(props2.onChange, newValue);
314
+ validateWithTrigger("onChange");
315
+ }
316
+ function getShowMenuSelect(newValue) {
317
+ if (props2.disabled || props2.readonly || (form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value)) {
318
+ return false;
319
+ }
320
+ return props2.options.length > 0 && (props2.getShow != null ? props2.getShow(newValue) : newValue.length > 0);
321
+ }
322
+ return {
323
+ root,
324
+ input,
325
+ value,
326
+ isShowMenuSelect,
327
+ viewOptions,
328
+ isFocusing,
329
+ formDisabled: form == null ? void 0 : form.disabled,
330
+ formReadonly: form == null ? void 0 : form.readonly,
331
+ errorMessage,
332
+ maxlengthText,
333
+ n,
334
+ handleInput,
335
+ handleClear,
336
+ handleClick,
337
+ handleChange,
338
+ handleBlur,
339
+ handleAutoComplete,
340
+ reset,
341
+ validate,
342
+ resetValidation,
343
+ blur,
344
+ focus
345
+ };
346
+ }
347
+ });
348
+ __sfc__.render = __render__;
349
+ var stdin_default = __sfc__;
350
+ export {
351
+ stdin_default as default
352
+ };
File without changes
@@ -0,0 +1 @@
1
+ :root { --auto-complete-options-padding: 6px 0;}.var-auto-complete { outline: none;}.var-auto-complete__menu-select[auto-complete-cover] { display: block;}.var-auto-complete__options { padding: var(--auto-complete-options-padding);}.var-auto-complete--standard-menu-margin { margin-top: var(--field-decorator-line-focus-size) !important;}
@@ -0,0 +1,11 @@
1
+ import AutoComplete from "./AutoComplete.mjs";
2
+ import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
3
+ import { props as autoCompleteProps } from "./props.mjs";
4
+ withInstall(AutoComplete);
5
+ withPropsDefaultsSetter(AutoComplete, autoCompleteProps);
6
+ const _AutoCompleteComponent = AutoComplete;
7
+ var stdin_default = AutoComplete;
8
+ export {
9
+ _AutoCompleteComponent,
10
+ stdin_default as default
11
+ };
@@ -0,0 +1,63 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ import { defineListenerProp, pickProps } from "../utils/components.mjs";
18
+ import { inputProps } from "../input/index.mjs";
19
+ const props = __spreadValues({
20
+ modelValue: String,
21
+ options: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ labelKey: {
26
+ type: String,
27
+ default: "label"
28
+ },
29
+ valueKey: {
30
+ type: String,
31
+ default: "value"
32
+ },
33
+ maxlength: [String, Number],
34
+ readonly: Boolean,
35
+ disabled: Boolean,
36
+ validateTrigger: {
37
+ type: Array,
38
+ default: () => ["onInput", "onClear", "onChange"]
39
+ },
40
+ getShow: Function,
41
+ rules: Array,
42
+ onFocus: defineListenerProp(),
43
+ onBlur: defineListenerProp(),
44
+ onInput: defineListenerProp(),
45
+ onChange: defineListenerProp(),
46
+ onClear: defineListenerProp(),
47
+ onClick: defineListenerProp(),
48
+ "onUpdate:modelValue": defineListenerProp()
49
+ }, pickProps(inputProps, [
50
+ "size",
51
+ "variant",
52
+ "placeholder",
53
+ "enterkeyhint",
54
+ "line",
55
+ "hint",
56
+ "textColor",
57
+ "focusColor",
58
+ "blurColor",
59
+ "clearable"
60
+ ]));
61
+ export {
62
+ props
63
+ };
File without changes
@@ -0,0 +1,11 @@
1
+ import '../../styles/common.css'
2
+ import '../../styles/elevation.css'
3
+ import '../../icon/icon.css'
4
+ import '../../field-decorator/fieldDecorator.css'
5
+ import '../../form-details/formDetails.css'
6
+ import '../../input/input.css'
7
+ import '../../menu/menu.css'
8
+ import '../../menu-option/menuOption.css'
9
+ import '../../menu-select/menuSelect.css'
10
+ import '../autoComplete.css'
11
+ import '../AutoCompleteSfc.css'
@@ -5,7 +5,7 @@ import { props } from "./props.mjs";
5
5
  import { useValidation, createNamespace, MaybeVNode } from "../utils/components.mjs";
6
6
  import { useCheckboxes } from "./provide.mjs";
7
7
  import { useForm } from "../form/provide.mjs";
8
- import { uniq, call, isArray, isFunction } from "@varlet/shared";
8
+ import { uniq, call, isFunction } from "@varlet/shared";
9
9
  const { name, n, classes } = createNamespace("checkbox-group");
10
10
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
11
11
  function __render__(_ctx, _cache) {
@@ -24,10 +24,10 @@ function __render__(_ctx, _cache) {
24
24
  class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n(`--${_ctx.direction}`)))
25
25
  },
26
26
  [
27
- _ctx.checkboxGroupOptions.length ? (_openBlock(true), _createElementBlock(
27
+ _ctx.options.length ? (_openBlock(true), _createElementBlock(
28
28
  _Fragment,
29
29
  { key: 0 },
30
- _renderList(_ctx.checkboxGroupOptions, (option) => {
30
+ _renderList(_ctx.options, (option) => {
31
31
  return _openBlock(), _createBlock(_component_var_checkbox, {
32
32
  key: option[_ctx.valueKey],
33
33
  "checked-value": option[_ctx.valueKey],
@@ -63,7 +63,6 @@ const __sfc__ = defineComponent({
63
63
  setup(props2) {
64
64
  const max = computed(() => props2.max);
65
65
  const checkedCount = computed(() => props2.modelValue.length);
66
- const checkboxGroupOptions = computed(() => isArray(props2.options) ? props2.options : []);
67
66
  const { length, checkboxes, bindCheckboxes } = useCheckboxes();
68
67
  const { bindForm } = useForm();
69
68
  const {
@@ -141,7 +140,6 @@ const __sfc__ = defineComponent({
141
140
  }
142
141
  return {
143
142
  errorMessage,
144
- checkboxGroupOptions,
145
143
  n,
146
144
  classes,
147
145
  checkAll,
@@ -5,7 +5,10 @@ const props = {
5
5
  default: () => []
6
6
  },
7
7
  max: [String, Number],
8
- options: Array,
8
+ options: {
9
+ type: Array,
10
+ default: () => []
11
+ },
9
12
  labelKey: {
10
13
  type: String,
11
14
  default: "label"
@@ -45,7 +45,7 @@ function __render__(_ctx, _cache) {
45
45
  _ctx.classes(
46
46
  _ctx.n("controller"),
47
47
  [_ctx.isFocusing, _ctx.n("--focus")],
48
- [_ctx.errorMessage, _ctx.n("--error")],
48
+ [_ctx.isError, _ctx.n("--error")],
49
49
  [_ctx.formDisabled || _ctx.disabled, _ctx.n("--disabled")]
50
50
  )
51
51
  ),
@@ -91,7 +91,7 @@ function __render__(_ctx, _cache) {
91
91
  [_ctx.isFocusing, _ctx.n("--focus")],
92
92
  [_ctx.hintCenter, _ctx.n("--hint-center")],
93
93
  [_ctx.formDisabled || _ctx.disabled, _ctx.n("--disabled")],
94
- [_ctx.errorMessage, _ctx.n("--error")],
94
+ [_ctx.isError, _ctx.n("--error")],
95
95
  [_ctx.transitionDisabled, _ctx.n("--transition-disabled")],
96
96
  _ctx.computePlaceholderState()
97
97
  )
@@ -147,7 +147,7 @@ function __render__(_ctx, _cache) {
147
147
  _ctx.classes(
148
148
  _ctx.n("line"),
149
149
  [_ctx.isFocusing, _ctx.n("--line-focus")],
150
- [_ctx.errorMessage, _ctx.n("--line-error")],
150
+ [_ctx.isError, _ctx.n("--line-error")],
151
151
  [_ctx.formDisabled || _ctx.disabled, _ctx.n("--line-disabled")]
152
152
  )
153
153
  ),
@@ -189,8 +189,8 @@ function __render__(_ctx, _cache) {
189
189
  "div",
190
190
  {
191
191
  key: 1,
192
- class: _normalizeClass(_ctx.classes(_ctx.n("line"), [_ctx.formDisabled || _ctx.disabled, _ctx.n("--line-disabled")], [_ctx.errorMessage, _ctx.n("--line-error")])),
193
- style: _normalizeStyle({ background: !_ctx.errorMessage ? _ctx.blurColor : void 0 })
192
+ class: _normalizeClass(_ctx.classes(_ctx.n("line"), [_ctx.formDisabled || _ctx.disabled, _ctx.n("--line-disabled")], [_ctx.isError, _ctx.n("--line-error")])),
193
+ style: _normalizeStyle({ background: !_ctx.isError ? _ctx.blurColor : void 0 })
194
194
  },
195
195
  [
196
196
  _createElementVNode(
@@ -201,10 +201,10 @@ function __render__(_ctx, _cache) {
201
201
  _ctx.n("dot"),
202
202
  [_ctx.isFocusing, _ctx.n("--line-focus")],
203
203
  [_ctx.formDisabled || _ctx.disabled, _ctx.n("--line-disabled")],
204
- [_ctx.errorMessage, _ctx.n("--line-error")]
204
+ [_ctx.isError, _ctx.n("--line-error")]
205
205
  )
206
206
  ),
207
- style: _normalizeStyle({ background: !_ctx.errorMessage ? _ctx.focusColor : void 0 })
207
+ style: _normalizeStyle({ background: !_ctx.isError ? _ctx.focusColor : void 0 })
208
208
  },
209
209
  null,
210
210
  6
@@ -238,7 +238,7 @@ const __sfc__ = defineComponent({
238
238
  const isFloating = computed(() => props2.hint && (!isEmpty(props2.value) || props2.isFocusing));
239
239
  const { popup, bindPopup } = usePopup();
240
240
  const color = computed(
241
- () => !props2.errorMessage ? props2.isFocusing ? props2.focusColor : props2.blurColor : void 0
241
+ () => !props2.isError ? props2.isFocusing ? props2.focusColor : props2.blurColor : void 0
242
242
  );
243
243
  onWindowResize(resize);
244
244
  onSmartMounted(() => {
@@ -33,7 +33,7 @@ const props = {
33
33
  textColor: String,
34
34
  focusColor: String,
35
35
  blurColor: String,
36
- errorMessage: String,
36
+ isError: Boolean,
37
37
  formDisabled: Boolean,
38
38
  disabled: Boolean,
39
39
  clearable: Boolean,
@@ -1,5 +1,6 @@
1
1
  import ActionSheet from './action-sheet/index.mjs'
2
2
  import AppBar from './app-bar/index.mjs'
3
+ import AutoComplete from './auto-complete/index.mjs'
3
4
  import Avatar from './avatar/index.mjs'
4
5
  import AvatarGroup from './avatar-group/index.mjs'
5
6
  import BackTop from './back-top/index.mjs'
@@ -89,6 +90,7 @@ import Watermark from './watermark/index.mjs'
89
90
 
90
91
  export * from './action-sheet/index.mjs'
91
92
  export * from './app-bar/index.mjs'
93
+ export * from './auto-complete/index.mjs'
92
94
  export * from './avatar/index.mjs'
93
95
  export * from './avatar-group/index.mjs'
94
96
  export * from './back-top/index.mjs'
@@ -178,6 +180,7 @@ export * from './watermark/index.mjs'
178
180
 
179
181
  import './action-sheet/style/index.mjs'
180
182
  import './app-bar/style/index.mjs'
183
+ import './auto-complete/style/index.mjs'
181
184
  import './avatar/style/index.mjs'
182
185
  import './avatar-group/style/index.mjs'
183
186
  import './back-top/style/index.mjs'
@@ -265,11 +268,12 @@ import './tooltip/style/index.mjs'
265
268
  import './uploader/style/index.mjs'
266
269
  import './watermark/style/index.mjs'
267
270
 
268
- const version = '3.3.15'
271
+ const version = '3.4.0'
269
272
 
270
273
  function install(app) {
271
274
  ActionSheet.install && app.use(ActionSheet)
272
275
  AppBar.install && app.use(AppBar)
276
+ AutoComplete.install && app.use(AutoComplete)
273
277
  Avatar.install && app.use(Avatar)
274
278
  AvatarGroup.install && app.use(AvatarGroup)
275
279
  BackTop.install && app.use(BackTop)
@@ -363,6 +367,7 @@ export {
363
367
  install,
364
368
  ActionSheet,
365
369
  AppBar,
370
+ AutoComplete,
366
371
  Avatar,
367
372
  AvatarGroup,
368
373
  BackTop,
@@ -456,6 +461,7 @@ export default {
456
461
  install,
457
462
  ActionSheet,
458
463
  AppBar,
464
+ AutoComplete,
459
465
  Avatar,
460
466
  AvatarGroup,
461
467
  BackTop,
package/es/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import ActionSheet from './action-sheet/index.mjs'
2
2
  import AppBar from './app-bar/index.mjs'
3
+ import AutoComplete from './auto-complete/index.mjs'
3
4
  import Avatar from './avatar/index.mjs'
4
5
  import AvatarGroup from './avatar-group/index.mjs'
5
6
  import BackTop from './back-top/index.mjs'
@@ -89,6 +90,7 @@ import Watermark from './watermark/index.mjs'
89
90
 
90
91
  export * from './action-sheet/index.mjs'
91
92
  export * from './app-bar/index.mjs'
93
+ export * from './auto-complete/index.mjs'
92
94
  export * from './avatar/index.mjs'
93
95
  export * from './avatar-group/index.mjs'
94
96
  export * from './back-top/index.mjs'
@@ -176,11 +178,12 @@ export * from './tooltip/index.mjs'
176
178
  export * from './uploader/index.mjs'
177
179
  export * from './watermark/index.mjs'
178
180
 
179
- const version = '3.3.15'
181
+ const version = '3.4.0'
180
182
 
181
183
  function install(app) {
182
184
  ActionSheet.install && app.use(ActionSheet)
183
185
  AppBar.install && app.use(AppBar)
186
+ AutoComplete.install && app.use(AutoComplete)
184
187
  Avatar.install && app.use(Avatar)
185
188
  AvatarGroup.install && app.use(AvatarGroup)
186
189
  BackTop.install && app.use(BackTop)
@@ -274,6 +277,7 @@ export {
274
277
  install,
275
278
  ActionSheet,
276
279
  AppBar,
280
+ AutoComplete,
277
281
  Avatar,
278
282
  AvatarGroup,
279
283
  BackTop,
@@ -367,6 +371,7 @@ export default {
367
371
  install,
368
372
  ActionSheet,
369
373
  AppBar,
374
+ AutoComplete,
370
375
  Avatar,
371
376
  AvatarGroup,
372
377
  BackTop,