vft 0.0.415 → 0.0.417

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 (143) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/components/autocomplete/autocomplete.vue.d.ts +8 -8
  4. package/es/components/autocomplete/index.d.ts +24 -24
  5. package/es/components/button/button.vue.d.ts +1 -1
  6. package/es/components/button/index.d.ts +30 -30
  7. package/es/components/button/use-button.d.ts +1 -1
  8. package/es/components/carousel/use-carousel.js +1 -1
  9. package/es/components/color-picker/composables/use-alpha-slider.d.ts +2 -2
  10. package/es/components/config-provider/config-provider.vue.d.ts +2 -0
  11. package/es/components/config-provider/config-provider.vue2.js +4 -3
  12. package/es/components/config-provider/index.d.ts +9 -0
  13. package/es/components/dialog/constants.d.ts +1 -0
  14. package/es/components/dialog/constants.js +2 -1
  15. package/es/components/dialog/dialog-content.vue.d.ts +4 -1
  16. package/es/components/dialog/dialog-content.vue2.js +59 -48
  17. package/es/components/dialog/dialog.vue.d.ts +4 -19
  18. package/es/components/dialog/dialog.vue2.js +104 -89
  19. package/es/components/dialog/index.d.ts +70 -3
  20. package/es/components/dialog/index.js +5 -4
  21. package/es/components/dialog/types.d.ts +69 -0
  22. package/es/components/dialog/{hooks/use-dialog.d.ts → use-dialog.d.ts} +11 -2
  23. package/es/components/dialog/use-dialog.js +138 -0
  24. package/es/components/drawer/composables/useResizable.d.ts +7 -0
  25. package/es/components/drawer/composables/useResizable.js +53 -0
  26. package/es/components/drawer/drawer.vue.d.ts +3 -7
  27. package/es/components/drawer/drawer.vue2.js +122 -97
  28. package/es/components/drawer/index.d.ts +78 -0
  29. package/es/components/drawer/types.d.ts +13 -0
  30. package/es/components/drawer/types.js +1 -0
  31. package/es/components/dropdown/dropdown.vue.d.ts +1 -1
  32. package/es/components/dropdown/index.d.ts +15 -15
  33. package/es/components/form/index.d.ts +6 -6
  34. package/es/components/index.js +172 -171
  35. package/es/components/input/input.vue2.js +4 -4
  36. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  37. package/es/components/input-tag/input-tag.vue.d.ts +1 -1
  38. package/es/components/link/index.d.ts +3 -3
  39. package/es/components/md-code-demo/md-code-demo.js +10 -10
  40. package/es/components/modal/index.d.ts +87 -24
  41. package/es/components/modal/modal.vue.d.ts +1 -1
  42. package/es/components/modal/modal.vue2.js +24 -17
  43. package/es/components/multiple-tabs/multiple-tabs.vue2.js +82 -79
  44. package/es/components/popover/index.d.ts +0 -9
  45. package/es/components/popover/popover.vue2.js +4 -5
  46. package/es/components/popover/types.d.ts +23 -1
  47. package/es/components/search/search.vue2.js +3 -3
  48. package/es/components/select/index.d.ts +20 -20
  49. package/es/components/select/select.vue.d.ts +20 -20
  50. package/es/components/select/useSelect.d.ts +17 -17
  51. package/es/components/super-form/super-form-item.vue2.js +1 -1
  52. package/es/components/table/index.d.ts +9 -9
  53. package/es/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +1 -1
  54. package/es/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +1 -1
  55. package/es/components/timeline/index.d.ts +6 -6
  56. package/es/components/tooltip/index.d.ts +3 -3
  57. package/es/components/tooltip/tooltip.vue2.js +1 -1
  58. package/es/components/tooltip/types.d.ts +81 -1
  59. package/es/hooks/use-draggable/index.d.ts +5 -1
  60. package/es/hooks/use-draggable/index.js +39 -34
  61. package/es/hooks/use-z-index/index.js +3 -3
  62. package/es/index.js +2 -2
  63. package/es/package.json.d.ts +1 -1
  64. package/es/package.json.js +1 -1
  65. package/es/utils/helper.d.ts +1 -1
  66. package/es/utils/ns-cover.d.ts +1 -1
  67. package/es/utils/vue/vnode.js +1 -1
  68. package/lib/components/autocomplete/autocomplete.vue.d.ts +8 -8
  69. package/lib/components/autocomplete/index.d.ts +24 -24
  70. package/lib/components/button/button.vue.d.ts +1 -1
  71. package/lib/components/button/index.d.ts +30 -30
  72. package/lib/components/button/use-button.d.ts +1 -1
  73. package/lib/components/color-picker/composables/use-alpha-slider.d.ts +2 -2
  74. package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
  75. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  76. package/lib/components/config-provider/index.d.ts +9 -0
  77. package/lib/components/dialog/constants.cjs +1 -1
  78. package/lib/components/dialog/constants.d.ts +1 -0
  79. package/lib/components/dialog/dialog-content.vue.d.ts +4 -1
  80. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  81. package/lib/components/dialog/dialog.vue.d.ts +4 -19
  82. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  83. package/lib/components/dialog/index.cjs +1 -1
  84. package/lib/components/dialog/index.d.ts +70 -3
  85. package/lib/components/dialog/types.d.ts +69 -0
  86. package/lib/components/dialog/use-dialog.cjs +1 -0
  87. package/lib/components/dialog/{hooks/use-dialog.d.ts → use-dialog.d.ts} +11 -2
  88. package/lib/components/drawer/composables/useResizable.cjs +1 -0
  89. package/lib/components/drawer/composables/useResizable.d.ts +7 -0
  90. package/lib/components/drawer/drawer.vue.d.ts +3 -7
  91. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  92. package/lib/components/drawer/index.d.ts +78 -0
  93. package/lib/components/drawer/types.cjs +1 -0
  94. package/lib/components/drawer/types.d.ts +13 -0
  95. package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
  96. package/lib/components/dropdown/index.d.ts +15 -15
  97. package/lib/components/form/index.d.ts +6 -6
  98. package/lib/components/index.cjs +1 -1
  99. package/lib/components/input/input.vue2.cjs +1 -1
  100. package/lib/components/input-tag/input-tag.vue.d.ts +1 -1
  101. package/lib/components/link/index.d.ts +3 -3
  102. package/lib/components/md-code-demo/md-code-demo.cjs +1 -1
  103. package/lib/components/modal/index.d.ts +87 -24
  104. package/lib/components/modal/modal.vue.d.ts +1 -1
  105. package/lib/components/modal/modal.vue2.cjs +1 -1
  106. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  107. package/lib/components/popover/index.d.ts +0 -9
  108. package/lib/components/popover/popover.vue2.cjs +1 -1
  109. package/lib/components/popover/types.d.ts +23 -1
  110. package/lib/components/search/search.vue2.cjs +1 -1
  111. package/lib/components/select/index.d.ts +20 -20
  112. package/lib/components/select/select.vue.d.ts +20 -20
  113. package/lib/components/select/useSelect.d.ts +17 -17
  114. package/lib/components/table/index.d.ts +9 -9
  115. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +1 -1
  116. package/lib/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +1 -1
  117. package/lib/components/timeline/index.d.ts +6 -6
  118. package/lib/components/tooltip/index.d.ts +3 -3
  119. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  120. package/lib/components/tooltip/types.d.ts +81 -1
  121. package/lib/hooks/use-draggable/index.cjs +1 -1
  122. package/lib/hooks/use-draggable/index.d.ts +5 -1
  123. package/lib/index.cjs +1 -1
  124. package/lib/package.json.cjs +1 -1
  125. package/lib/package.json.d.ts +1 -1
  126. package/lib/utils/helper.d.ts +1 -1
  127. package/lib/utils/ns-cover.d.ts +1 -1
  128. package/package.json +3 -3
  129. package/tags.json +1 -1
  130. package/theme-style/index.css +1 -1
  131. package/theme-style/src/card.scss +4 -4
  132. package/theme-style/src/dialog.scss +36 -35
  133. package/theme-style/src/drawer.scss +109 -21
  134. package/theme-style/src/md-container.scss +1 -0
  135. package/theme-style/src/tag.scss +1 -1
  136. package/theme-style/vft-card.css +1 -1
  137. package/theme-style/vft-dialog.css +1 -1
  138. package/theme-style/vft-drawer.css +1 -1
  139. package/theme-style/vft-md-container.css +1 -1
  140. package/theme-style/vft-tag.css +1 -1
  141. package/web-types.json +1 -1
  142. package/es/components/dialog/hooks/use-dialog.js +0 -106
  143. package/lib/components/dialog/hooks/use-dialog.cjs +0 -1
