vft 0.0.320 → 0.0.322

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/button/index.d.ts +9 -9
  3. package/es/components/carousel/use-carousel.js +1 -1
  4. package/es/components/form/form-item.vue.d.ts +1 -1
  5. package/es/components/form/index.d.ts +30 -30
  6. package/es/components/input/input.vue2.js +4 -4
  7. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  8. package/es/components/popconfirm/index.d.ts +15 -15
  9. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  10. package/es/components/skeleton/style/css.d.ts +1 -0
  11. package/es/components/skeleton/style/css.js +1 -0
  12. package/es/components/skeleton/style/index.d.ts +1 -0
  13. package/es/components/skeleton/style/index.js +1 -0
  14. package/es/components/super-form/super-form-item.vue2.js +1 -1
  15. package/es/components/super-form/use/helper.js +1 -1
  16. package/es/components/tabs/tab-bar.vue2.js +34 -30
  17. package/es/package.json.d.ts +1 -1
  18. package/es/package.json.js +1 -1
  19. package/es/utils/vue/vnode.js +1 -1
  20. package/lib/components/button/index.d.ts +9 -9
  21. package/lib/components/form/form-item.vue.d.ts +1 -1
  22. package/lib/components/form/index.d.ts +30 -30
  23. package/lib/components/input/input.vue2.cjs +1 -1
  24. package/lib/components/popconfirm/index.d.ts +15 -15
  25. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  26. package/lib/components/skeleton/style/css.cjs +1 -1
  27. package/lib/components/skeleton/style/css.d.ts +1 -0
  28. package/lib/components/skeleton/style/index.cjs +1 -1
  29. package/lib/components/skeleton/style/index.d.ts +1 -0
  30. package/lib/components/tabs/tab-bar.vue2.cjs +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/skeleton-item.scss +2 -0
  36. package/theme-style/src/tabs.scss +9 -5
  37. package/theme-style/vft-skeleton-item.css +1 -1
  38. package/theme-style/vft-tabs.css +1 -1
  39. package/web-types.json +1 -1
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
24
24
  size: {
25
25
  type: import("vue").PropType<import("../types").ComponentSize>;
26
26
  };
27
- dark: {
28
- type: import("vue").PropType<boolean>;
29
- };
30
27
  icon: {
31
28
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
32
29
  };
30
+ dark: {
31
+ type: import("vue").PropType<boolean>;
32
+ };
33
33
  loading: {
34
34
  type: import("vue").PropType<boolean>;
35
35
  };
@@ -114,12 +114,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
114
114
  size: {
115
115
  type: import("vue").PropType<import("../types").ComponentSize>;
116
116
  };
117
- dark: {
118
- type: import("vue").PropType<boolean>;
119
- };
120
117
  icon: {
121
118
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
122
119
  };
120
+ dark: {
121
+ type: import("vue").PropType<boolean>;
122
+ };
123
123
  loading: {
124
124
  type: import("vue").PropType<boolean>;
125
125
  };
@@ -199,12 +199,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
199
199
  size: {
200
200
  type: import("vue").PropType<import("../types").ComponentSize>;
201
201
  };
202
- dark: {
203
- type: import("vue").PropType<boolean>;
204
- };
205
202
  icon: {
206
203
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
207
204
  };
205
+ dark: {
206
+ type: import("vue").PropType<boolean>;
207
+ };
208
208
  loading: {
209
209
  type: import("vue").PropType<boolean>;
210
210
  };
@@ -10,7 +10,7 @@ import "../../hooks/use-model-toggle/index.js";
10
10
  import { useOrderedChildren as Ie } from "../../hooks/use-ordered-children/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- import { carouselContextKey as ge, CAROUSEL_ITEM_NAME as H } from "./constants.js";
