vft 0.0.402 → 0.0.404

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.
@@ -1,7 +1,7 @@
1
1
  export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
3
  size: {
4
- type: import("vue").PropType<import("../types").ComponentSize>;
4
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
5
5
  };
6
6
  link: {
7
7
  type: import("vue").PropType<boolean>;
@@ -91,7 +91,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
91
91
  Defaults: {};
92
92
  }, Readonly<import("vue").ExtractPropTypes<{
93
93
  size: {
94
- type: import("vue").PropType<import("../types").ComponentSize>;
94
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
95
95
  };
96
96
  link: {
97
97
  type: import("vue").PropType<boolean>;
@@ -176,7 +176,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
176
176
  __isSuspense?: never;
177
177
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
178
178
  size: {
179
- type: import("vue").PropType<import("../types").ComponentSize>;
179
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
180
180
  };
181
181
  link: {
182
182
  type: import("vue").PropType<boolean>;
@@ -266,7 +266,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
266
266
  ButtonGroup: {
267
267
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
268
268
  size: {
269
- type: import("vue").PropType<import("../types").ComponentSize>;
269
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
270
270
  };
271
271
  type: {
272
272
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -280,7 +280,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
280
280
  Defaults: {};
281
281
  }, Readonly<import("vue").ExtractPropTypes<{
282
282
  size: {
283
- type: import("vue").PropType<import("../types").ComponentSize>;
283
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
284
284
  };
285
285
  type: {
286
286
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -291,7 +291,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
291
291
  __isSuspense?: never;
292
292
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
293
293
  size: {
294
- type: import("vue").PropType<import("../types").ComponentSize>;
294
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
295
295
  };
296
296
  type: {
297
297
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -305,7 +305,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
305
305
  export declare const VftButtonGroup: import("vft/es/utils").SFCWithInstall<{
306
306
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
307
307
  size: {
308
- type: import("vue").PropType<import("../types").ComponentSize>;
308
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
309
309
  };
310
310
  type: {
311
311
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -319,7 +319,7 @@ export declare const VftButtonGroup: import("vft/es/utils").SFCWithInstall<{
319
319
  Defaults: {};
320
320
  }, Readonly<import("vue").ExtractPropTypes<{
321
321
  size: {
322
- type: import("vue").PropType<import("../types").ComponentSize>;
322
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
323
323
  };
324
324
  type: {
325
325
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -330,7 +330,7 @@ export declare const VftButtonGroup: import("vft/es/utils").SFCWithInstall<{
330
330
  __isSuspense?: never;
331
331
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
332
332
  size: {
333
- type: import("vue").PropType<import("../types").ComponentSize>;
333
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
334
334
  };
335
335
  type: {
336
336
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -1,5 +1,5 @@
1
1
  import type { IconProps } from 'vft/es/components';
2
- import type { ComponentSize } from 'vft/es/components/types.ts';
2
+ import type { ComponentSize } from 'vft/es/constants';
3
3
  import type { Component } from 'vue';
4
4
  export type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'text' | '';
5
5
  export interface ButtonConfigContext {
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
11
11
  import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
12
12
  import "@popperjs/core";
13
13
  import "../../hooks/use-z-index/index.js";
14
- import { carouselContextKey as Se, CAROUSEL_ITEM_NAME as H } from "./constants.js";
14
+ import { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
15
15
  const L = 300, ze = (t, O, M) => {
16
16
  const {
17
17
  children: o,
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
13
13
  import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
14
14
  import { useAttrs as Ze, useCursor as _e } from "@vft/use";
15
15
  import { calcTextareaHeight as ye } from "./utils.js";
16
- import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
17
- import { useFormSize as at, useFormDisabled as ot } from "../form/hooks/use-form-common-props.js";
16
+ import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
17
+ import { useFormItem as at, useFormItemInputId as ot } from "../form/hooks/use-form-item.js";
18
18
  const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
19
19
  __name: "input",
20
20
  props: {
@@ -85,9 +85,9 @@ const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
85
85
  o.is("focus", v.value)
86
86
  ]), d = Ze({
87
87
  excludeKeys: l(() => Object.keys(X.value))
88
- }), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(xe.props, {
88
+ }), { form: Ce, formItem: F } = at(), { inputId: Y } = ot(xe.props, {
89
89
  formItemContext: F
90
- }), ke = at(), h = ot(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
90
+ }), ke = et(), h = tt(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
91
91
  icon: "icon-circle-close",
92
92
  size: 16
93
93
  })), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
@@ -1,6 +1,6 @@
1
1
  import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
2
2
  import { EVENT_CODE as g } from "../../../constants/aria.js";
3
- import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
3
+ import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
4
4
  import "@vueuse/core";
5
5
  import { isUndefined as K } from "@vft/utils";
6
6
  import { debugWarn as C } from "../../../utils/error.js";
@@ -8,6 +8,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
8
8
  type: import("vue").PropType<"top" | "left" | "right">;
9
9
  default: string;
10
10
  };
11
+ labelWidth: {
12
+ type: import("vue").PropType<"string" | "number">;
13
+ default: string;
14
+ };
11
15
  showResetButton: {
12
16
  type: import("vue").PropType<boolean>;
13
17
  default: boolean;
@@ -150,6 +154,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
150
154
  }, import("vue").PublicProps, {
151
155
  size: import("vft/es/constants").ComponentSize;
152
156
  labelPosition: "left" | "right" | "top";
157
+ labelWidth: "string" | "number";
153
158
  showResetButton: boolean;
154
159
  showSubmitButton: boolean;
155
160
  showCommonButton: boolean;
@@ -180,6 +185,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
180
185
  type: import("vue").PropType<"top" | "left" | "right">;
181
186
  default: string;
182
187
  };
188
+ labelWidth: {
189
+ type: import("vue").PropType<"string" | "number">;
190
+ default: string;
191
+ };
183
192
  showResetButton: {
184
193
  type: import("vue").PropType<boolean>;
185
194
  default: boolean;
@@ -316,6 +325,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
316
325
  }, {}, {}, {}, {
317
326
  size: import("vft/es/constants").ComponentSize;
318
327
  labelPosition: "left" | "right" | "top";
328
+ labelWidth: "string" | "number";
319
329
  showResetButton: boolean;
320
330
  showSubmitButton: boolean;
321
331
  showCommonButton: boolean;
@@ -343,6 +353,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
343
353
  type: import("vue").PropType<"top" | "left" | "right">;
344
354
  default: string;
345
355
  };
356
+ labelWidth: {
357
+ type: import("vue").PropType<"string" | "number">;
358
+ default: string;
359
+ };
346
360
  showResetButton: {
347
361
  type: import("vue").PropType<boolean>;
348
362
  default: boolean;
@@ -485,6 +499,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
485
499
  }, string, {
486
500
  size: import("vft/es/constants").ComponentSize;
487
501
  labelPosition: "left" | "right" | "top";
502
+ labelWidth: "string" | "number";
488
503
  showResetButton: boolean;
489
504
  showSubmitButton: boolean;
490
505
  showCommonButton: boolean;
@@ -1,4 +1,4 @@
1
- import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne, createTextVNode as G, isVNode as le, resolveComponent as V } from "vue";
1
+ import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne, isVNode as le, createTextVNode as G, resolveComponent as V } from "vue";
2
2
  import "../alert/index.js";
3
3
  import "../avatar/index.js";
4
4
  import "../avatar-stack/index.js";
@@ -85,6 +85,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
85
85
  }>, {
86
86
  size: import("vft/es/constants").ComponentSize;
87
87
  labelPosition: "left" | "right" | "top";
88
+ labelWidth: "string" | "number";
88
89
  showResetButton: boolean;
89
90
  showSubmitButton: boolean;
90
91
  showCommonButton: boolean;
@@ -107,6 +107,9 @@ const Ve = j({
107
107
  labelPosition: {
108
108
  default: "right"
109
109
  },
110
+ labelWidth: {
111
+ default: "auto"
112
+ },
110
113
  disabled: {
111
114
  type: Boolean
112
115
  },
@@ -115,9 +118,6 @@ const Ve = j({
115
118
  requireAsteriskPosition: {
116
119
  default: "left"
117
120
  },
118
- labelWidth: {
119
- default: "auto"
120
- },
121
121
  labelSuffix: {},
122
122
  inline: {
123
123
  type: Boolean
@@ -177,6 +177,7 @@ export interface SuperFormProps extends FormInnerProps {
177
177
  /** 重置与提交按钮互换位置 */
178
178
  submitResetReverse?: boolean;
179
179
  labelPosition?: 'left' | 'right' | 'top';
180
+ labelWidth?: 'string' | 'number';
180
181
  }
181
182
  /** 表单配置模式接口 */
182
183
  export interface FormSchema {
@@ -1,26 +1,26 @@
1
- import { defineComponent as C, ref as v, computed as n, inject as K, onBeforeUnmount as Y, unref as t, watch as y, createBlock as b, openBlock as h, withCtx as u, createVNode as q, Transition as G, withDirectives as Q, createCommentVNode as X, mergeProps as Z, renderSlot as x, vShow as _ } from "vue";
1
+ import { defineComponent as B, ref as v, computed as n, inject as K, onBeforeUnmount as Y, unref as t, watch as y, createBlock as b, openBlock as C, withCtx as u, createVNode as q, Transition as G, withDirectives as Q, createCommentVNode as X, mergeProps as Z, renderSlot as x, vShow as _ } from "vue";
2
2
  import "../focus-trap/focus-trap.vue2.js";
3
3
  import { tryFocus as ee } from "../focus-trap/utils.js";
4
- import { onClickOutside as te } from "@vueuse/core";
4
+ import { isClient as te, onClickOutside as oe } from "@vueuse/core";
5
5
  import "@vft/utils";
6
- import { composeEventHandlers as B } from "../../utils/event.js";
6
+ import { composeEventHandlers as h } from "../../utils/event.js";
7
7
  import "../config-provider/hooks/use-global-config.js";
8
8
  import "lodash-es";
9
9
  import "../form/index.js";
10
- import { useNamespace as oe } from "../../hooks/use-namespace/index.js";
10
+ import { useNamespace as ne } from "../../hooks/use-namespace/index.js";
11
11
  import "../../hooks/use-model-toggle/index.js";
12
12
  import "@popperjs/core";
13
- import { usePopperContainerId as ne } from "../../hooks/use-popper-container/index.js";
13
+ import { usePopperContainerId as re } from "../../hooks/use-popper-container/index.js";
14
14
  import "../../hooks/use-z-index/index.js";
15
15
  import "../popper/index.js";
16
- import { VftTeleport as re } from "../teleport/index.js";
17
- import { TOOLTIP_INJECTION_KEY as ae } from "./constants.js";
18
- import le from "../popper/content.vue2.js";
19
- const se = C({
16
+ import { VftTeleport as ae } from "../teleport/index.js";
17
+ import { TOOLTIP_INJECTION_KEY as le } from "./constants.js";
18
+ import se from "../popper/content.vue2.js";
19
+ const pe = B({
20
20
  name: "VftTooltipContent",
21
21
  inheritAttrs: !1
22
- }), Oe = /* @__PURE__ */ C({
23
- ...se,
22
+ }), Ne = /* @__PURE__ */ B({
23
+ ...pe,
24
24
  props: {
25
25
  boundariesPadding: { default: 0 },
26
26
  fallbackPlacements: {},
@@ -56,8 +56,8 @@ const se = C({
56
56
  disabled: { type: Boolean },
57
57
  arrowOffset: { default: 5 }
58
58
  },
59
- setup(o, { expose: T }) {
60
- const { selector: E } = ne(), w = oe("tooltip"), r = v(null), S = n(() => r.value?.popperContentRef);
59
+ setup(o, { expose: E }) {
60
+ const { selector: T } = re(), w = ne("tooltip"), r = v(null), S = n(() => r.value?.popperContentRef);
61
61
  let l;
62
62
  const {
63
63
  controlled: d,
@@ -65,29 +65,29 @@ const se = C({
65
65
  open: s,
66
66
  trigger: p,
67
67
  onClose: a,
68
- onOpen: P,
69
- onShow: k,
70
- onHide: A,
71
- onBeforeShow: N,
68
+ onOpen: N,
69
+ onShow: P,
70
+ onHide: k,
71
+ onBeforeShow: A,
72
72
  onBeforeHide: I
73
- } = K(ae, void 0), R = n(() => o.transition || `${w.namespace.value}-fade-in-linear`), L = n(() => process.env.NODE_ENV === "test" && !process.env.RUN_TEST_WITH_PERSISTENT ? !0 : o.persistent);
73
+ } = K(le, void 0), R = n(() => o.transition || `${w.namespace.value}-fade-in-linear`), L = n(() => process.env.NODE_ENV === "test" && !process.env.RUN_TEST_WITH_PERSISTENT ? !0 : process.env.NODE_ENV === "development" && !te ? !1 : o.persistent);
74
74
  Y(() => {
75
75
  l?.();
76
76
  });
77
- const H = n(() => t(L) ? !0 : t(s)), c = n(() => o.disabled ? !1 : t(s)), $ = n(() => o.appendTo || E.value), M = n(() => o.style ?? {}), i = v(!0), V = () => {
78
- A(), g() && ee(document.body), i.value = !0;
77
+ const H = n(() => t(L) ? !0 : t(s)), c = n(() => o.disabled ? !1 : t(s)), V = n(() => o.appendTo || T.value), $ = n(() => o.style ?? {}), i = v(!0), M = () => {
78
+ k(), g() && ee(document.body), i.value = !0;
79
79
  }, m = () => {
80
80
  if (t(d)) return !0;
81
- }, z = B(m, () => {
82
- o.enterable && t(p) === "hover" && P();
83
- }), j = B(m, () => {
81
+ }, z = h(m, () => {
82
+ o.enterable && t(p) === "hover" && N();
83
+ }), j = h(m, () => {
84
84
  t(p) === "hover" && a();
85
85
  }), D = () => {
86
- r.value?.updatePopper?.(), N?.();
86
+ r.value?.updatePopper?.(), A?.();
87
87
  }, F = () => {
88
88
  I?.();
89
89
  }, U = () => {
90
- k();
90
+ P();
91
91
  }, W = () => {
92
92
  o.virtualTriggering || a();
93
93
  }, g = (e) => {
@@ -97,7 +97,7 @@ const se = C({
97
97
  return y(
98
98
  () => t(s),
99
99
  (e) => {
100
- e ? (i.value = !1, l = te(S, () => {
100
+ e ? (i.value = !1, l = oe(S, () => {
101
101
  if (t(d)) return;
102
102
  t(p) !== "hover" && a();
103
103
  })) : l?.();
@@ -110,26 +110,26 @@ const se = C({
110
110
  () => {
111
111
  r.value?.updatePopper?.();
112
112
  }
113
- ), T({
113
+ ), E({
114
114
  /**
115
115
  * @description el-popper-content component instance
116
116
  */
117
117
  contentRef: r,
118
118
  isFocusInsideContent: g
119
- }), (e, f) => (h(), b(t(re), {
119
+ }), (e, f) => (C(), b(t(ae), {
120
120
  disabled: !e.teleported,
121
- to: $.value
121
+ to: V.value
122
122
  }, {
123
123
  default: u(() => [
124
124
  q(G, {
125
125
  name: R.value,
126
- onAfterLeave: V,
126
+ onAfterLeave: M,
127
127
  onBeforeEnter: D,
128
128
  onAfterEnter: U,
129
129
  onBeforeLeave: F
130
130
  }, {
131
131
  default: u(() => [
132
- H.value ? Q((h(), b(t(le), Z({
132
+ H.value ? Q((C(), b(t(se), Z({
133
133
  key: 0,
134
134
  id: t(O),
135
135
  ref_key: "contentRef",
@@ -149,7 +149,7 @@ const se = C({
149
149
  enterable: e.enterable,
150
150
  pure: e.pure,
151
151
  "popper-class": e.popperClass,
152
- "popper-style": [e.popperStyle, M.value],
152
+ "popper-style": [e.popperStyle, $.value],
153
153
  "reference-el": e.referenceEl,
154
154
  "trigger-target-el": e.triggerTargetEl,
155
155
  visible: c.value,
@@ -175,5 +175,5 @@ const se = C({
175
175
  }
176
176
  });
177
177
  export {
178
- Oe as default
178
+ Ne as default
179
179
  };
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.402",
3
+ "version": "0.0.404",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -1,4 +1,4 @@
1
- const o = "0.0.402";
1
+ const o = "0.0.404";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,4 +1,4 @@
1
- import { hasOwn as m, camelize as N, isArray as E } from "@vft/utils";
1
+ import { isArray as E, hasOwn as m, camelize as N } from "@vft/utils";
2
2
  import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
3
3
  import { debugWarn as O } from "../error.js";
4
4
  const R = "utils/vue/vnode";
@@ -1,7 +1,7 @@
1
1
  export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
3
  size: {
4
- type: import("vue").PropType<import("../types").ComponentSize>;
4
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
5
5
  };
6
6
  link: {
7
7
  type: import("vue").PropType<boolean>;
@@ -91,7 +91,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
91
91
  Defaults: {};
92
92
  }, Readonly<import("vue").ExtractPropTypes<{
93
93
  size: {
94
- type: import("vue").PropType<import("../types").ComponentSize>;
94
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
95
95
  };
96
96
  link: {
97
97
  type: import("vue").PropType<boolean>;
@@ -176,7 +176,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
176
176
  __isSuspense?: never;
177
177
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
178
178
  size: {
179
- type: import("vue").PropType<import("../types").ComponentSize>;
179
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
180
180
  };
181
181
  link: {
182
182
  type: import("vue").PropType<boolean>;
@@ -266,7 +266,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
266
266
  ButtonGroup: {
267
267
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
268
268
  size: {
269
- type: import("vue").PropType<import("../types").ComponentSize>;
269
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
270
270
  };
271
271
  type: {
272
272
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -280,7 +280,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
280
280
  Defaults: {};
281
281
  }, Readonly<import("vue").ExtractPropTypes<{
282
282
  size: {
283
- type: import("vue").PropType<import("../types").ComponentSize>;
283
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
284
284
  };
285
285
  type: {
286
286
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -291,7 +291,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
291
291
  __isSuspense?: never;
292
292
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
293
293
  size: {
294
- type: import("vue").PropType<import("../types").ComponentSize>;
294
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
295
295
  };
296
296
  type: {
297
297
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -305,7 +305,7 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
305
305
  export declare const VftButtonGroup: import("vft/es/utils").SFCWithInstall<{
306
306
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
307
307
  size: {
308
- type: import("vue").PropType<import("../types").ComponentSize>;
308
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
309
309
  };
310
310
  type: {
311
311
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -319,7 +319,7 @@ export declare const VftButtonGroup: import("vft/es/utils").SFCWithInstall<{
319
319
  Defaults: {};
320
320
  }, Readonly<import("vue").ExtractPropTypes<{
321
321
  size: {
322
- type: import("vue").PropType<import("../types").ComponentSize>;
322
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
323
323
  };
324
324
  type: {
325
325
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -330,7 +330,7 @@ export declare const VftButtonGroup: import("vft/es/utils").SFCWithInstall<{
330
330
  __isSuspense?: never;
331
331
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
332
332
  size: {
333
- type: import("vue").PropType<import("../types").ComponentSize>;
333
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
334
334
  };
335
335
  type: {
336
336
  type: import("vue").PropType<import("./types").ButtonType>;
@@ -1,5 +1,5 @@
1
1
  import type { IconProps } from 'vft/es/components';
2
- import type { ComponentSize } from 'vft/es/components/types.ts';
2
+ import type { ComponentSize } from 'vft/es/constants';
3
3
  import type { Component } from 'vue';
4
4
  export type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'text' | '';
5
5
  export interface ButtonConfigContext {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const k=require("../icon/index.cjs"),Y=require("@vueuse/core"),s=require("@vft/utils"),T=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const Be=require("lodash-es"),Z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("@vft/constants"),_=require("@vft/use"),ee=require("./utils.cjs"),te=require("../form/hooks/use-form-item.cjs"),oe=require("../form/hooks/use-form-common-props.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[q.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:ne,emit:ae}){const l=ae,v=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const o={};return t.containerRole==="combobox"&&(o["aria-haspopup"]=v["aria-haspopup"],o["aria-owns"]=v["aria-owns"],o["aria-expanded"]=v["aria-expanded"]),o}),le=e.computed(()=>[t.type==="textarea"?A.b():n.b(),n.m(ie.value),n.is("disabled",m.value),n.is("exceed",fe.value),n.is("focus",c.value),{[n.b("group")]:i.prepend||i.append,[n.bm("group","append")]:i.append,[n.bm("group","prepend")]:i.prepend,[n.m("prefix")]:i.prefix||t.prefixIcon,[n.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[n.bm("suffix","password-clear")]:E.value&&z.value},v.class]),se=e.getCurrentInstance(),re=e.computed(()=>[n.e("wrapper"),n.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:C}=te.useFormItem(),{inputId:F}=te.useFormItemInputId(se.props,{formItemContext:C}),ie=oe.useFormSize(),m=oe.useFormDisabled(),n=Z.useNamespace("input"),A=Z.useNamespace("textarea"),w=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),x=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>w.value||f.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),g=e.computed(()=>C?.validateState||""),K=e.computed(()=>g.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[g.value]),de=e.computed(()=>x.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[v.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||V.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),p=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!m.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!p.value&&N.value>Number(r.value.maxlength)),pe=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||p.value||!!g.value&&R.value),[ve,ye]=_.useCursor(w);Y.useResizeObserver(f,o=>{if(!p.value||t.resize!=="both")return;const a=o[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const B=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const o=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(f.value,o,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},b=()=>{const o=h.value;!o||o.value===u.value||(o.value=u.value)},P=async o=>{ve();let{value:a}=o.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!y.value){if(a===u.value){b();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),b(),ye()}},j=o=>{l("change",o.target.value)},he=()=>{l("suffixClick",t.modelValue)},ge=()=>{l("prefixClick",t.modelValue)},L=o=>{l("compositionstart",o),y.value=!0},be=o=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(o),W=o=>{l("compositionupdate",o);const a=o.target?.value,d=a[a.length-1]||"";y.value=!be(d)},H=o=>{l("compositionend",o),y.value&&(y.value=!1,P(o))},ke=()=>{x.value=!x.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},Ce=()=>h.value?.blur(),G=o=>{c.value=!0,l("focus",o)},J=o=>{c.value=!1,l("blur",o),t.validateEvent&&C?.validate?.("blur").catch(a=>T.debugWarn(a))},we=o=>{V.value=!1,l("mouseleave",o)},xe=o=>{V.value=!0,l("mouseenter",o)},Q=o=>{let a=o.key;if(o.target.type==="number"&&["e","+","-0","E"].includes(a))return o.returnValue=!1,!1;l("keydown",o)},Ee=()=>{h.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&C?.validate?.("change").catch(o=>T.debugWarn(o))}),e.watch(u,()=>b()),e.watch(()=>t.type,async()=>{await e.nextTick(),b(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),b(),e.nextTick(B)}),ne({input:w,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:Ce,select:Ee,clear:X,resizeTextarea:B}),(o,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:o.containerRole,onMouseenter:xe,onMouseleave:we,onMousewheel:a[1]||(a[1]=d=>o.type==="number"&&c.value?d.preventDefault():null)}),[o.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).be("group","prepend"))},[e.renderSlot(o.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[o.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("prefix-inner")),onClick:ge},[e.renderSlot(o.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(F),ref_key:"input",ref:w,class:e.unref(n).e("inner")},e.unref(r),{type:o.showPassword?x.value?"text":"password":o.type,disabled:e.unref(m),formatter:o.formatter,parser:o.parser,readonly:o.readonly,autocomplete:o.autocomplete,tabindex:o.tabindex,"aria-label":o.label,placeholder:o.placeholder,style:o.inputStyle,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(d=>l("enter"),["enter"]))}),null,16,Ie),pe.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(n).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("suffix-inner")),onClick:he},[!E.value||!z.value||!p.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(o.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(n).e("icon"),e.unref(n).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(n).e("icon"),e.unref(n).e("password")],onClick:ke}),null,16,["class"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(n).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),g.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(n).e("icon"),e.unref(n).e("validateIcon"),e.unref(n).is("loading",g.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),o.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).be("group","append"))},[e.renderSlot(o.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(F),ref_key:"textarea",ref:f,class:e.unref(A).e("inner")},e.unref(r),{tabindex:o.tabindex,disabled:e.unref(m),readonly:o.readonly,autocomplete:o.autocomplete,style:$.value,"aria-label":o.label,placeholder:o.placeholder,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),p.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(n).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,o.type!=="hidden"]])}});exports.default=ze;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const k=require("../icon/index.cjs"),Y=require("@vueuse/core"),s=require("@vft/utils"),T=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const Be=require("lodash-es"),Z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("@vft/constants"),_=require("@vft/use"),ee=require("./utils.cjs"),te=require("../form/hooks/use-form-common-props.cjs"),oe=require("../form/hooks/use-form-item.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[q.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:ne,emit:ae}){const l=ae,v=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const o={};return t.containerRole==="combobox"&&(o["aria-haspopup"]=v["aria-haspopup"],o["aria-owns"]=v["aria-owns"],o["aria-expanded"]=v["aria-expanded"]),o}),le=e.computed(()=>[t.type==="textarea"?A.b():n.b(),n.m(ie.value),n.is("disabled",m.value),n.is("exceed",fe.value),n.is("focus",c.value),{[n.b("group")]:i.prepend||i.append,[n.bm("group","append")]:i.append,[n.bm("group","prepend")]:i.prepend,[n.m("prefix")]:i.prefix||t.prefixIcon,[n.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[n.bm("suffix","password-clear")]:E.value&&z.value},v.class]),se=e.getCurrentInstance(),re=e.computed(()=>[n.e("wrapper"),n.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:C}=oe.useFormItem(),{inputId:F}=oe.useFormItemInputId(se.props,{formItemContext:C}),ie=te.useFormSize(),m=te.useFormDisabled(),n=Z.useNamespace("input"),A=Z.useNamespace("textarea"),w=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),x=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>w.value||f.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),g=e.computed(()=>C?.validateState||""),K=e.computed(()=>g.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[g.value]),de=e.computed(()=>x.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[v.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||V.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),p=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!m.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!p.value&&N.value>Number(r.value.maxlength)),pe=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||p.value||!!g.value&&R.value),[ve,ye]=_.useCursor(w);Y.useResizeObserver(f,o=>{if(!p.value||t.resize!=="both")return;const a=o[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const B=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const o=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(f.value,o,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},b=()=>{const o=h.value;!o||o.value===u.value||(o.value=u.value)},P=async o=>{ve();let{value:a}=o.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!y.value){if(a===u.value){b();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),b(),ye()}},j=o=>{l("change",o.target.value)},he=()=>{l("suffixClick",t.modelValue)},ge=()=>{l("prefixClick",t.modelValue)},L=o=>{l("compositionstart",o),y.value=!0},be=o=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(o),W=o=>{l("compositionupdate",o);const a=o.target?.value,d=a[a.length-1]||"";y.value=!be(d)},H=o=>{l("compositionend",o),y.value&&(y.value=!1,P(o))},ke=()=>{x.value=!x.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},Ce=()=>h.value?.blur(),G=o=>{c.value=!0,l("focus",o)},J=o=>{c.value=!1,l("blur",o),t.validateEvent&&C?.validate?.("blur").catch(a=>T.debugWarn(a))},we=o=>{V.value=!1,l("mouseleave",o)},xe=o=>{V.value=!0,l("mouseenter",o)},Q=o=>{let a=o.key;if(o.target.type==="number"&&["e","+","-0","E"].includes(a))return o.returnValue=!1,!1;l("keydown",o)},Ee=()=>{h.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&C?.validate?.("change").catch(o=>T.debugWarn(o))}),e.watch(u,()=>b()),e.watch(()=>t.type,async()=>{await e.nextTick(),b(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),b(),e.nextTick(B)}),ne({input:w,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:Ce,select:Ee,clear:X,resizeTextarea:B}),(o,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:o.containerRole,onMouseenter:xe,onMouseleave:we,onMousewheel:a[1]||(a[1]=d=>o.type==="number"&&c.value?d.preventDefault():null)}),[o.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).be("group","prepend"))},[e.renderSlot(o.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[o.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("prefix-inner")),onClick:ge},[e.renderSlot(o.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(F),ref_key:"input",ref:w,class:e.unref(n).e("inner")},e.unref(r),{type:o.showPassword?x.value?"text":"password":o.type,disabled:e.unref(m),formatter:o.formatter,parser:o.parser,readonly:o.readonly,autocomplete:o.autocomplete,tabindex:o.tabindex,"aria-label":o.label,placeholder:o.placeholder,style:o.inputStyle,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(d=>l("enter"),["enter"]))}),null,16,Ie),pe.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(n).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("suffix-inner")),onClick:he},[!E.value||!z.value||!p.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(o.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(n).e("icon"),e.unref(n).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(n).e("icon"),e.unref(n).e("password")],onClick:ke}),null,16,["class"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(n).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),g.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(n).e("icon"),e.unref(n).e("validateIcon"),e.unref(n).is("loading",g.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),o.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).be("group","append"))},[e.renderSlot(o.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(F),ref_key:"textarea",ref:f,class:e.unref(A).e("inner")},e.unref(r),{tabindex:o.tabindex,disabled:e.unref(m),readonly:o.readonly,autocomplete:o.autocomplete,style:$.value,"aria-label":o.label,placeholder:o.placeholder,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),p.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(n).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,o.type!=="hidden"]])}});exports.default=ze;
@@ -8,6 +8,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
8
8
  type: import("vue").PropType<"top" | "left" | "right">;
9
9
  default: string;
10
10
  };
11
+ labelWidth: {
12
+ type: import("vue").PropType<"string" | "number">;
13
+ default: string;
14
+ };
11
15
  showResetButton: {
12
16
  type: import("vue").PropType<boolean>;
13
17
  default: boolean;
@@ -150,6 +154,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
150
154
  }, import("vue").PublicProps, {
151
155
  size: import("vft/es/constants").ComponentSize;
152
156
  labelPosition: "left" | "right" | "top";
157
+ labelWidth: "string" | "number";
153
158
  showResetButton: boolean;
154
159
  showSubmitButton: boolean;
155
160
  showCommonButton: boolean;
@@ -180,6 +185,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
180
185
  type: import("vue").PropType<"top" | "left" | "right">;
181
186
  default: string;
182
187
  };
188
+ labelWidth: {
189
+ type: import("vue").PropType<"string" | "number">;
190
+ default: string;
191
+ };
183
192
  showResetButton: {
184
193
  type: import("vue").PropType<boolean>;
185
194
  default: boolean;
@@ -316,6 +325,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
316
325
  }, {}, {}, {}, {
317
326
  size: import("vft/es/constants").ComponentSize;
318
327
  labelPosition: "left" | "right" | "top";
328
+ labelWidth: "string" | "number";
319
329
  showResetButton: boolean;
320
330
  showSubmitButton: boolean;
321
331
  showCommonButton: boolean;
@@ -343,6 +353,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
343
353
  type: import("vue").PropType<"top" | "left" | "right">;
344
354
  default: string;
345
355
  };
356
+ labelWidth: {
357
+ type: import("vue").PropType<"string" | "number">;
358
+ default: string;
359
+ };
346
360
  showResetButton: {
347
361
  type: import("vue").PropType<boolean>;
348
362
  default: boolean;
@@ -485,6 +499,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
485
499
  }, string, {
486
500
  size: import("vft/es/constants").ComponentSize;
487
501
  labelPosition: "left" | "right" | "top";
502
+ labelWidth: "string" | "number";
488
503
  showResetButton: boolean;
489
504
  showSubmitButton: boolean;
490
505
  showCommonButton: boolean;
@@ -85,6 +85,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
85
85
  }>, {
86
86
  size: import("vft/es/constants").ComponentSize;
87
87
  labelPosition: "left" | "right" | "top";
88
+ labelWidth: "string" | "number";
88
89
  showResetButton: boolean;
89
90
  showSubmitButton: boolean;
90
91
  showCommonButton: boolean;