@@ -1,23 +1,23 @@
1
- import { defineComponent as g, inject as m, computed as d, createElementBlock as p, openBlock as r, normalizeStyle as k, normalizeClass as l, unref as e, createElementVNode as s, createCommentVNode as u, renderSlot as a, createBlock as R, toDisplayString as $, mergeProps as v } from "vue";
2
- import { singleAttrToObj as E } from "@vft/utils";
3
- import { VftIcon as N } from "../icon/index.js";
1
+ import { defineComponent as y, inject as u, computed as r, createElementBlock as g, openBlock as a, normalizeStyle as E, normalizeClass as s, unref as t, createElementVNode as n, createCommentVNode as p, renderSlot as i, createBlock as N, toDisplayString as P, mergeProps as S } from "vue";
2
+ import { singleAttrToObj as T } from "@vft/utils";
3
+ import { VftIcon as j } from "../icon/index.js";
4
4
  import "../focus-trap/focus-trap.vue2.js";
5
- import { FOCUS_TRAP_INJECTION_KEY as S } from "../focus-trap/tokens.js";
5
+ import { FOCUS_TRAP_INJECTION_KEY as z } from "../focus-trap/tokens.js";
6
6
  import "../focus-trap/utils.js";
7
7
  import "@vueuse/core";
8
8
  import "../config-provider/hooks/use-global-config.js";