13
+ import { CAROUSEL_ITEM_NAME as H, carouselContextKey as ge } from "./constants.js";
14
14
  const L = 300, _e = (t, O, M) => {
15
15
  const {
16
16
  children: o,
@@ -30,10 +30,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
30
30
  }>>> & Readonly<{
31
31
  "onUpdate:error"?: ((val: string) => any) | undefined;
32
32
  }>, {
33
+ required: boolean;
33
34
  labelWidth: string | number;
34
35
  inlineMessage: string | boolean;
35
36
  showMessage: boolean;
36
- required: boolean;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
38
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
39
39
  export default _default;
@@ -206,6 +206,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
206
206
  size: {
207
207
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
208
208
  };
209
+ required: {
210
+ type: import("vue").PropType<boolean>;
211
+ default: undefined;
212
+ };
209
213
  rules: {
210
214
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
211
215
  };
@@ -224,10 +228,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
224
228
  type: import("vue").PropType<boolean>;
225
229
  default: boolean;
226
230
  };
227
- required: {
228
- type: import("vue").PropType<boolean>;
229
- default: undefined;
230
- };
231
231
  for: {
232
232
  type: import("vue").PropType<string>;
233
233
  };
@@ -246,10 +246,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
246
246
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
247
247
  "update:error": (val: string) => void;
248
248
  }, import("vue").PublicProps, {
249
+ required: boolean;
249
250
  labelWidth: string | number;
250
251
  inlineMessage: string | boolean;
251
252
  showMessage: boolean;
252
- required: boolean;
253
253
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
254
254
  P: {};
255
255
  B: {};
@@ -270,6 +270,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
270
270
  size: {
271
271
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
272
272
  };
273
+ required: {
274
+ type: import("vue").PropType<boolean>;
275
+ default: undefined;
276
+ };
273
277
  rules: {
274
278
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
275
279
  };
@@ -288,10 +292,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
288
292
  type: import("vue").PropType<boolean>;
289
293
  default: boolean;
290
294
  };
291
- required: {
292
- type: import("vue").PropType<boolean>;
293
- default: undefined;
294
- };
295
295
  for: {
296
296
  type: import("vue").PropType<string>;
297
297
  };
@@ -308,10 +308,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
308
308
  clearValidate: () => void;
309
309
  resetField: () => void;
310
310
  }, {}, {}, {}, {
311
+ required: boolean;
311
312
  labelWidth: string | number;
312
313
  inlineMessage: string | boolean;
313
314
  showMessage: boolean;
314
- required: boolean;
315
315
  }>;
316
316
  __isFragment?: never;
317
317
  __isTeleport?: never;
@@ -329,6 +329,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
329
329
  size: {
330
330
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
331
331
  };
332
+ required: {
333
+ type: import("vue").PropType<boolean>;
334
+ default: undefined;
335
+ };
332
336
  rules: {
333
337
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
334
338
  };
@@ -347,10 +351,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
347
351
  type: import("vue").PropType<boolean>;
348
352
  default: boolean;
349
353
  };
350
- required: {
351
- type: import("vue").PropType<boolean>;
352
- default: undefined;
353
- };
354
354
  for: {
355
355
  type: import("vue").PropType<string>;
356
356
  };
@@ -369,10 +369,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
369
369
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
370
370
  "update:error": (val: string) => void;
