vft 0.0.506 → 0.0.507

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.
@@ -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 { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
14
+ import { carouselContextKey as Se, CAROUSEL_ITEM_NAME as H } from "./constants.js";
15
15
  const L = 300, ze = (t, O, M) => {
16
16
  const {
17
17
  children: o,
@@ -92,6 +92,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
92
92
  onSuffixClick?: ((value: any) => any) | undefined;
93
93
  onPrefixClick?: ((value: any) => any) | undefined;
94
94
  onEnter?: (() => any) | undefined;
95
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
95
96
  }>, {
96
97
  input: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
97
98
  textarea: import("vue").ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
@@ -122,6 +123,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
122
123
  suffixClick: (value: any) => void;
123
124
  prefixClick: (value: any) => void;
124
125
  enter: () => void;
126
+ passwordVisibleChange: (visible: boolean) => void;
125
127
  }, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
126
128
  P: {};
127
129
  B: {};
@@ -221,6 +223,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
221
223
  onSuffixClick?: ((value: any) => any) | undefined;
222
224
  onPrefixClick?: ((value: any) => any) | undefined;
223
225
  onEnter?: (() => any) | undefined;
226
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
224
227
  }>, {
225
228
  input: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
226
229
  textarea: import("vue").ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
@@ -331,6 +334,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
331
334
  onSuffixClick?: ((value: any) => any) | undefined;
332
335
  onPrefixClick?: ((value: any) => any) | undefined;
333
336
  onEnter?: (() => any) | undefined;
337
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
334
338
  }>, {
335
339
  input: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
336
340
  textarea: import("vue").ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
@@ -361,6 +365,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
361
365
  suffixClick: (value: any) => void;
362
366
  prefixClick: (value: any) => void;
363
367
  enter: () => void;
368
+ passwordVisibleChange: (visible: boolean) => void;
364
369
  }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
365
370
  $slots: {
366
371
  prepend?(_: {}): any;
@@ -75,6 +75,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
75
75
  suffixClick: (value: any) => void;
76
76
  prefixClick: (value: any) => void;
77
77
  enter: () => void;
78
+ passwordVisibleChange: (visible: boolean) => void;
78
79
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<InputProps>>> & Readonly<{
79
80
  onInput?: ((value: string) => any) | undefined;
80
81
  onClear?: (() => any) | undefined;
@@ -91,6 +92,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
91
92
  onSuffixClick?: ((value: any) => any) | undefined;
92
93
  onPrefixClick?: ((value: any) => any) | undefined;
93
94
  onEnter?: (() => any) | undefined;
95
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
94
96
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
95
97
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
96
98
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as Oe, useAttrs as Te, useSlots as Le, computed as l, ref as S, getCurrentInstance as je, shallowRef as H, watch as U, nextTick as E, onMounted as We, withDirectives as He, createElementBlock as c, openBlock as i, mergeProps as h, Fragment as q, createCommentVNode as u, createElementVNode as w, normalizeClass as r, unref as a, renderSlot as $, createBlock as V, withKeys as Ue, withModifiers as me, toDisplayString as D, normalizeStyle as qe, vShow as Ge } from "vue";
1
+ import { defineComponent as Oe, useAttrs as Te, useSlots as Le, computed as l, ref as E, getCurrentInstance as je, shallowRef as H, watch as U, nextTick as V, onMounted as We, withDirectives as He, createElementBlock as c, openBlock as i, mergeProps as h, Fragment as q, createCommentVNode as u, createElementVNode as w, normalizeClass as r, unref as a, renderSlot as $, createBlock as B, withKeys as Ue, withModifiers as me, toDisplayString as D, normalizeStyle as qe, vShow as Ge } from "vue";
2
2
  import "../form/index.js";
3
- import { VftIcon as B } from "../icon/index.js";
3
+ import { VftIcon as A } from "../icon/index.js";
4
4
  import { useResizeObserver as Je, isClient as Qe } from "@vueuse/core";
5
- import { isString as A, singleAttrToObj as G, noop as Xe, isObject as ve } from "@vft/utils";
5
+ import { isString as F, singleAttrToObj as G, noop as Xe, isObject as ve } from "@vft/utils";
6
6
  import { debugWarn as J } from "../../utils/error.js";
7
7
  import "../config-provider/hooks/use-global-config.js";
8
8
  import { isNil as Ye } from "lodash-es";
@@ -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 he } from "./utils.js";
16
- import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
17
- import { useFormItem as at, useFormItemInputId as nt } from "../form/hooks/use-form-item.js";
16
+ import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
17
+ import { useFormSize as at, useFormDisabled as nt } from "../form/hooks/use-form-common-props.js";
18
18
  const ot = ["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: {
@@ -44,11 +44,11 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
44
44
  inputStyle: { type: [Boolean, null, String, Object, Array] }
45
45
  },
46
46
  emits: {
47
- [Q]: (e) => A(e),
48
- input: (e) => A(e),
49
- change: (e) => A(e),
50
- suffixClick: (e) => A(e),
51
- prefixClick: (e) => A(e),
47
+ [Q]: (e) => F(e),
48
+ input: (e) => F(e),
49
+ change: (e) => F(e),
50
+ suffixClick: (e) => F(e),
51
+ prefixClick: (e) => F(e),
52
52
  focus: (e) => e instanceof FocusEvent,
53
53
  blur: (e) => e instanceof FocusEvent,
54
54
  clear: () => !0,
@@ -59,7 +59,8 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
59
59
  keydown: (e) => e instanceof Event,
60
60
  compositionstart: (e) => e instanceof CompositionEvent,
61
61
  compositionupdate: (e) => e instanceof CompositionEvent,
62
- compositionend: (e) => e instanceof CompositionEvent
62
+ compositionend: (e) => e instanceof CompositionEvent,
63
+ passwordVisibleChange: (e) => typeof e == "boolean"
63
64
  },
64
65
  setup(e, { expose: xe, emit: pe }) {
65
66
  const s = pe, g = Te(), m = Le(), X = l(() => {
@@ -85,19 +86,19 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
85
86
  n.is("focus", v.value)
86
87
  ]), d = Ze({
87
88
  excludeKeys: l(() => Object.keys(X.value))
88
- }), { form: Ce, formItem: F } = at(), { inputId: Y } = nt(we.props, {
89
- formItemContext: F
90
- }), ke = et(), x = tt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
89
+ }), { form: Ce, formItem: M } = et(), { inputId: Y } = tt(we.props, {
90
+ formItemContext: M
91
+ }), ke = at(), x = nt(), n = ye("input"), Z = ye("textarea"), K = H(), p = H(), v = E(!1), N = E(!1), C = E(!1), k = E(!1), _ = E(), O = H(e.inputStyle), I = l(() => K.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
91
92
  icon: "icon-circle-close",
92
93
  size: 16
93
- })), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
94
- () => I.value && {
94
+ })), te = l(() => Ce?.statusIcon ?? !1), z = l(() => M?.validateState || ""), ae = l(
95
+ () => z.value && {
95
96
  validating: "icon-loading",
96
97
  success: "icon-circle-check",
97
98
  error: "icon-circle-close"
98
- }[I.value]
99
+ }[z.value]
99
100
  ), ze = l(
100
- () => K.value ? { icon: "icon-view", size: 16 } : { icon: "icon-hide", size: 16 }
101
+ () => k.value ? { icon: "icon-view", size: 16 } : { icon: "icon-hide", size: 16 }
101
102
  ), Se = l(() => [
102
103
  g.style,
103
104
  e.inputStyle
@@ -119,8 +120,8 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
119
120
  !!b.value && j.value > Number(d.value.maxlength)
120
121
  )
121
122
  ), Ve = l(
122
- () => !!m.suffix || !!e.suffixIcon || P.value || e.showPassword || b.value || !!I.value && te.value
123
- ), [Be, Ae] = _e(M);
123
+ () => !!m.suffix || !!e.suffixIcon || P.value || e.showPassword || b.value || !!z.value && te.value
124
+ ), [Be, Ae] = _e(K);
124
125
  Je(p, (t) => {
125
126
  if (!b.value || e.resize !== "both") return;
126
127
  const o = t[0], { width: y } = o.contentRect;
@@ -140,18 +141,18 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
140
141
  O.value = {
141
142
  minHeight: he(p.value).minHeight
142
143
  };
143
- }, z = () => {
144
- const t = k.value;
144
+ }, S = () => {
145
+ const t = I.value;
145
146
  !t || t.value === f.value || (t.value = f.value);
146
147
  }, W = async (t) => {
147
148
  Be();
148
149
  let { value: o } = t.target;
149
150
  if (d.value.maxlength && o.length >= d.value.maxlength && (o = o.slice(0, Number(d.value.maxlength))), e.formatter && (o = e.parser ? e.parser(o) : o, o = e.formatter(o)), !C.value) {
150
151
  if (o === f.value) {
151
- z();
152
+ S();
152
153
  return;
153
154
  }
154
- s(Q, o), s("input", o), await E(), z(), Ae();
155
+ s(Q, o), s("input", o), await V(), S(), Ae();
155
156
  }
156
157
  }, oe = (t) => {
157
158
  s("change", t.target.value);
@@ -168,13 +169,13 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
168
169
  }, ie = (t) => {
169
170
  s("compositionend", t), C.value && (C.value = !1, W(t));
170
171
  }, Pe = () => {
171
- K.value = !K.value, ue();
172
+ k.value = !k.value, s("passwordVisibleChange", k.value), ue();
172
173
  }, ue = async () => {
173
- await E(), k.value?.focus();
174
- }, Re = () => k.value?.blur(), re = (t) => {
174
+ await V(), I.value?.focus();
175
+ }, Re = () => I.value?.blur(), re = (t) => {
175
176
  v.value = !0, s("focus", t);
176
177
  }, ce = (t) => {
177
- v.value = !1, s("blur", t), e.validateEvent && F?.validate?.("blur").catch((o) => J(o));
178
+ v.value = !1, s("blur", t), e.validateEvent && M?.validate?.("blur").catch((o) => J(o));
178
179
  }, $e = (t) => {
179
180
  N.value = !1, s("mouseleave", t);
180
181
  }, De = (t) => {
@@ -185,32 +186,32 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
185
186
  return t.returnValue = !1, !1;
186
187
  s("keydown", t);
187
188
  }, Ne = () => {
188
- k.value?.select();
189
+ I.value?.select();
189
190
  }, fe = () => {
190
191
  s(Q, ""), s("change", ""), s("clear"), s("input", "");
191
192
  };
192
193
  return U(
193
194
  () => e.modelValue,
194
195
  () => {
195
- E(() => R()), e.validateEvent && F?.validate?.("change").catch((t) => J(t));
196
+ V(() => R()), e.validateEvent && M?.validate?.("change").catch((t) => J(t));
196
197
  }
197
- ), U(f, () => z()), U(
198
+ ), U(f, () => S()), U(
198
199
  () => e.type,
199
200
  async () => {
200
- await E(), z(), R();
201
+ await V(), S(), R();
201
202
  }
202
203
  ), We(() => {
203
204
  !e.formatter && e.parser && J(
204
205
  "VftInput",
205
206
  "If you set the parser, you also need to set the formatter."
206
- ), z(), E(R);
207
+ ), S(), V(R);
207
208
  }), xe({
208
209
  /** @description HTML input element */
209
- input: M,
210
+ input: K,
210
211
  /** @description HTML textarea element */
211
212
  textarea: p,
212
213
  /** @description HTML element, input or textarea */
213
- ref: k,
214
+ ref: I,
214
215
  /** @description style of textarea. */
215
216
  textareaStyle: ne,
216
217
  /** @description from props (used on unit test) */
@@ -252,7 +253,7 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
252
253
  onClick: Me
253
254
  }, [
254
255
  $(t.$slots, "prefix"),
255
- T.value?.icon ? (i(), V(a(B), h({
256
+ T.value?.icon ? (i(), B(a(A), h({
256
257
  key: 0,
257
258
  pointer: ""
258
259
  }, T.value, {
@@ -263,10 +264,10 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
263
264
  w("input", h({
264
265
  id: a(Y),
265
266
  ref_key: "input",
266
- ref: M,
267
+ ref: K,
267
268
  class: a(n).e("inner")
268
269
  }, a(d), {
269
- type: e.showPassword ? K.value ? "text" : "password" : e.type,
270
+ type: e.showPassword ? k.value ? "text" : "password" : e.type,
270
271
  disabled: a(x),
271
272
  formatter: e.formatter,
272
273
  parser: e.parser,
@@ -297,11 +298,11 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
297
298
  }, [
298
299
  !P.value || !L.value || !b.value ? (i(), c(q, { key: 0 }, [
299
300
  $(t.$slots, "suffix"),
300
- ee.value?.icon ? (i(), V(a(B), h({ key: 0 }, ee.value, {
301
+ ee.value?.icon ? (i(), B(a(A), h({ key: 0 }, ee.value, {
301
302
  class: a(n).e("icon")
302
303
  }), null, 16, ["class"])) : u("", !0)
303
304
  ], 64)) : u("", !0),
304
- P.value ? (i(), V(a(B), h({
305
+ P.value ? (i(), B(a(A), h({
305
306
  key: 1,
306
307
  pointer: "",
307
308
  class: [a(n).e("icon"), a(n).e("clear")]
@@ -309,7 +310,7 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
309
310
  onMousedown: me(a(Xe), ["prevent"]),
310
311
  onClick: me(fe, ["stop"])
311
312
  }), null, 16, ["class", "onMousedown"])) : u("", !0),
312
- L.value ? (i(), V(a(B), h({ key: 2 }, ze.value, {
313
+ L.value ? (i(), B(a(A), h({ key: 2 }, ze.value, {
313
314
  class: [a(n).e("icon"), a(n).e("password")],
314
315
  onClick: Pe
315
316
  }), null, 16, ["class"])) : u("", !0),
@@ -321,13 +322,13 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
321
322
  class: r(a(n).e("count-inner"))
322
323
  }, D(j.value) + " / " + D(a(d).maxlength), 3)
323
324
  ], 2)) : u("", !0),
324
- I.value && ae.value && te.value ? (i(), V(a(B), {
325
+ z.value && ae.value && te.value ? (i(), B(a(A), {
325
326
  key: 4,
326
327
  icon: ae.value,
327
328
  class: r([
328
329
  a(n).e("icon"),
329
330
  a(n).e("validateIcon"),
330
- a(n).is("loading", I.value === "validating")
331
+ a(n).is("loading", z.value === "validating")
331
332
  ])
332
333
  }, null, 8, ["icon", "class"])) : u("", !0)
333
334
  ], 2)
@@ -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, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
3
+ import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } 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";
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.506",
3
+ "version": "0.0.507",
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.506";
1
+ const o = "0.0.507";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,4 +1,4 @@
1
- import { isArray as E, hasOwn as m, camelize as N } from "@vft/utils";
1
+ import { hasOwn as m, camelize as N, isArray as E } 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";
@@ -92,6 +92,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
92
92
  onSuffixClick?: ((value: any) => any) | undefined;
93
93
  onPrefixClick?: ((value: any) => any) | undefined;
94
94
  onEnter?: (() => any) | undefined;
95
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
95
96
  }>, {
96
97
  input: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
97
98
  textarea: import("vue").ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
@@ -122,6 +123,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
122
123
  suffixClick: (value: any) => void;
123
124
  prefixClick: (value: any) => void;
124
125
  enter: () => void;
126
+ passwordVisibleChange: (visible: boolean) => void;
125
127
  }, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
126
128
  P: {};
127
129
  B: {};
@@ -221,6 +223,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
221
223
  onSuffixClick?: ((value: any) => any) | undefined;
222
224
  onPrefixClick?: ((value: any) => any) | undefined;
223
225
  onEnter?: (() => any) | undefined;
226
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
224
227
  }>, {
225
228
  input: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
226
229
  textarea: import("vue").ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
@@ -331,6 +334,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
331
334
  onSuffixClick?: ((value: any) => any) | undefined;
332
335
  onPrefixClick?: ((value: any) => any) | undefined;
333
336
  onEnter?: (() => any) | undefined;
337
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
334
338
  }>, {
335
339
  input: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
336
340
  textarea: import("vue").ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
@@ -361,6 +365,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
361
365
  suffixClick: (value: any) => void;
362
366
  prefixClick: (value: any) => void;
363
367
  enter: () => void;
368
+ passwordVisibleChange: (visible: boolean) => void;
364
369
  }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
365
370
  $slots: {
366
371
  prepend?(_: {}): any;
@@ -75,6 +75,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
75
75
  suffixClick: (value: any) => void;
76
76
  prefixClick: (value: any) => void;
77
77
  enter: () => void;
78
+ passwordVisibleChange: (visible: boolean) => void;
78
79
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<InputProps>>> & Readonly<{
79
80
  onInput?: ((value: string) => any) | undefined;
80
81
  onClear?: (() => any) | undefined;
@@ -91,6 +92,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
91
92
  onSuffixClick?: ((value: any) => any) | undefined;
92
93
  onPrefixClick?: ((value: any) => any) | undefined;
93
94
  onEnter?: (() => any) | undefined;
95
+ onPasswordVisibleChange?: ((visible: boolean) => any) | undefined;
94
96
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
95
97
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
96
98
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const b=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"),ne=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:oe,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const n={};return t.containerRole==="combobox"&&(n["aria-haspopup"]=p["aria-haspopup"],n["aria-owns"]=p["aria-owns"],n["aria-expanded"]=p["aria-expanded"]),n}),le=e.computed(()=>[t.type==="textarea"?A.b():o.b(),o.m(ie.value),o.is("disabled",m.value),o.is("exceed",fe.value),o.is("focus",c.value),{[o.b("group")]:i.prepend||i.append,[o.bm("group","append")]:i.append,[o.bm("group","prepend")]:i.prepend,[o.m("prefix")]:i.prefix||t.prefixIcon,[o.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[o.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[o.e("wrapper"),o.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:k}=ne.useFormItem(),{inputId:F}=ne.useFormItemInputId(se.props,{formItemContext:k}),ie=te.useFormSize(),m=te.useFormDisabled(),o=Z.useNamespace("input"),A=Z.useNamespace("textarea"),C=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),w=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>C.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),x=e.computed(()=>k?.validateState||""),K=e.computed(()=>x.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[x.value]),de=e.computed(()=>w.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.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)),v=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(()=>!!v.value&&N.value>Number(r.value.maxlength)),ve=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||v.value||!!x.value&&R.value),[pe,ye]=_.useCursor(C);Y.useResizeObserver(f,n=>{if(!v.value||t.resize!=="both")return;const a=n[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 n=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,n,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},g=()=>{const n=h.value;!n||n.value===u.value||(n.value=u.value)},P=async n=>{pe();let{value:a}=n.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){g();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=n=>{l("change",n.target.value)},he=()=>{l("suffixClick",t.modelValue)},xe=()=>{l("prefixClick",t.modelValue)},L=n=>{l("compositionstart",n),y.value=!0},ge=n=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(n),W=n=>{l("compositionupdate",n);const a=n.target?.value,d=a[a.length-1]||"";y.value=!ge(d)},H=n=>{l("compositionend",n),y.value&&(y.value=!1,P(n))},be=()=>{w.value=!w.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},ke=()=>h.value?.blur(),G=n=>{c.value=!0,l("focus",n)},J=n=>{c.value=!1,l("blur",n),t.validateEvent&&k?.validate?.("blur").catch(a=>T.debugWarn(a))},Ce=n=>{V.value=!1,l("mouseleave",n)},we=n=>{V.value=!0,l("mouseenter",n)},Q=n=>{const a=n.key;if(n.target.type==="number"&&["e","+","-0","E"].includes(a))return n.returnValue=!1,!1;l("keydown",n)},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&&k?.validate?.("change").catch(n=>T.debugWarn(n))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),oe({input:C,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:ke,select:Ee,clear:X,resizeTextarea:B}),(n,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:t.containerRole,onMouseenter:we,onMouseleave:Ce,onMousewheel:a[1]||(a[1]=d=>t.type==="number"&&c.value?d.preventDefault():null)}),[t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(n.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[n.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner")),onClick:xe},[e.renderSlot(n.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(o).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:C,class:e.unref(o).e("inner")},e.unref(r),{type:t.showPassword?w.value?"text":"password":t.type,disabled:e.unref(m),formatter:t.formatter,parser:t.parser,readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.label,placeholder:t.placeholder,style:t.inputStyle,form:t.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),ve.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner")),onClick:he},[!E.value||!z.value||!v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(o).e("icon"),e.unref(o).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(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(o).e("icon"),e.unref(o).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),x.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",x.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),n.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(n.$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:t.tabindex,disabled:e.unref(m),readonly:t.readonly,autocomplete:t.autocomplete,style:$.value,"aria-label":t.label,placeholder:t.placeholder,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),v.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,t.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 Ve=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"),ne=require("../form/hooks/use-form-common-props.cjs"),Be=["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,passwordVisibleChange:t=>typeof t=="boolean"},setup(t,{expose:oe,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const n={};return t.containerRole==="combobox"&&(n["aria-haspopup"]=p["aria-haspopup"],n["aria-owns"]=p["aria-owns"],n["aria-expanded"]=p["aria-expanded"]),n}),le=e.computed(()=>[t.type==="textarea"?A.b():o.b(),o.m(ie.value),o.is("disabled",m.value),o.is("exceed",fe.value),o.is("focus",c.value),{[o.b("group")]:i.prepend||i.append,[o.bm("group","append")]:i.append,[o.bm("group","prepend")]:i.prepend,[o.m("prefix")]:i.prefix||t.prefixIcon,[o.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[o.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[o.e("wrapper"),o.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=ne.useFormSize(),m=ne.useFormDisabled(),o=Z.useNamespace("input"),A=Z.useNamespace("textarea"),w=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),B=e.ref(!1),y=e.ref(!1),h=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),x=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),b=e.computed(()=>C?.validateState||""),K=e.computed(()=>b.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[b.value]),de=e.computed(()=>h.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Ve.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||B.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),v=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(()=>!!v.value&&N.value>Number(r.value.maxlength)),ve=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||v.value||!!b.value&&R.value),[pe,ye]=_.useCursor(w);Y.useResizeObserver(f,n=>{if(!v.value||t.resize!=="both")return;const a=n[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const V=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const n=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,n,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},g=()=>{const n=x.value;!n||n.value===u.value||(n.value=u.value)},P=async n=>{pe();let{value:a}=n.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){g();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=n=>{l("change",n.target.value)},he=()=>{l("suffixClick",t.modelValue)},xe=()=>{l("prefixClick",t.modelValue)},L=n=>{l("compositionstart",n),y.value=!0},be=n=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(n),W=n=>{l("compositionupdate",n);const a=n.target?.value,d=a[a.length-1]||"";y.value=!be(d)},H=n=>{l("compositionend",n),y.value&&(y.value=!1,P(n))},ge=()=>{h.value=!h.value,l("passwordVisibleChange",h.value),U()},U=async()=>{await e.nextTick(),x.value?.focus()},ke=()=>x.value?.blur(),G=n=>{c.value=!0,l("focus",n)},J=n=>{c.value=!1,l("blur",n),t.validateEvent&&C?.validate?.("blur").catch(a=>T.debugWarn(a))},Ce=n=>{B.value=!1,l("mouseleave",n)},we=n=>{B.value=!0,l("mouseenter",n)},Q=n=>{const a=n.key;if(n.target.type==="number"&&["e","+","-0","E"].includes(a))return n.returnValue=!1,!1;l("keydown",n)},Ee=()=>{x.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>V()),t.validateEvent&&C?.validate?.("change").catch(n=>T.debugWarn(n))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),V()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(V)}),oe({input:w,textarea:f,ref:x,textareaStyle:$,autosize:t.autosize,focus:U,blur:ke,select:Ee,clear:X,resizeTextarea:V}),(n,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:t.containerRole,onMouseenter:we,onMouseleave:Ce,onMousewheel:a[1]||(a[1]=d=>t.type==="number"&&c.value?d.preventDefault():null)}),[t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(n.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[n.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner")),onClick:xe},[e.renderSlot(n.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(o).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(o).e("inner")},e.unref(r),{type:t.showPassword?h.value?"text":"password":t.type,disabled:e.unref(m),formatter:t.formatter,parser:t.parser,readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.label,placeholder:t.placeholder,style:t.inputStyle,form:t.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),ve.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner")),onClick:he},[!E.value||!z.value||!v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(o).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(o).e("icon"),e.unref(o).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(o).e("icon"),e.unref(o).e("password")],onClick:ge}),null,16,["class"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),b.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(k.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",b.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),n.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(n.$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:t.tabindex,disabled:e.unref(m),readonly:t.readonly,autocomplete:t.autocomplete,style:$.value,"aria-label":t.label,placeholder:t.placeholder,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),v.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Be)),[[e.vShow,t.type!=="hidden"]])}});exports.default=ze;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.506";exports.version=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.507";exports.version=e;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.506",
3
+ "version": "0.0.507",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vft",
3
- "version": "0.0.506",
3
+ "version": "0.0.507",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -57,9 +57,9 @@
57
57
  "sortablejs": "1.15.0",
58
58
  "photoswipe": "5.4.4",
59
59
  "@vft/constants": "0.0.83",
60
+ "@vft/use": "0.0.96",
60
61
  "@vft/router": "0.0.73",
61
62
  "@vft/store": "0.0.78",
62
- "@vft/use": "0.0.96",
63
63
  "@vft/utils": "0.0.161",
64
64
  "@vft/directives": "0.0.36"
65
65
  },