vft 0.0.416 → 0.0.419

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 (41) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/breadcrumb/breadcrumb-item.vue.d.ts +1 -1
  3. package/es/components/breadcrumb/breadcrumb.vue.d.ts +1 -1
  4. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  5. package/es/components/drawer/index.d.ts +1 -2
  6. package/es/components/radio/radio-button.vue.d.ts +1 -1
  7. package/es/components/radio/radio.vue.d.ts +15 -15
  8. package/es/components/radio/use-radio.d.ts +1 -1
  9. package/es/components/search/index.d.ts +172 -2
  10. package/es/components/search/search.vue.d.ts +3 -15
  11. package/es/components/search/search.vue2.js +78 -60
  12. package/es/components/search/types.d.ts +12 -0
  13. package/es/components/search/types.js +1 -0
  14. package/es/components/table/use/use-data-source.d.ts +1 -1
  15. package/es/components/teleport/teleport.vue.d.ts +1 -1
  16. package/es/package.json.d.ts +1 -1
  17. package/es/package.json.js +1 -1
  18. package/lib/components/breadcrumb/breadcrumb-item.vue.d.ts +1 -1
  19. package/lib/components/breadcrumb/breadcrumb.vue.d.ts +1 -1
  20. package/lib/components/drawer/index.d.ts +1 -2
  21. package/lib/components/radio/radio-button.vue.d.ts +1 -1
  22. package/lib/components/radio/radio.vue.d.ts +15 -15
  23. package/lib/components/radio/use-radio.d.ts +1 -1
  24. package/lib/components/search/index.d.ts +172 -2
  25. package/lib/components/search/search.vue.d.ts +3 -15
  26. package/lib/components/search/search.vue2.cjs +1 -1
  27. package/lib/components/search/types.cjs +1 -0
  28. package/lib/components/search/types.d.ts +12 -0
  29. package/lib/components/table/use/use-data-source.d.ts +1 -1
  30. package/lib/components/teleport/teleport.vue.d.ts +1 -1
  31. package/lib/package.json.cjs +1 -1
  32. package/lib/package.json.d.ts +1 -1
  33. package/package.json +5 -5
  34. package/theme-style/index.css +1 -1
  35. package/theme-style/src/card.scss +4 -4
  36. package/theme-style/src/dialog.scss +1 -0
  37. package/theme-style/src/drawer.scss +3 -12
  38. package/theme-style/vft-card.css +1 -1
  39. package/theme-style/vft-dialog.css +1 -1
  40. package/theme-style/vft-drawer.css +1 -1
  41. package/web-types.json +1 -1
@@ -1,50 +1,68 @@
1
- import { defineComponent as P, ref as i, computed as u, createElementBlock as V, openBlock as h, Fragment as T, withDirectives as X, createBlock as Y, createCommentVNode as Z, normalizeStyle as _, normalizeClass as w, unref as a, createVNode as ee, mergeProps as g, createSlots as oe, withCtx as l, renderSlot as r, createElementVNode as te } from "vue";
1
+ import { defineComponent as g, ref as a, computed as u, createElementBlock as V, openBlock as h, Fragment as T, withDirectives as X, createBlock as Y, createCommentVNode as Z, normalizeStyle as _, normalizeClass as w, unref as l, createVNode as ee, mergeProps as B, createSlots as oe, withCtx as i, renderSlot as r, createElementVNode as te } from "vue";
2
+ import { VftInput as ne } from "../input/index.js";
3
+ import { VftPopover as ae } from "../popover/index.js";
2
4
  import "@vueuse/core";
3
5
  import "@vft/utils";
4
- import { addUnit as f } from "../../utils/helper.js";
6
+ import { addUnit as d } from "../../utils/helper.js";
5
7
  import { generateCssVars as b } from "../../utils/ns-cover.js";
6
8
  import "lodash-es";
7
9
  import "../form/index.js";