371
371
  }, string, {
372
+ required: boolean;
372
373
  labelWidth: string | number;
373
374
  inlineMessage: string | boolean;
374
375
  showMessage: boolean;
375
- required: boolean;
376
376
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
377
377
  $slots: {
378
378
  label?(_: {
@@ -399,6 +399,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
399
399
  size: {
400
400
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
401
401
  };
402
+ required: {
403
+ type: import("vue").PropType<boolean>;
404
+ default: undefined;
405
+ };
402
406
  rules: {
403
407
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
404
408
  };
@@ -417,10 +421,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
417
421
  type: import("vue").PropType<boolean>;
418
422
  default: boolean;
419
423
  };
420
- required: {
421
- type: import("vue").PropType<boolean>;
422
- default: undefined;
423
- };
424
424
  for: {
425
425
  type: import("vue").PropType<string>;
426
426
  };
@@ -439,10 +439,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
439
439
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
440
440
  "update:error": (val: string) => void;
441
441
  }, import("vue").PublicProps, {
442
+ required: boolean;
442
443
  labelWidth: string | number;
443
444
  inlineMessage: string | boolean;
444
445
  showMessage: boolean;
445
- required: boolean;
446
446
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
447
447
  P: {};
448
448
  B: {};
@@ -463,6 +463,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
463
463
  size: {
464
464
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
465
465
  };
466
+ required: {
467
+ type: import("vue").PropType<boolean>;
468
+ default: undefined;
469
+ };
466
470
  rules: {
467
471
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
468
472
  };
@@ -481,10 +485,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
481
485
  type: import("vue").PropType<boolean>;
482
486
  default: boolean;
483
487
  };
484
- required: {
485
- type: import("vue").PropType<boolean>;
486
- default: undefined;
487
- };
488
488
  for: {
489
489
  type: import("vue").PropType<string>;
490
490
  };
@@ -501,10 +501,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
501
501
  clearValidate: () => void;
502
502
  resetField: () => void;
503
503
  }, {}, {}, {}, {
504
+ required: boolean;
504
505
  labelWidth: string | number;
505
506
  inlineMessage: string | boolean;
506
507
  showMessage: boolean;
507
- required: boolean;
508
508
  }>;
509
509
  __isFragment?: never;
510
510
  __isTeleport?: never;
@@ -522,6 +522,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
522
522
  size: {
523
523
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
524
524
  };
525
+ required: {
526
+ type: import("vue").PropType<boolean>;
527
+ default: undefined;
528
+ };
525
529
  rules: {
526
530
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
527
531
  };
@@ -540,10 +544,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
540
544
  type: import("vue").PropType<boolean>;
541
545
  default: boolean;
542
546
  };
543
- required: {
544
- type: import("vue").PropType<boolean>;
545
- default: undefined;
546
- };
547
547
  for: {
548
548
  type: import("vue").PropType<string>;
549
549
  };
@@ -562,10 +562,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
562
562
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
563
563
  "update:error": (val: string) => void;