9
9
  import "lodash-es";
10
- import { composeRefs as T } from "../../utils/vue/refs.js";
10
+ import { composeRefs as K } from "../../utils/vue/refs.js";
11
11
  import "../form/index.js";
12
- import { useDraggable as j } from "../../hooks/use-draggable/index.js";
12
+ import { useDraggable as O } from "../../hooks/use-draggable/index.js";
13
13
  import "../../hooks/use-model-toggle/index.js";
14
14
  import "@popperjs/core";
15
15
  import "../../hooks/use-z-index/index.js";
16
- import { dialogInjectionKey as z } from "./constants.js";
17
- const D = ["id"], O = g({
16
+ import { dialogInjectionKey as V } from "./constants.js";
17
+ const A = ["id"], F = y({
18
18
  name: "vft-dialog-content"
19
- }), Z = /* @__PURE__ */ g({
20
- ...O,
19
+ }), le = /* @__PURE__ */ y({
20
+ ...F,
21
21
  props: {
22
22
  center: { type: Boolean, default: !1 },
23
23
  alignCenter: { type: Boolean, default: !1 },
@@ -26,61 +26,72 @@ const D = ["id"], O = g({
26
26
  draggable: { type: Boolean, default: !1 },
27
27
  fullscreen: { type: Boolean, default: !1 },
28
28
  showClose: { type: Boolean, default: !0 },
29
- title: { default: "" }
29
+ title: { default: "" },
30
+ overflow: { type: Boolean },
31
+ headerClass: {},
32
+ bodyClass: {},
33
+ footerClass: {}
30
34
  },
31
35
  emits: ["close"],
32
- setup(n) {
33
- const { dialogRef: i, headerRef: f, bodyId: y, ns: t, style: C } = m(z), { focusTrapRef: b } = m(S), h = T(b, i), B = d(() => n.draggable);
34
- j(i, f, B);
35
- const I = d(() => E(n.closeIcon, "icon", {
36
+ setup(l, { expose: C }) {
37
+ const { dialogRef: f, headerRef: d, bodyId: b, ns: e, style: h } = u(V), { focusTrapRef: v } = u(z), B = K(v, f), c = r(() => l.draggable), I = r(() => l.overflow), { resetPosition: k, updatePosition: w, isDragging: R } = O(
38
+ f,
39
+ d,
40
+ c,
41
+ I
42
+ ), $ = r(() => [
43
+ e.b(),
44
+ e.is("fullscreen", l.fullscreen),
45
+ e.is("draggable", c.value),
46
+ e.is("dragging", R.value),
47
+ e.is("align-center", l.alignCenter),
48
+ { [e.m("center")]: l.center }
49
+ ]), D = r(() => T(l.closeIcon, "icon", {
36
50
  icon: "icon-close",
37
- pointer: !0
51
+ pointer: !0,
52
+ size: 16
38
53
  }));
39
- return (o, c) => (r(), p("div", {
40
- ref: e(h),
41
- class: l([
42
- e(t).b(),
43
- e(t).is("fullscreen", o.fullscreen),
44
- e(t).is("draggable", o.draggable),
45
- e(t).is("align-center", o.alignCenter),
46
- { [e(t).m("center")]: o.center },
47
- o.customClass
48
- ]),
49
- style: k(e(C)),
54
+ return C({
55
+ resetPosition: k,
56
+ updatePosition: w
57
+ }), (o, m) => (a(), g("div", {
58
+ ref: t(B),
59
+ class: s($.value),
60
+ style: E(t(h)),
50
61
  tabindex: "-1"
51
62
  }, [
52
- s("header", {
63
+ n("header", {
53
64
  ref_key: "headerRef",
54
- ref: f,
55
- class: l(e(t).e("header"))
65
+ ref: d,
66
+ class: s([t(e).e("header"), o.headerClass, { "show-close": o.showClose }])
56
67
  }, [
57
- a(o.$slots, "header", {}, () => [
58
- s("span", {
68
+ i(o.$slots, "header", {}, () => [
69
+ n("span", {
59
70
  role: "heading",
60
- class: l(e(t).e("title"))
61
- }, $(o.title), 3)
71
+ class: s(t(e).e("title"))
72
+ }, P(o.title), 3)
62
73
  ]),
63
- o.showClose ? (r(), R(e(N), v({
74
+ o.showClose ? (a(), N(t(j), S({
64
75
  key: 0,
65
- onClick: c[0] || (c[0] = (V) => o.$emit("close")),
66
- class: e(t).e("close")
67
- }, I.value, { size: "20" }), null, 16, ["class"])) : u("", !0)
76
+ class: [t(e).e("headerbtn")],
77
+ onClick: m[0] || (m[0] = (J) => o.$emit("close"))
78
+ }, D.value), null, 16, ["class"])) : p("", !0)
68
79
  ], 2),
69
- s("div", {
70
- id: e(y),
71
- class: l(e(t).e("body"))
80
+ n("div", {
81
+ id: t(b),
82
+ class: s([t(e).e("body"), o.bodyClass])
72
83
  }, [
73
- a(o.$slots, "default")
74
- ], 10, D),
75
- o.$slots.footer ? (r(), p("footer", {
84
+ i(o.$slots, "default")
85
+ ], 10, A),
86
+ o.$slots.footer ? (a(), g("footer", {
76
87
  key: 0,
77
- class: l(e(t).e("footer"))
88
+ class: s([t(e).e("footer"), o.footerClass])
78
89
  }, [
79
- a(o.$slots, "footer")
80
- ], 2)) : u("", !0)
90
+ i(o.$slots, "footer")
91
+ ], 2)) : p("", !0)
81
92
  ], 6));
82
93
  }
83
94
  });
84
95
  export {
85
- Z as default
96
+ le as default
86
97
  };
@@ -1,22 +1,4 @@
1
- import { type DialogContentProps } from './types';
2
- type DoneFn = (cancel?: boolean) => void;
3
- export interface DialogProps extends DialogContentProps {
4
- appendToBody?: boolean;
5
- beforeClose?: (done: DoneFn) => void;
6
- destroyOnClose?: boolean;
7
- closeOnClickModal?: boolean;
8
- closeOnPressEscape?: boolean;
9
- lockScroll?: boolean;
10
- modal?: boolean;
11
- openDelay?: number;
12
- closeDelay?: number;
13
- top?: string;
14
- modelValue?: boolean;
15
- modalClass?: string;
16
- width?: string | number;
17
- zIndex?: number;
18
- trapFocus?: boolean;
19
- }
1
+ import { type DialogProps } from './types';
20
2
  declare function __VLS_template(): {
21
3
  header?(_: {
22
4
  close: () => void;
@@ -28,8 +10,11 @@ declare function __VLS_template(): {
28
10
  footer?(_: {}): any;
29
11
  };
30
12
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DialogProps>>, {
13
+ /** @description whether the dialog is visible */
31
14
  visible: import("vue").Ref<boolean, boolean>;
32
15
  dialogContentRef: import("vue").Ref<any, any>;
16
+ resetPosition: () => void;
17
+ handleClose: () => void;
33
18
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
19
  "update:modelValue": (value: boolean) => void;
35
20
  close: () => void;
@@ -1,29 +1,30 @@
1
- import { defineComponent as B, ref as i, getCurrentInstance as z, provide as O, computed as P, createBlock as C, openBlock as b, unref as e, withCtx as t, createVNode as f, Transition as N, withDirectives as q, createElementVNode as j, normalizeStyle as K, normalizeClass as U, createCommentVNode as G, mergeProps as H, createSlots as J, renderSlot as n, vShow as Q } from "vue";
2
- import { isBoolean as W } from "@vft/utils";
3
- import X from "../focus-trap/focus-trap.vue.js";
1
+ import { defineComponent as B, ref as p, getCurrentInstance as O, provide as N, computed as q, createBlock as b, openBlock as g, unref as e, withCtx as l, createVNode as m, Transition as j, normalizeProps as K, guardReactiveProps as L, withDirectives as U, createElementVNode as G, normalizeStyle as H, normalizeClass as J, createCommentVNode as Q, mergeProps as W, createSlots as X, renderSlot as d, vShow as Y } from "vue";
2
+ import Z from "../focus-trap/focus-trap.vue.js";
4
3
  import "../focus-trap/utils.js";
5
- import { VftOverlay as Y } from "../overlay/index.js";
6
- import { UPDATE_MODEL_EVENT as Z } from "../../constants/event.js";
4
+ import { VftOverlay as _ } from "../overlay/index.js";
5
+ import { VftTeleport as x } from "../teleport/index.js";
6
+ import { UPDATE_MODEL_EVENT as ee } from "../../constants/event.js";
7
7
  import "@vueuse/core";
8
+ import { isBoolean as oe } from "@vft/utils";
8
9
  import "../config-provider/hooks/use-global-config.js";
9
10
  import "lodash-es";
10
11
  import "../form/index.js";
11
- import { useNamespace as _ } from "../../hooks/use-namespace/index.js";
12
+ import { useNamespace as le } from "../../hooks/use-namespace/index.js";
12
13
  import "../../hooks/use-model-toggle/index.js";
13
14
  import "@popperjs/core";
14
- import { useSameTarget as x } from "../../hooks/use-same-target/index.js";
15
+ import { useSameTarget as te } from "../../hooks/use-same-target/index.js";
15
16
  import "../../hooks/use-z-index/index.js";
16
- import { VftTeleport as ee } from "../teleport/index.js";
17
- import { dialogInjectionKey as oe } from "./constants.js";
18
- import te from "./dialog-content.vue2.js";
19
- import { useDialog as le } from "./hooks/use-dialog.js";
20
- const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
17
+ import { dialogInjectionKey as ae } from "./constants.js";
18
+ import se from "./dialog-content.vue2.js";
19
+ import { useDialog as re } from "./use-dialog.js";
20
+ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
21
21
  name: "vft-dialog",
22
22
  inheritAttrs: !1
23
- }), Re = /* @__PURE__ */ B({
24
- ...se,
23
+ }), $e = /* @__PURE__ */ B({
24
+ ...de,
25
25
  props: {
26
26
  appendToBody: { type: Boolean, default: !1 },
27
+ appendTo: { default: "body" },
27
28
  beforeClose: {},
28
29
  destroyOnClose: { type: Boolean, default: !1 },
29
30
  closeOnClickModal: { type: Boolean, default: !0 },
@@ -33,11 +34,14 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
33
34
  openDelay: { default: 0 },
34
35
  closeDelay: { default: 0 },
35
36
  top: {},
37
+ modalPenetrable: { type: Boolean },
36
38
  modelValue: { type: Boolean, default: !1 },
37
39
  modalClass: {},
38
40
  width: {},
39
41
  zIndex: {},
40
42
  trapFocus: { type: Boolean, default: !1 },
43
+ overflow: { type: Boolean },
44
+ transition: {},
41
45
  center: { type: Boolean, default: !1 },
42
46
  alignCenter: { type: Boolean, default: !1 },
43
47
  closeIcon: {},
@@ -45,10 +49,13 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
45
49
  draggable: { type: Boolean, default: !1 },
46
50
  fullscreen: { type: Boolean, default: !1 },
47
51
  showClose: { type: Boolean, default: !0 },
48
- title: { default: "" }
52
+ title: { default: "" },
53
+ headerClass: {},
54
+ bodyClass: {},
55
+ footerClass: {}
49
56
  },
50
57
  emits: {
51
- [Z]: (r) => W(r),
58
+ [ee]: (s) => oe(s),
52
59
  open: () => !0,
53
60
  opened: () => !0,
54
61
  close: () => !0,
@@ -56,134 +63,142 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
56
63
  openAutoFocus: () => !0,
57
64
  closeAutoFocus: () => !0
58
65
  },
59
- setup(r, { expose: k }) {
60
- const d = _("dialog"), p = i(), A = i(), m = i(), F = z(), {
66
+ setup(s, { expose: k }) {
67
+ const r = le("dialog"), c = p(), w = p(), i = p(), h = O(), {
61
68
  visible: u,
62
- titleId: c,
63
- bodyId: y,
64
- style: w,
65
- overlayDialogStyle: R,
69
+ titleId: y,
70
+ bodyId: C,
71
+ style: F,
72
+ overlayDialogStyle: P,
66
73
  rendered: v,
67
- zIndex: E,
68
- afterEnter: T,
69
- afterLeave: h,
70
- beforeLeave: I,
71
- handleClose: g,
74
+ transitionConfig: T,
75
+ zIndex: R,
76
+ _draggable: A,
77
+ _alignCenter: $,
78
+ _overflow: I,
79
+ handleClose: f,
72
80
  onModalClick: M,
73
- onOpenAutoFocus: $,
74
- onCloseAutoFocus: V,
81
+ onOpenAutoFocus: V,
82
+ onCloseAutoFocus: z,
75
83
  onCloseRequested: D,
76
- onFocusoutPrevented: L
77
- } = le(F.props, p);
78
- O(oe, {
79
- dialogRef: p,
80
- headerRef: A,
81
- bodyId: y,
82
- ns: d,
84
+ onFocusoutPrevented: E
85
+ } = re(h.props, c);
86
+ N(ae, {
87
+ dialogRef: c,
88
+ headerRef: w,
89
+ bodyId: C,
90
+ ns: r,
83
91
  rendered: v,
84
- style: w
92
+ style: F
85
93
  });
86
- const l = x(M), S = P(() => r.draggable && !r.fullscreen);
94
+ const t = te(M), S = q(() => s.modalPenetrable && !s.modal && !s.fullscreen);
87
95
  return k({
96
+ /** @description whether the dialog is visible */
88
97
  visible: u,
89
- dialogContentRef: m
90
- }), (o, a) => (b(), C(e(ee), {
91
- to: "body",
92
- disabled: !o.appendToBody
98
+ dialogContentRef: i,
99
+ resetPosition: () => {
100
+ i.value?.resetPosition();
101
+ },
102
+ handleClose: f
103
+ }), (o, a) => (g(), b(e(x), {
104
+ to: o.appendTo,
105
+ disabled: o.appendTo !== "body" ? !1 : !o.appendToBody
93
106
  }, {
94
- default: t(() => [
95
- f(N, {
96
- name: "dialog-fade",
97
- onAfterEnter: e(T),
98
- onAfterLeave: e(h),
99
- onBeforeLeave: e(I)
100
- }, {
101
- default: t(() => [
102
- q(f(e(Y), {
107
+ default: l(() => [
108
+ m(j, K(L(e(T))), {
109
+ default: l(() => [
110
+ U(m(e(_), {
103
111
  "custom-mask-event": "",
104
112
  mask: o.modal,
105
- "overlay-class": o.modalClass,
106
- "z-index": e(E)
113
+ "overlay-class": [
114
+ o.modalClass ?? "",
115
+ `${e(r).namespace.value}-modal-dialog`,
116
+ e(r).is("penetrable", S.value)
117
+ ],
118
+ "z-index": e(R)
107
119
  }, {
108
- default: t(() => [
109
- j("div", {
120
+ default: l(() => [
121
+ G("div", {
110
122
  role: "dialog",
111
123
  "aria-modal": "true",
112
124
  "aria-label": o.title || void 0,
113
- "aria-labelledby": o.title ? void 0 : e(c),
114
- "aria-describedby": e(y),
115
- class: U(`${e(d).namespace.value}-overlay-dialog`),
116
- style: K(e(R)),
125
+ "aria-labelledby": o.title ? void 0 : e(y),
126
+ "aria-describedby": e(C),
127
+ class: J(`${e(r).namespace.value}-overlay-dialog`),
128
+ style: H(e(P)),
117
129
  onClick: a[0] || (a[0] = //@ts-ignore
118
- (...s) => e(l).onClick && e(l).onClick(...s)),
130
+ (...n) => e(t).onClick && e(t).onClick(...n)),
119
131
  onMousedown: a[1] || (a[1] = //@ts-ignore
120
- (...s) => e(l).onMousedown && e(l).onMousedown(...s)),
132
+ (...n) => e(t).onMousedown && e(t).onMousedown(...n)),
121
133
  onMouseup: a[2] || (a[2] = //@ts-ignore
122
- (...s) => e(l).onMouseup && e(l).onMouseup(...s))
134
+ (...n) => e(t).onMouseup && e(t).onMouseup(...n))
123
135
  }, [
124
- f(e(X), {
136
+ m(e(Z), {
125
137
  loop: "",
126
138
  trapped: e(u),
127
139
  "focus-start-el": "container",
128
- onFocusAfterTrapped: e($),
129
- onFocusAfterReleased: e(V),
130
- onFocusoutPrevented: e(L),
140
+ onFocusAfterTrapped: e(V),
141
+ onFocusAfterReleased: e(z),
142
+ onFocusoutPrevented: e(E),
131
143
  onReleaseRequested: e(D)
132
144
  }, {
133
- default: t(() => [
134
- e(v) ? (b(), C(te, H({
145
+ default: l(() => [
146
+ e(v) ? (g(), b(se, W({
135
147
  key: 0,
136
148
  ref_key: "dialogContentRef",
137
- ref: m
149
+ ref: i
138
150
  }, o.$attrs, {
139
- "custom-class": o.customClass,
140
151
  center: o.center,
141
- "align-center": o.alignCenter,
152
+ "align-center": e($),
142
153
  "close-icon": o.closeIcon,
143
- draggable: S.value,
154
+ draggable: e(A),
155
+ overflow: e(I),
144
156
  fullscreen: o.fullscreen,
157
+ "header-class": o.headerClass,
158
+ "body-class": o.bodyClass,
159
+ "footer-class": o.footerClass,
145
160
  "show-close": o.showClose,
146
161
  title: o.title,
147
- onClose: e(g)
148
- }), J({
149
- header: t(() => [
150
- o.$slots.title ? n(o.$slots, "title", { key: 1 }) : n(o.$slots, "header", {
162
+ onClose: e(f)
163
+ }), X({
164
+ header: l(() => [
165
+ o.$slots.title ? d(o.$slots, "title", { key: 1 }) : d(o.$slots, "header", {
151
166
  key: 0,
152
- close: e(g),
153
- titleId: e(c),
154
- titleClass: e(d).e("title")
167
+ close: e(f),
168
+ titleId: e(y),
169
+ titleClass: e(r).e("title")
155
170
  })
156
171
  ]),
157
- default: t(() => [
158
- n(o.$slots, "default")
172
+ default: l(() => [
173
+ d(o.$slots, "default")
159
174
  ]),
160
175
  _: 2
161
176
  }, [
162
177
  o.$slots.footer ? {
163
178
  name: "footer",
164
- fn: t(() => [
165
- n(o.$slots, "footer")
179
+ fn: l(() => [
180
+ d(o.$slots, "footer")
166
181
  ]),
167
182
  key: "0"
168
183
  } : void 0
169
- ]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "onClose"])) : G("", !0)
184
+ ]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "onClose"])) : Q("", !0)
170
185
  ]),
171
186
  _: 3
172
187
  }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
173
- ], 46, ae)
188
+ ], 46, ne)
174
189
  ]),
175
190
  _: 3
176
191
  }, 8, ["mask", "overlay-class", "z-index"]), [
177
- [Q, e(u)]
192
+ [Y, e(u)]
178
193
  ])
179
194
  ]),
180
195
  _: 3
181
- }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
196
+ }, 16)
182
197
  ]),
183
198
  _: 3
184
- }, 8, ["disabled"]));
199
+ }, 8, ["to", "disabled"]));
185
200
  }
186
201
  });
187
202
  export {
188
- Re as default
203
+ $e as default
189
204
  };
@@ -1,13 +1,14 @@
1
- import { type DialogProps } from './dialog.vue';
2
1
  export * from './constants';
3
- export * from './hooks/use-dialog';
2
+ export * from './use-dialog';
4
3
  export * from './types';
5
- export type { DialogProps };
6
4
  export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
7
5
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
8
6
  appendToBody: {
9
7
  type: import("vue").PropType<boolean>;
10
8
  };
9
+ appendTo: {
10
+ type: import("vue").PropType<string | HTMLElement>;
11
+ };
11
12
  beforeClose: {
12
13
  type: import("vue").PropType<(done: (cancel?: boolean) => void) => void>;
13
14
  };
@@ -35,6 +36,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
35
36
  top: {
36
37
  type: import("vue").PropType<string>;
37
38
  };
39
+ modalPenetrable: {
40
+ type: import("vue").PropType<boolean>;
41
+ };
38
42
  modelValue: {
39
43
  type: import("vue").PropType<boolean>;
40
44
  };
@@ -50,6 +54,12 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
50
54
  trapFocus: {
51
55
  type: import("vue").PropType<boolean>;
52
56
  };
57
+ overflow: {
58
+ type: import("vue").PropType<boolean>;
59
+ };
60
+ transition: {
61
+ type: import("vue").PropType<string | import("vue").TransitionProps>;
62
+ };
53
63
  center: {
54
64
  type: import("vue").PropType<boolean>;
55
65
  };
@@ -74,6 +84,15 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
74
84
  title: {
75
85
  type: import("vue").PropType<string>;
76
86
  };
87
+ headerClass: {
88
+ type: import("vue").PropType<string>;
89
+ };
90
+ bodyClass: {
91
+ type: import("vue").PropType<string>;
92
+ };
93
+ footerClass: {
94
+ type: import("vue").PropType<string>;
95
+ };
77
96
  }>> & Readonly<{
78
97
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
79
98
  onClose?: (() => any) | undefined;
@@ -85,6 +104,8 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
85
104
  }>, {
86
105
  visible: import("vue").Ref<boolean, boolean>;
87
106
  dialogContentRef: import("vue").Ref<any, any>;
107
+ resetPosition: () => void;
108
+ handleClose: () => void;
88
109
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
89
110
  "update:modelValue": (value: boolean) => void;
90
111
  close: () => void;
@@ -104,6 +125,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
104
125
  appendToBody: {
105
126
  type: import("vue").PropType<boolean>;
106
127
  };
128
+ appendTo: {
129
+ type: import("vue").PropType<string | HTMLElement>;
130
+ };
107
131
  beforeClose: {
108
132
  type: import("vue").PropType<(done: (cancel?: boolean) => void) => void>;
109
133
  };
@@ -131,6 +155,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
131
155
  top: {
132
156
  type: import("vue").PropType<string>;
133
157
  };
158
+ modalPenetrable: {
159
+ type: import("vue").PropType<boolean>;
160
+ };
134
161
  modelValue: {
135
162
  type: import("vue").PropType<boolean>;
136
163
  };
@@ -146,6 +173,12 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
146
173
  trapFocus: {
147
174
  type: import("vue").PropType<boolean>;
148
175
  };
176
+ overflow: {
177
+ type: import("vue").PropType<boolean>;
178
+ };
179
+ transition: {
180
+ type: import("vue").PropType<string | import("vue").TransitionProps>;
181
+ };
149
182
  center: {
150
183
  type: import("vue").PropType<boolean>;
151
184
  };
@@ -170,6 +203,15 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
170
203
  title: {
171
204
  type: import("vue").PropType<string>;
172
205
  };
206
+ headerClass: {
207
+ type: import("vue").PropType<string>;
208
+ };
209
+ bodyClass: {
210
+ type: import("vue").PropType<string>;
211
+ };
212
+ footerClass: {
213
+ type: import("vue").PropType<string>;
214
+ };
173
215
  }>> & Readonly<{
174
216
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
175
217
  onClose?: (() => any) | undefined;
@@ -181,6 +223,8 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
181
223
  }>, {
182
224
  visible: import("vue").Ref<boolean, boolean>;
183
225
  dialogContentRef: import("vue").Ref<any, any>;
226
+ resetPosition: () => void;
227
+ handleClose: () => void;
184
228
  }, {}, {}, {}, {}>;
185
229
  __isFragment?: never;
186
230
  __isTeleport?: never;
@@ -189,6 +233,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
189
233
  appendToBody: {
190
234
  type: import("vue").PropType<boolean>;
191
235
  };
236
+ appendTo: {
237
+ type: import("vue").PropType<string | HTMLElement>;
238
+ };
192
239
  beforeClose: {
193
240
  type: import("vue").PropType<(done: (cancel?: boolean) => void) => void>;
194
241
  };
@@ -216,6 +263,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
216
263
  top: {
217
264
  type: import("vue").PropType<string>;
218
265
  };
266
+ modalPenetrable: {
267
+ type: import("vue").PropType<boolean>;
268
+ };
219
269
  modelValue: {
220
270
  type: import("vue").PropType<boolean>;
221
271
  };
@@ -231,6 +281,12 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
231
281
  trapFocus: {
232
282
  type: import("vue").PropType<boolean>;
233
283
  };
284
+ overflow: {
285
+ type: import("vue").PropType<boolean>;
286
+ };
287
+ transition: {
288
+ type: import("vue").PropType<string | import("vue").TransitionProps>;
289
+ };
234
290
  center: {
235
291
  type: import("vue").PropType<boolean>;
236
292
  };
@@ -255,6 +311,15 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
255
311
  title: {
256
312
  type: import("vue").PropType<string>;
257
313
  };
314
+ headerClass: {
315
+ type: import("vue").PropType<string>;
316
+ };
317
+ bodyClass: {
318
+ type: import("vue").PropType<string>;
319
+ };
320
+ footerClass: {
321
+ type: import("vue").PropType<string>;
322
+ };
258
323
  }>> & Readonly<{
259
324
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
260
325
  onClose?: (() => any) | undefined;
@@ -266,6 +331,8 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
266
331
  }>, {
267
332
  visible: import("vue").Ref<boolean, boolean>;
268
333
  dialogContentRef: import("vue").Ref<any, any>;
334
+ resetPosition: () => void;
335
+ handleClose: () => void;
269
336
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
270
337
  "update:modelValue": (value: boolean) => void;
271
338
  close: () => void;