8
- import { VftInput as ne } from "../input/index.js";
9
- import { VftPopover as ie } from "../popover/index.js";
10
- import { useNamespace as ae } from "../../hooks/use-namespace/index.js";
10
+ import { useNamespace as le } from "../../hooks/use-namespace/index.js";
11
11
  import "../../hooks/use-model-toggle/index.js";
12
12
  import "@popperjs/core";
13
13
  import "../../hooks/use-z-index/index.js";
14
- import { ClickOutside as le } from "@vft/directives";
15
- const re = P({
14
+ import { ClickOutside as ie } from "@vft/directives";
15
+ const re = g({
16
16
  name: "vft-search"
17
- }), ge = /* @__PURE__ */ P({
17
+ }), Be = /* @__PURE__ */ g({
18
18
  ...re,
19
19
  props: {
20
20
  width: { default: 200 },
21
21
  activeWidth: {},
22
22
  usePopover: { type: Boolean, default: !1 },
23
23
  popoverCfg: {},
24
+ id: {},
25
+ size: {},
26
+ disabled: { type: Boolean },
24
27
  modelValue: { default: "" },
25
- clearable: { type: Boolean, default: !0 },
28
+ type: {},
29
+ resize: {},
30
+ autosize: { type: [Object, Boolean] },
31
+ autocomplete: {},
32
+ formatter: {},
33
+ parser: {},
26
34
  placeholder: { default: "请输入你要搜索的内容" },
35
+ form: {},
36
+ readonly: { type: Boolean },
37
+ clearable: { type: Boolean, default: !0 },
38
+ showPassword: { type: Boolean },
39
+ showWordLimit: { type: Boolean },
27
40
  suffixIcon: { default: () => ({ icon: "icon-search", color: "#8B8C8C", pointer: !0 }) },
28
41
  prefixIcon: {},
29
- clearIcon: {}
42
+ clearIcon: {},
43
+ containerRole: {},
44
+ label: {},
45
+ tabindex: {},
46
+ validateEvent: { type: Boolean },
47
+ inputStyle: { type: [Boolean, null, String, Object, Array] }
30
48
  },
31
49
  emits: ["update:modelValue", "blur", "focus", "clear", "enter", "prefixClick", "suffixClick", "mouseenter", "mouseleave", "keydown", "change", "input", "compositionstart", "compositionupdate", "compositionend"],
32
- setup(t, { expose: $, emit: B }) {
33
- const d = ae("search"), o = B, C = i(), k = i(), c = i(), p = i(!1), m = i(!1), n = i(!1), R = u(
50
+ setup(t, { expose: P, emit: R }) {
51
+ const f = le("search"), o = R, y = a(), C = a(), c = a(), p = a(!1), m = a(!1), n = a(!1), S = u(
34
52
  () => b(
35
53
  {
36
- width: t.activeWidth && (n.value || t.modelValue) ? f(t.activeWidth) : f(t.width)
54
+ width: t.activeWidth && (n.value || t.modelValue) ? d(t.activeWidth) : d(t.width)
37
55
  },
38
56
  "input"
39
57
  )
40
- ), x = u(
58
+ ), $ = u(
41
59
  () => b(
42
60
  {
43
- "active-width": t.activeWidth ? f(t.activeWidth) : f(t.width)
61
+ "active-width": t.activeWidth ? d(t.activeWidth) : d(t.width)
44
62
  },
45
63
  "search"
46
64
  )
47
- ), S = u(() => ({
65
+ ), x = u(() => ({
48
66
  "show-arrow": !1,
49
67
  transition: "vft-zoom-in-top",
50
68
  placement: "bottom-start",
@@ -53,47 +71,47 @@ const re = P({
53
71
  ...t.popoverCfg
54
72
  })), E = (e) => {
55
73
  o("update:modelValue", e), o("input", e);
56
- }, I = () => {
74
+ }, W = () => {
57
75
  v();
58
76
  };
59
- function W() {
77
+ function z() {
60
78
  n.value = !0;
61
79
  }
62
80
  function v() {
63
81
  n.value = !1;
64
82
  }
65
- const M = () => {
83
+ const I = () => {
66
84
  o("clear"), s(!1);
67
85
  };
68
- function U() {
86
+ function M() {
69
87
  m.value = !0, o("mouseenter", t.modelValue);
70
88
  }
71
- function F() {
89
+ function U() {
72
90
  m.value = !1, o("mouseleave", t.modelValue);
73
91
  }
74
- const N = () => {
92
+ const F = () => {
75
93
  n.value = !0, p.value = !0, o("focus");
76
94
  };
77
- function z() {
95
+ function N() {
78
96
  p.value = !1, o("blur");
79
97
  }
80
- function D() {
98
+ function O() {
81
99
  s(), o("prefixClick", t.modelValue);
82
100
  }
83
- function K() {
101
+ function j() {
84
102
  s(), o("suffixClick", t.modelValue);
85
103
  }
86
- function O() {
104
+ function A() {
87
105
  s(), o("enter", t.modelValue);
88
106
  }
89
107
  function s(e = !0) {
90
108
  t.usePopover && v(), e && c.value.blur();
91
109
  }
92
- const A = (e) => {
110
+ const D = (e) => {
93
111
  o("keydown", e);
94
- }, H = u(() => C.value?.popperRef?.contentRef), L = (e) => {
112
+ }, K = u(() => y.value?.popperRef?.contentRef), L = (e) => {
95
113
  o("update:modelValue", e);
96
- }, j = (e) => {
114
+ }, H = (e) => {
97
115
  o("change", e);
98
116
  }, q = (e) => {
99
117
  o("compositionstart", e);
@@ -102,87 +120,87 @@ const re = P({
102
120
  }, J = (e) => {
103
121
  o("compositionend", e);
104
122
  };
105
- return $({
123
+ return P({
106
124
  isFocus: p,
107
125
  isHover: m,
108
126
  visible: n,
109
127
  hidePopover: v,
110
- showPopover: W,
128
+ showPopover: z,
111
129
  inputRef: c
112
- }), (e, y) => (h(), V(T, null, [
130
+ }), (e, k) => (h(), V(T, null, [
113
131
  X((h(), V("div", {
114
132
  ref_key: "searchRef",
115
- ref: k,
116
- class: w([a(d).b(), a(d).is("active", !!n.value || !!e.modelValue)]),
117
- style: _(x.value)
133
+ ref: C,
134
+ class: w([l(f).b(), l(f).is("active", !!n.value || !!e.modelValue)]),
135
+ style: _($.value)
118
136
  }, [
119
- ee(a(ne), g({
137
+ ee(l(ne), B({
120
138
  ref_key: "inputRef",
121
139
  ref: c
122
140
  }, e.$props, {
123
- "input-style": R.value,
141
+ "input-style": S.value,
124
142
  onInput: E,
125
- onFocus: N,
126
- onEnter: O,
127
- onBlur: z,
128
- onMouseenter: U,
143
+ onFocus: F,
144
+ onEnter: A,
145
+ onBlur: N,
146
+ onMouseenter: M,
129
147
  "onUpdate:modelValue": L,
130
- onMouseleave: F,
131
- onPrefixClick: D,
132
- onSuffixClick: K,
133
- onChange: j,
134
- onKeydown: A,
135
- onClear: M,
148
+ onMouseleave: U,
149
+ onPrefixClick: O,
150
+ onSuffixClick: j,
151
+ onChange: H,
152
+ onKeydown: D,
153
+ onClear: I,
136
154
  onCompositionstart: q,
137
155
  onCompositionupdate: G,
138
156
  onCompositionend: J
139
157
  }), oe({ _: 2 }, [
140
158
  e.$slots.prefix ? {
141
159
  name: "prefix",
142
- fn: l(() => [
160
+ fn: i(() => [
143
161
  r(e.$slots, "prefix")
144
162
  ]),
145
163
  key: "0"
146
164
  } : void 0,
147
165
  e.$slots.suffix ? {
148
166
  name: "suffix",
149
- fn: l(() => [
167
+ fn: i(() => [
150
168
  r(e.$slots, "suffix")
151
169
  ]),
152
170
  key: "1"
153
171
  } : void 0,
154
172
  e.$slots.prepend ? {
155
173
  name: "prepend",
156
- fn: l(() => [
174
+ fn: i(() => [
157
175
  r(e.$slots, "prepend")
158
176
  ]),
159
177
  key: "2"
160
178
  } : void 0,
161
179
  e.$slots.append ? {
162
180
  name: "append",
163
- fn: l(() => [
181
+ fn: i(() => [
164
182
  r(e.$slots, "append")
165
183
  ]),
166
184
  key: "3"
167
185
  } : void 0
168
186
  ]), 1040, ["input-style"])
169
187
  ], 6)), [
170
- [a(le), I, H.value]
188
+ [l(ie), W, K.value]
171
189
  ]),
172
- e.usePopover ? (h(), Y(a(ie), g({
190
+ e.usePopover ? (h(), Y(l(ae), B({
173
191
  key: 0,
174
192
  style: { "--vft-transition-duration": "3s" },
175
193
  ref_key: "popoverRef",
176
- ref: C
177
- }, S.value, {
178
- "virtual-ref": k.value,
194
+ ref: y
195
+ }, x.value, {
196
+ "virtual-ref": C.value,
179
197
  visible: n.value,
180
- "onUpdate:visible": y[0] || (y[0] = (Q) => n.value = Q),
198
+ "onUpdate:visible": k[0] || (k[0] = (Q) => n.value = Q),
181
199
  "virtual-triggering": ""
182
200
  }), {
183
- default: l(() => [
201
+ default: i(() => [
184
202
  te("div", {
185
- class: w(a(d).e("content"))
203
+ class: w(l(f).e("content"))
186
204
  }, [
187
205
  r(e.$slots, "default")
188
206
  ], 2)
@@ -193,5 +211,5 @@ const re = P({
193
211
  }
194
212
  });
195
213
  export {
196
- ge as default
214
+ Be as default
197
215
  };
@@ -0,0 +1,12 @@
1
+ import type { PopoverProps } from 'vft/es/components/popover';
2
+ import type { InputProps } from 'vft/es/components/input';
3
+ export interface SearchProps extends InputProps {
4
+ /** input 框宽度 */
5
+ width?: string | number;
6
+ /** input 获取焦点时的宽度 */
7
+ activeWidth?: string | number;
8
+ /** 是否需要 popover */
9
+ usePopover?: boolean;
10
+ /** popover 相关配置 参考 element */
11
+ popoverCfg?: PopoverProps;
12
+ }
@@ -0,0 +1 @@
1
+
@@ -1,6 +1,6 @@
1
1
  import { type PaginationProps } from 'vft/es/components/pagination';
2
2
  import { type ComputedRef } from 'vue';
3
- import { type Recordable } from '../../types.ts';
3
+ import { type Recordable } from '../../types';
4
4
  import type { TableProps } from '../types';
5
5
  export declare function useDataSource(propsRef: ComputedRef<TableProps>, { tableData, setLoading, getPaginationInfo, setPagination }: {
6
6
  tableData: any;
@@ -1,4 +1,4 @@
1
- import { TeleportProps } from './types.ts';
1
+ import { TeleportProps } from './types';
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.416",
3
+ "version": "0.0.419",
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.416";
1
+ const o = "0.0.419";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { BreadcrumbItemProps } from 'vft/es/components/breadcrumb/types.ts';
1
+ import type { BreadcrumbItemProps } from 'vft/es/components/breadcrumb/types';
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { BreadcrumbProps } from 'vft/es/components/breadcrumb/types.ts';
1
+ import type { BreadcrumbProps } from 'vft/es/components/breadcrumb/types';
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -1,4 +1,3 @@
1
- import { type DrawerProps } from './drawer.vue';
2
1
  export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
3
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
3
  direction: {
@@ -394,4 +393,4 @@ export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
394
393
  };
395
394
  })> & Record<string, any>;
396
395
  export default VftDrawer;
397
- export type { DrawerProps };
396
+ export * from './types';
@@ -1,4 +1,4 @@
1
- import type { RadioButtonProps, RadioProps } from './types.ts';
1
+ import type { RadioButtonProps, RadioProps } from './types';
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -2,46 +2,46 @@ declare function __VLS_template(): {
2
2
  default?(_: {}): any;
3
3
  };
4
4
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- modelValue: import("vft/es/utils/index.ts").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
5
+ modelValue: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
6
6
  size: {
7
- readonly type: import("vue").PropType<import("vft/es/utils/index.ts").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
7
+ readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
8
8
  readonly required: false;
9
9
  readonly validator: ((val: unknown) => boolean) | undefined;
10
10
  __epPropKey: true;
11
11
  };
12
12
  disabled: BooleanConstructor;
13
- label: import("vft/es/utils/index.ts").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
14
- value: import("vft/es/utils/index.ts").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
15
- name: import("vft/es/utils/index.ts").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
13
+ label: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
14
+ value: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
15
+ name: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
16
16
  border: BooleanConstructor;
17
17
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- click: (data: import("./types.ts").RadioProps) => void;
18
+ click: (data: import("./types").RadioProps) => void;
19
19
  change: (data: string | number | boolean | undefined) => void;
20
20
  "update:modelValue": (data: string | number | boolean | undefined) => void;
21
21
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
- modelValue: import("vft/es/utils/index.ts").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
22
+ modelValue: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
23
23
  size: {
24
- readonly type: import("vue").PropType<import("vft/es/utils/index.ts").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
24
+ readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
25
25
  readonly required: false;
26
26
  readonly validator: ((val: unknown) => boolean) | undefined;
27
27
  __epPropKey: true;
28
28
  };
29
29
  disabled: BooleanConstructor;
30
- label: import("vft/es/utils/index.ts").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
31
- value: import("vft/es/utils/index.ts").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
32
- name: import("vft/es/utils/index.ts").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
30
+ label: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
31
+ value: import("vft/es/utils").EpPropFinalized<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown, undefined, boolean>;
32
+ name: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
33
33
  border: BooleanConstructor;
34
34
  }>> & Readonly<{
35
- onClick?: ((data: import("./types.ts").RadioProps) => any) | undefined;
35
+ onClick?: ((data: import("./types").RadioProps) => any) | undefined;
36
36
  "onUpdate:modelValue"?: ((data: string | number | boolean | undefined) => any) | undefined;
37
37
  onChange?: ((data: string | number | boolean | undefined) => any) | undefined;
38
38
  }>, {
39
- label: import("vft/es/utils/index.ts").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
39
+ label: import("vft/es/utils").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
40
40
  disabled: boolean;
41
- value: import("vft/es/utils/index.ts").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
41
+ value: import("vft/es/utils").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
42
42
  border: boolean;
43
43
  name: string;
44
- modelValue: import("vft/es/utils/index.ts").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
44
+ modelValue: import("vft/es/utils").EpPropMergeType<(StringConstructor | NumberConstructor | BooleanConstructor)[], unknown, unknown>;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
46
46
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
47
47
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { RadioButtonProps, RadioEmitProps, RadioProps } from './types.ts';
1
+ import type { RadioButtonProps, RadioEmitProps, RadioProps } from './types';
2
2
  export declare const useRadio: (props: RadioProps | RadioButtonProps, emit?: RadioEmitProps) => {
3
3
  radioRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
4
4
  isGroup: import("vue").ComputedRef<boolean>;