564
564
  }, string, {
565
+ required: boolean;
565
566
  labelWidth: string | number;
566
567
  inlineMessage: string | boolean;
567
568
  showMessage: boolean;
568
- required: boolean;
569
569
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
570
570
  $slots: {
571
571
  label?(_: {
@@ -13,8 +13,8 @@ import "../../hooks/use-model-toggle/index.js";
13
13
  import "@popperjs/core";
14
14
  import "../../hooks/use-z-index/index.js";
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", h.value)
86
86
  ]), d = Je({
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(), p = ot(), o = pe("input"), Z = pe("textarea"), K = H(), y = H(), h = S(!1), D = S(!1), g = S(!1), M = S(!1), _ = S(), O = H(e.inputStyle), C = l(() => K.value || y.value), T = l(() => J(e.prefixIcon, "icon", { size: 16 })), ee = l(() => J(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => J(e.clearIcon, "icon", {
90
+ }), ke = et(), p = tt(), o = pe("input"), Z = pe("textarea"), K = H(), y = H(), h = S(!1), D = S(!1), g = S(!1), M = S(!1), _ = S(), O = H(e.inputStyle), C = l(() => K.value || y.value), T = l(() => J(e.prefixIcon, "icon", { size: 16 })), ee = l(() => J(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => J(e.clearIcon, "icon", {
91
91
  icon: "icon-circle-close",
92
92
  size: 16
93
93
  })), te = l(() => Ce?.statusIcon ?? !1), k = 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";
@@ -7,14 +7,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
7
7
  type: import("vue").PropType<string | number>;
8
8
  default: number;
9
9
  };
10
- teleported: {
11
- type: import("vue").PropType<boolean>;
12
- default: boolean;
13
- };
14
10
  icon: {
15
11
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
16
12
  default: string;
17
13
  };
14
+ teleported: {
15
+ type: import("vue").PropType<boolean>;
16
+ default: boolean;
17
+ };
18
18
  hideAfter: {
19
19
  type: import("vue").PropType<number>;
20
20
  default: number;
@@ -52,8 +52,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
52
52
  cancel: (val: MouseEvent) => void;
53
53
  }, import("vue").PublicProps, {
54
54
  width: string | number;
55
- teleported: boolean;
56
55
  icon: string | import("vft/es/vft").IconProps;
56
+ teleported: boolean;
57
57
  hideAfter: number;
58
58
  persistent: boolean;
59
59
  confirmButtonType: import("vft/es/vft").ButtonType;
@@ -74,14 +74,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
74
74
  type: import("vue").PropType<string | number>;
75
75
  default: number;
76
76
  };
77
- teleported: {
78
- type: import("vue").PropType<boolean>;
79
- default: boolean;
80
- };
81
77
  icon: {
82
78
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
83
79
  default: string;
84
80
  };
81
+ teleported: {
82
+ type: import("vue").PropType<boolean>;
83
+ default: boolean;
84
+ };
85
85
  hideAfter: {
86
86
  type: import("vue").PropType<number>;
87
87
  default: number;
@@ -116,8 +116,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
116
116
  onConfirm?: ((val: MouseEvent) => any) | undefined;
117
117
  }>, {}, {}, {}, {}, {
118
118
  width: string | number;
119
- teleported: boolean;
120
119
  icon: string | import("vft/es/vft").IconProps;
120
+ teleported: boolean;
121
121
  hideAfter: number;
122
122
  persistent: boolean;
123
123
  confirmButtonType: import("vft/es/vft").ButtonType;
@@ -135,14 +135,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
135
135
  type: import("vue").PropType<string | number>;
136
136
  default: number;
137
137
  };
138
- teleported: {
139
- type: import("vue").PropType<boolean>;
140
- default: boolean;
141
- };
142
138
  icon: {
143
139
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
144
140
  default: string;
145
141
  };
142
+ teleported: {
143
+ type: import("vue").PropType<boolean>;
144
+ default: boolean;
145
+ };
146
146
  hideAfter: {
147
147
  type: import("vue").PropType<number>;
148
148
  default: number;
@@ -180,8 +180,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
180
180
  cancel: (val: MouseEvent) => void;
181
181
  }, string, {
182
182
  width: string | number;
183
- teleported: boolean;
184
183
  icon: string | import("vft/es/vft").IconProps;
184
+ teleported: boolean;
185
185
  hideAfter: number;
186
186
  persistent: boolean;
187
187
  confirmButtonType: import("vft/es/vft").ButtonType;
@@ -43,8 +43,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
43
43
  onConfirm?: ((val: MouseEvent) => any) | undefined;
44
44
  }>, {
45
45
  width: string | number;
46
- teleported: boolean;
47
46
  icon: string | IconProps;
47
+ teleported: boolean;
48
48
  hideAfter: number;
49
49
  persistent: boolean;
50
50
  confirmButtonType: ButtonType;
@@ -1,2 +1,3 @@
1
1
  import 'vft/es/components/skeleton-item/style/css';
2
+ import 'vft/es/components/icon/style/css';
2
3
  import 'vft/theme-style/vft-skeleton.css';
@@ -1,3 +1,4 @@
1
1
  import "vft/theme-style/base.css";
2
2
  import "vft/theme-style/vft-skeleton-item.css";
3
+ import "vft/theme-style/vft-icon.css";
3
4
  import "vft/theme-style/vft-skeleton.css";
@@ -1,2 +1,3 @@
1
1
  import 'vft/es/components/skeleton-item/style';
2
+ import 'vft/es/components/icon/style';
2
3
  import 'vft/theme-style/src/skeleton.scss';
@@ -1,3 +1,4 @@
1
1
  import "vft/theme-style/src/base.scss";
2
2
  import "vft/theme-style/src/skeleton-item.scss";
3
+ import "vft/theme-style/src/icon.scss";
3
4
  import "vft/theme-style/src/skeleton.scss";
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, computed as L, unref as u, useSlots as _, createVNode as d, mergeProps as F, withDirectives as ee, vShow as te, createTextVNode as H, isVNode as re, resolveComponent as U } from "vue";
1
+ import { defineComponent as W, computed as L, unref as u, useSlots as _, createVNode as d, mergeProps as F, withDirectives as ee, vShow as te, isVNode as re, createTextVNode as H, resolveComponent as U } from "vue";
2
2
  import { VftCol as G } from "../col/index.js";
3
3
  import { VftDivider as ne } from "../divider/index.js";
4
4
  import { VftFormItem as oe } from "../form/index.js";
@@ -107,7 +107,7 @@ import "@popperjs/core";
107
107
  import "../../../hooks/use-z-index/index.js";
108
108
  import "../../message/index.js";
109
109
  import "../../progress-i/index.js";
110
- import { isInput as m, FormCompEnum as r } from "../component-map.js";
110
+ import { FormCompEnum as r, isInput as m } from "../component-map.js";
111
111
  function Ei(i, o = "") {
112
112
  return o = (o || "").replace(":", ""), [
113
113
  r.INPUT,
@@ -1,67 +1,71 @@
1
- import { defineComponent as N, inject as S, ref as h, watch as $, nextTick as k, onBeforeUnmount as C, computed as D, createElementBlock as E, openBlock as O, normalizeStyle as T, normalizeClass as F, unref as v } from "vue";
2
- import { useResizeObserver as y } from "@vueuse/core";
3
- import { capitalize as f } from "@vft/utils";
1
+ import { defineComponent as S, inject as $, ref as f, watch as T, nextTick as k, onBeforeUnmount as C, computed as D, onMounted as E, createElementBlock as O, openBlock as F, normalizeStyle as L, normalizeClass as P, unref as y } from "vue";
2
+ import { useResizeObserver as R } from "@vueuse/core";
3
+ import { capitalize as l } from "@vft/utils";
4
4
  import "../config-provider/hooks/use-global-config.js";
5
- import { isUndefined as P } from "lodash-es";
6
- import { useNamespace as j } from "../../hooks/use-namespace/index.js";
5
+ import { isUndefined as j } from "lodash-es";
6
+ import { useNamespace as U } from "../../hooks/use-namespace/index.js";
7
7
  import "../../hooks/use-model-toggle/index.js";
8
8
  import "@popperjs/core";
9
9
  import "../../hooks/use-z-index/index.js";
10
- import { TabsRootContextKey as L } from "./types.js";
11
- const V = /* @__PURE__ */ N({
10
+ import { TabsRootContextKey as K } from "./types.js";
11
+ const X = /* @__PURE__ */ S({
12
12
  __name: "tab-bar",
13
13
  props: {
14
14
  tabs: {},
15
15
  tabRefs: {},
16
16
  tabBarReduceDistance: {}
17
17
  },
18
- setup(R, { expose: g }) {
19
- const t = R, l = S(L), m = j("tabs"), i = h(), b = h(), x = () => {
20
- let e = 0, a = 0;
21
- const s = ["top", "bottom"].includes(l.props.tabPosition) ? "width" : "height", u = s === "width" ? "x" : "y", B = u === "x" ? "left" : "top";
18
+ setup(g, { expose: x }) {
19
+ const t = g, m = $(K), u = U("tabs"), i = f(), b = f(), d = f(!1), _ = () => {
20
+ let e = 0, s = 0;
21
+ const r = ["top", "bottom"].includes(m.props.tabPosition) ? "width" : "height", h = r === "width" ? "x" : "y", N = h === "x" ? "left" : "top";
22
22
  t.tabs.every((c) => {
23
- if (P(c.paneName)) return !1;
23
+ if (j(c.paneName)) return !1;
24
24
  const n = t.tabRefs?.[c.paneName];
25
25
  if (!n) return !1;
26
26
  if (!c.active)
27
27
  return !0;
28
- e = n[`offset${f(B)}`], a = n[`client${f(s)}`];
28
+ e = n[`offset${l(N)}`], s = n[`client${l(r)}`];
29
29
  const p = window.getComputedStyle(n);
30
- return s === "width" && (a -= Number.parseFloat(p.paddingLeft) + Number.parseFloat(p.paddingRight), e += Number.parseFloat(p.paddingLeft)), !1;
30
+ return r === "width" && (s -= Number.parseFloat(p.paddingLeft) + Number.parseFloat(p.paddingRight), e += Number.parseFloat(p.paddingLeft)), !1;
31
31
  });
32
- const d = t.tabBarReduceDistance || 0;
32
+ const v = t.tabBarReduceDistance || 0;
33
33
  return {
34
- [s]: `${a - d}px`,
35
- transform: `translate${f(u)}(${e + d / 2}px)`
34
+ [r]: `${s - v}px`,
35
+ transform: `translate${l(h)}(${e + v / 2}px)`
36
36
  };
37
- }, r = () => b.value = x(), o = [], _ = () => {
37
+ }, a = () => b.value = _(), o = [], w = () => {
38
38
  o.forEach((e) => e.stop()), o.length = 0, Object.values(t.tabRefs || {}).forEach((e) => {
39
- o.push(y(e, r));
39
+ o.push(R(e, a));
40
40
  });
41
41
  };
42
- $(
42
+ T(
43
43
  () => t.tabs,
44
44
  async () => {
45
- await k(), r(), _();
45
+ await k(), a(), w();
46
46
  },
47
47
  { immediate: !0 }
48
48
  );
49
- const w = y(i, () => r());
49
+ const z = R(i, () => a());
50
50
  C(() => {
51
- o.forEach((e) => e.stop()), o.length = 0, w.stop();
51
+ o.forEach((e) => e.stop()), o.length = 0, z.stop();
52
52
  });
53
- const z = D(() => l.props.tabPosition);
54
- return g({
53
+ const B = D(() => m.props.tabPosition);
54
+ return E(() => {
55
+ setTimeout(() => {
56
+ d.value = !0;
57
+ }, 100);
58
+ }), x({
55
59
  ref: i,
56
- update: r
57
- }), (e, a) => (O(), E("div", {
60
+ update: a
61
+ }), (e, s) => (F(), O("div", {
58
62
  ref_key: "barRef",
59
63
  ref: i,
60
- class: F([v(m).e("active-bar"), v(m).is(z.value)]),
61
- style: T(b.value)
64
+ class: P([y(u).e("active-bar"), y(u).is(B.value), { "is-load": d.value }]),
65
+ style: L(b.value)
62
66
  }, null, 6));
63
67
  }
64
68
  });
65
69
  export {
66
- V as default
70
+ X as default
67
71
  };
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.320",
3
+ "version": "0.0.322",
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.320";
1
+ const o = "0.0.322";
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";
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
24
24
  size: {
25
25
  type: import("vue").PropType<import("../types").ComponentSize>;
26
26
  };
27
- dark: {
28
- type: import("vue").PropType<boolean>;
29
- };
30
27
  icon: {
31
28
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
32
29
  };
30
+ dark: {
31
+ type: import("vue").PropType<boolean>;
32
+ };
33
33
  loading: {
34
34
  type: import("vue").PropType<boolean>;
35
35
  };
@@ -114,12 +114,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
114
114
  size: {
115
115
  type: import("vue").PropType<import("../types").ComponentSize>;
116
116
  };
117
- dark: {
118
- type: import("vue").PropType<boolean>;
119
- };
120
117
  icon: {
121
118
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
122
119
  };
120
+ dark: {
121
+ type: import("vue").PropType<boolean>;
122
+ };
123
123
  loading: {
124
124
  type: import("vue").PropType<boolean>;
125
125
  };
@@ -199,12 +199,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
199
199
  size: {
200
200
  type: import("vue").PropType<import("../types").ComponentSize>;
201
201
  };
202
- dark: {
203
- type: import("vue").PropType<boolean>;
204
- };
205
202
  icon: {
206
203
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
207
204
  };
205
+ dark: {
206
+ type: import("vue").PropType<boolean>;
207
+ };
208
208
  loading: {
209
209
  type: import("vue").PropType<boolean>;
210
210
  };
@@ -30,10 +30,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
30
30
  }>>> & Readonly<{
31
31
  "onUpdate:error"?: ((val: string) => any) | undefined;
32
32
  }>, {
33
+ required: boolean;
33
34
  labelWidth: string | number;
34
35
  inlineMessage: string | boolean;
35
36
  showMessage: boolean;
36
- required: boolean;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
38
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
39
39
  export default _default;