vft 0.0.4 → 0.0.6

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 (167) hide show
  1. package/dist/index.css +1 -1
  2. package/es/component.mjs +9 -6
  3. package/es/component.mjs.map +1 -1
  4. package/es/components/avatar/avatar.vue2.mjs +12 -11
  5. package/es/components/avatar/avatar.vue2.mjs.map +1 -1
  6. package/es/components/avatar/index.mjs +2 -0
  7. package/es/components/avatar/index.mjs.map +1 -1
  8. package/es/components/back-top/back-top.vue2.mjs +20 -18
  9. package/es/components/back-top/back-top.vue2.mjs.map +1 -1
  10. package/es/components/back-top/index.mjs +2 -0
  11. package/es/components/back-top/index.mjs.map +1 -1
  12. package/es/components/divider/divider.vue2.mjs +4 -2
  13. package/es/components/divider/divider.vue2.mjs.map +1 -1
  14. package/es/components/divider/index.mjs +5 -3
  15. package/es/components/divider/index.mjs.map +1 -1
  16. package/es/components/empty/empty.vue2.mjs.map +1 -1
  17. package/es/components/empty/index.mjs +7 -5
  18. package/es/components/empty/index.mjs.map +1 -1
  19. package/es/components/exception/index.mjs +5 -3
  20. package/es/components/exception/index.mjs.map +1 -1
  21. package/es/components/icon/icon.vue2.mjs +11 -10
  22. package/es/components/icon/icon.vue2.mjs.map +1 -1
  23. package/es/components/icon/index.mjs +5 -3
  24. package/es/components/icon/index.mjs.map +1 -1
  25. package/es/components/index.d.ts +1 -0
  26. package/es/components/index.mjs +11 -6
  27. package/es/components/index.mjs.map +1 -1
  28. package/es/components/result/index.mjs +5 -3
  29. package/es/components/result/index.mjs.map +1 -1
  30. package/es/components/result/result.vue2.mjs +4 -2
  31. package/es/components/result/result.vue2.mjs.map +1 -1
  32. package/es/components/tabs/index.d.ts +356 -0
  33. package/es/components/tabs/index.mjs +15 -0
  34. package/es/components/tabs/index.mjs.map +1 -0
  35. package/es/components/tabs/style/css.d.ts +0 -0
  36. package/es/components/tabs/style/css.mjs +3 -0
  37. package/es/components/tabs/style/css.mjs.map +1 -0
  38. package/es/components/tabs/style/index.d.ts +0 -0
  39. package/es/components/tabs/style/index.mjs +3 -0
  40. package/es/components/tabs/style/index.mjs.map +1 -0
  41. package/es/components/tabs/tab-bar.vue.d.ts +51 -0
  42. package/es/components/tabs/tab-bar.vue.mjs +5 -0
  43. package/es/components/tabs/tab-bar.vue.mjs.map +1 -0
  44. package/es/components/tabs/tab-bar.vue2.mjs +53 -0
  45. package/es/components/tabs/tab-bar.vue2.mjs.map +1 -0
  46. package/es/components/tabs/tab-nav.vue.d.ts +121 -0
  47. package/es/components/tabs/tab-nav.vue.mjs +5 -0
  48. package/es/components/tabs/tab-nav.vue.mjs.map +1 -0
  49. package/es/components/tabs/tab-nav.vue2.mjs +167 -0
  50. package/es/components/tabs/tab-nav.vue2.mjs.map +1 -0
  51. package/es/components/tabs/tab-pane.vue.d.ts +45 -0
  52. package/es/components/tabs/tab-pane.vue.mjs +5 -0
  53. package/es/components/tabs/tab-pane.vue.mjs.map +1 -0
  54. package/es/components/tabs/tab-pane.vue2.mjs +57 -0
  55. package/es/components/tabs/tab-pane.vue2.mjs.map +1 -0
  56. package/es/components/tabs/tabs.vue.d.ts +159 -0
  57. package/es/components/tabs/tabs.vue.mjs +5 -0
  58. package/es/components/tabs/tabs.vue.mjs.map +1 -0
  59. package/es/components/tabs/tabs.vue2.mjs +151 -0
  60. package/es/components/tabs/tabs.vue2.mjs.map +1 -0
  61. package/es/components/tabs/types.d.ts +58 -0
  62. package/es/components/tabs/types.mjs +5 -0
  63. package/es/components/tabs/types.mjs.map +1 -0
  64. package/es/hooks/index.d.ts +1 -0
  65. package/es/hooks/index.mjs +6 -4
  66. package/es/hooks/index.mjs.map +1 -1
  67. package/es/hooks/use-ordered-children/index.d.ts +8 -0
  68. package/es/hooks/use-ordered-children/index.mjs +27 -0
  69. package/es/hooks/use-ordered-children/index.mjs.map +1 -0
  70. package/es/index.d.ts +1 -1
  71. package/es/index.mjs +42 -35
  72. package/es/index.mjs.map +1 -1
  73. package/es/package.json.mjs +1 -1
  74. package/es/style.css +1 -1
  75. package/es/theme-style/src/tabs.scss.mjs +5 -0
  76. package/es/theme-style/src/tabs.scss.mjs.map +1 -0
  77. package/es/utils/index.mjs +23 -10
  78. package/es/utils/index.mjs.map +1 -1
  79. package/es/utils/vue/index.d.ts +1 -0
  80. package/es/utils/vue/index.mjs +18 -5
  81. package/es/utils/vue/index.mjs.map +1 -1
  82. package/es/utils/vue/vnode.d.ts +51 -0
  83. package/es/utils/vue/vnode.mjs +67 -0
  84. package/es/utils/vue/vnode.mjs.map +1 -0
  85. package/lib/component.js +1 -1
  86. package/lib/component.js.map +1 -1
  87. package/lib/components/avatar/avatar.vue2.js +1 -1
  88. package/lib/components/avatar/avatar.vue2.js.map +1 -1
  89. package/lib/components/avatar/index.js +1 -1
  90. package/lib/components/avatar/index.js.map +1 -1
  91. package/lib/components/back-top/back-top.vue2.js +1 -1
  92. package/lib/components/back-top/back-top.vue2.js.map +1 -1
  93. package/lib/components/back-top/index.js +1 -1
  94. package/lib/components/back-top/index.js.map +1 -1
  95. package/lib/components/divider/divider.vue2.js +1 -1
  96. package/lib/components/divider/divider.vue2.js.map +1 -1
  97. package/lib/components/divider/index.js +1 -1
  98. package/lib/components/divider/index.js.map +1 -1
  99. package/lib/components/empty/empty.vue2.js.map +1 -1
  100. package/lib/components/empty/index.js +1 -1
  101. package/lib/components/empty/index.js.map +1 -1
  102. package/lib/components/exception/index.js +1 -1
  103. package/lib/components/exception/index.js.map +1 -1
  104. package/lib/components/icon/icon.vue2.js +1 -1
  105. package/lib/components/icon/icon.vue2.js.map +1 -1
  106. package/lib/components/icon/index.js +1 -1
  107. package/lib/components/icon/index.js.map +1 -1
  108. package/lib/components/index.d.ts +1 -0
  109. package/lib/components/index.js +1 -1
  110. package/lib/components/result/index.js +1 -1
  111. package/lib/components/result/index.js.map +1 -1
  112. package/lib/components/result/result.vue2.js +1 -1
  113. package/lib/components/result/result.vue2.js.map +1 -1
  114. package/lib/components/tabs/index.d.ts +356 -0
  115. package/lib/components/tabs/index.js +2 -0
  116. package/lib/components/tabs/index.js.map +1 -0
  117. package/lib/components/tabs/style/css.d.ts +0 -0
  118. package/lib/components/tabs/style/css.js +2 -0
  119. package/lib/components/tabs/style/css.js.map +1 -0
  120. package/lib/components/tabs/style/index.d.ts +0 -0
  121. package/lib/components/tabs/style/index.js +2 -0
  122. package/lib/components/tabs/style/index.js.map +1 -0
  123. package/lib/components/tabs/tab-bar.vue.d.ts +51 -0
  124. package/lib/components/tabs/tab-bar.vue.js +2 -0
  125. package/lib/components/tabs/tab-bar.vue.js.map +1 -0
  126. package/lib/components/tabs/tab-bar.vue2.js +2 -0
  127. package/lib/components/tabs/tab-bar.vue2.js.map +1 -0
  128. package/lib/components/tabs/tab-nav.vue.d.ts +121 -0
  129. package/lib/components/tabs/tab-nav.vue.js +2 -0
  130. package/lib/components/tabs/tab-nav.vue.js.map +1 -0
  131. package/lib/components/tabs/tab-nav.vue2.js +2 -0
  132. package/lib/components/tabs/tab-nav.vue2.js.map +1 -0
  133. package/lib/components/tabs/tab-pane.vue.d.ts +45 -0
  134. package/lib/components/tabs/tab-pane.vue.js +2 -0
  135. package/lib/components/tabs/tab-pane.vue.js.map +1 -0
  136. package/lib/components/tabs/tab-pane.vue2.js +2 -0
  137. package/lib/components/tabs/tab-pane.vue2.js.map +1 -0
  138. package/lib/components/tabs/tabs.vue.d.ts +159 -0
  139. package/lib/components/tabs/tabs.vue.js +2 -0
  140. package/lib/components/tabs/tabs.vue.js.map +1 -0
  141. package/lib/components/tabs/tabs.vue2.js +2 -0
  142. package/lib/components/tabs/tabs.vue2.js.map +1 -0
  143. package/lib/components/tabs/types.d.ts +58 -0
  144. package/lib/components/tabs/types.js +2 -0
  145. package/lib/components/tabs/types.js.map +1 -0
  146. package/lib/hooks/index.d.ts +1 -0
  147. package/lib/hooks/index.js +1 -1
  148. package/lib/hooks/use-ordered-children/index.d.ts +8 -0
  149. package/lib/hooks/use-ordered-children/index.js +2 -0
  150. package/lib/hooks/use-ordered-children/index.js.map +1 -0
  151. package/lib/index.d.ts +1 -1
  152. package/lib/index.js +1 -1
  153. package/lib/index.js.map +1 -1
  154. package/lib/package.json.js +1 -1
  155. package/lib/theme-style/src/tabs.scss.js +2 -0
  156. package/lib/theme-style/src/tabs.scss.js.map +1 -0
  157. package/lib/utils/index.js +1 -1
  158. package/lib/utils/vue/index.d.ts +1 -0
  159. package/lib/utils/vue/index.js +1 -1
  160. package/lib/utils/vue/vnode.d.ts +51 -0
  161. package/lib/utils/vue/vnode.js +2 -0
  162. package/lib/utils/vue/vnode.js.map +1 -0
  163. package/package.json +4 -1
  164. package/theme-style/index.css +1 -1
  165. package/theme-style/src/index.scss +1 -0
  166. package/theme-style/src/tabs.scss +582 -0
  167. package/theme-style/vft-tabs.css +1 -0
@@ -0,0 +1,51 @@
1
+ import { createBlock } from 'vue';
2
+ import type { VNode, VNodeArrayChildren, VNodeChild, VNodeNormalizedChildren } from 'vue';
3
+ export declare enum PatchFlags {
4
+ TEXT = 1,
5
+ CLASS = 2,
6
+ STYLE = 4,
7
+ PROPS = 8,
8
+ FULL_PROPS = 16,
9
+ HYDRATE_EVENTS = 32,
10
+ STABLE_FRAGMENT = 64,
11
+ KEYED_FRAGMENT = 128,
12
+ UNKEYED_FRAGMENT = 256,
13
+ NEED_PATCH = 512,
14
+ DYNAMIC_SLOTS = 1024,
15
+ HOISTED = -1,
16
+ BAIL = -2
17
+ }
18
+ export type VNodeChildAtom = Exclude<VNodeChild, Array<any>>;
19
+ export type RawSlots = Exclude<VNodeNormalizedChildren, Array<any> | null | string>;
20
+ export declare function isFragment(node: VNode): boolean;
21
+ export declare function isFragment(node: unknown): node is VNode;
22
+ export declare function isText(node: VNode): boolean;
23
+ export declare function isText(node: unknown): node is VNode;
24
+ export declare function isComment(node: VNode): boolean;
25
+ export declare function isComment(node: unknown): node is VNode;
26
+ export declare function isTemplate(node: VNode): boolean;
27
+ export declare function isTemplate(node: unknown): node is VNode;
28
+ /**
29
+ * determine if the element is a valid element type rather than fragments and comment e.g. <template> v-if
30
+ * @param node {VNode} node to be tested
31
+ */
32
+ export declare function isValidElementNode(node: VNode): boolean;
33
+ export declare function isValidElementNode(node: unknown): node is VNode;
34
+ export declare const getFirstValidNode: (nodes: VNodeNormalizedChildren, maxDepth?: number) => string | number | boolean | void | VNodeArrayChildren | {
35
+ [name: string]: unknown;
36
+ $stable?: boolean | undefined;
37
+ } | VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
+ [key: string]: any;
39
+ }> | null | undefined;
40
+ export declare function renderIf(condition: boolean, ...args: Parameters<typeof createBlock>): VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
+ [key: string]: any;
42
+ }>;
43
+ export declare function renderBlock(...args: Parameters<typeof createBlock>): VNode<import("vue").RendererNode, import("vue").RendererElement, {
44
+ [key: string]: any;
45
+ }>;
46
+ export declare const getNormalizedProps: (node: VNode) => Record<string, any>;
47
+ export declare const ensureOnlyChild: (children: VNodeArrayChildren | undefined) => VNodeArrayChildren | (string | number | boolean | void | VNode<import("vue").RendererNode, import("vue").RendererElement, {
48
+ [key: string]: any;
49
+ }> | null | undefined);
50
+ export type FlattenVNodes = Array<VNodeChildAtom | RawSlots>;
51
+ export declare const flattedChildren: (children: FlattenVNodes | VNode | VNodeNormalizedChildren) => FlattenVNodes;
@@ -0,0 +1,67 @@
1
+ import { isVNode as u, Fragment as m, Text as A, Comment as N, createCommentVNode as S, openBlock as s, createBlock as L } from "vue";
2
+ import { hasOwn as _, camelize as C, isArray as E } from "@vue/shared";
3
+ import { debugWarn as O } from "../error.mjs";
4
+ const R = "utils/vue/vnode";
5
+ var D = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(D || {});
6
+ function f(e) {
7
+ return u(e) && e.type === m;
8
+ }
9
+ function b(e) {
10
+ return u(e) && e.type === A;
11
+ }
12
+ function p(e) {
13
+ return u(e) && e.type === N;
14
+ }
15
+ const y = "template";
16
+ function Y(e) {
17
+ return u(e) && e.type === y;
18
+ }
19
+ function G(e) {
20
+ return u(e) && !f(e) && !p(e);
21
+ }
22
+ function T(e, t) {
23
+ if (!p(e))
24
+ return f(e) || Y(e) ? t > 0 ? M(e.children, t - 1) : void 0 : e;
25
+ }
26
+ const M = (e, t = 3) => Array.isArray(e) ? T(e[0], t) : T(e, t);
27
+ function H(e, ...t) {
28
+ return e ? v(...t) : S("v-if", !0);
29
+ }
30
+ function v(...e) {
31
+ return s(), L(...e);
32
+ }
33
+ const w = (e) => {
34
+ if (!u(e))
35
+ return O(R, "[getNormalizedProps] must be a VNode"), {};
36
+ const t = e.props || {}, n = (u(e.type) ? e.type.props : void 0) || {}, r = {};
37
+ return Object.keys(n).forEach((o) => {
38
+ _(n[o], "default") && (r[o] = n[o].default);
39
+ }), Object.keys(t).forEach((o) => {
40
+ r[C(o)] = t[o];
41
+ }), r;
42
+ }, K = (e) => {
43
+ if (!E(e) || e.length > 1)
44
+ throw new Error("expect to receive a single Vue element child");
45
+ return e[0];
46
+ }, i = (e) => {
47
+ const t = E(e) ? e : [e], n = [];
48
+ return t.forEach((r) => {
49
+ var o;
50
+ E(r) ? n.push(...i(r)) : u(r) && E(r.children) ? n.push(...i(r.children)) : (n.push(r), u(r) && ((o = r.component) != null && o.subTree) && n.push(...i(r.component.subTree)));
51
+ }), n;
52
+ };
53
+ export {
54
+ D as PatchFlags,
55
+ K as ensureOnlyChild,
56
+ i as flattedChildren,
57
+ M as getFirstValidNode,
58
+ w as getNormalizedProps,
59
+ p as isComment,
60
+ f as isFragment,
61
+ Y as isTemplate,
62
+ b as isText,
63
+ G as isValidElementNode,
64
+ v as renderBlock,
65
+ H as renderIf
66
+ };
67
+ //# sourceMappingURL=vnode.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vnode.mjs","sources":["../../../../../packages/utils/vue/vnode.ts"],"sourcesContent":["import {\n Comment,\n Fragment,\n Text,\n createBlock,\n createCommentVNode,\n isVNode,\n openBlock,\n} from 'vue'\nimport { camelize, isArray } from '@vue/shared'\nimport { hasOwn } from '@vue/shared'\nimport { debugWarn } from '../error'\nimport type {\n VNode,\n VNodeArrayChildren,\n VNodeChild,\n VNodeNormalizedChildren,\n} from 'vue'\n\nconst SCOPE = 'utils/vue/vnode'\n\nexport enum PatchFlags {\n TEXT = 1,\n CLASS = 2,\n STYLE = 4,\n PROPS = 8,\n FULL_PROPS = 16,\n HYDRATE_EVENTS = 32,\n STABLE_FRAGMENT = 64,\n KEYED_FRAGMENT = 128,\n UNKEYED_FRAGMENT = 256,\n NEED_PATCH = 512,\n DYNAMIC_SLOTS = 1024,\n HOISTED = -1,\n BAIL = -2,\n}\n\nexport type VNodeChildAtom = Exclude<VNodeChild, Array<any>>\nexport type RawSlots = Exclude<\n VNodeNormalizedChildren,\n Array<any> | null | string\n>\n\nexport function isFragment(node: VNode): boolean\nexport function isFragment(node: unknown): node is VNode\nexport function isFragment(node: unknown): node is VNode {\n return isVNode(node) && node.type === Fragment\n}\n\nexport function isText(node: VNode): boolean\nexport function isText(node: unknown): node is VNode\nexport function isText(node: unknown): node is VNode {\n return isVNode(node) && node.type === Text\n}\n\nexport function isComment(node: VNode): boolean\nexport function isComment(node: unknown): node is VNode\nexport function isComment(node: unknown): node is VNode {\n return isVNode(node) && node.type === Comment\n}\n\nconst TEMPLATE = 'template'\nexport function isTemplate(node: VNode): boolean\nexport function isTemplate(node: unknown): node is VNode\nexport function isTemplate(node: unknown): node is VNode {\n return isVNode(node) && node.type === TEMPLATE\n}\n\n/**\n * determine if the element is a valid element type rather than fragments and comment e.g. <template> v-if\n * @param node {VNode} node to be tested\n */\nexport function isValidElementNode(node: VNode): boolean\nexport function isValidElementNode(node: unknown): node is VNode\nexport function isValidElementNode(node: unknown): node is VNode {\n return isVNode(node) && !isFragment(node) && !isComment(node)\n}\n\n/**\n * get a valid child node (not fragment nor comment)\n * @param node {VNode} node to be searched\n * @param depth {number} depth to be searched\n */\nfunction getChildren(\n node: VNodeNormalizedChildren | VNodeChild,\n depth: number\n): VNodeNormalizedChildren | VNodeChild {\n if (isComment(node)) return\n if (isFragment(node) || isTemplate(node)) {\n return depth > 0 ? getFirstValidNode(node.children, depth - 1) : undefined\n }\n return node\n}\n\nexport const getFirstValidNode = (\n nodes: VNodeNormalizedChildren,\n maxDepth = 3\n) => {\n if (Array.isArray(nodes)) {\n return getChildren(nodes[0], maxDepth)\n } else {\n return getChildren(nodes, maxDepth)\n }\n}\n\nexport function renderIf(\n condition: boolean,\n ...args: Parameters<typeof createBlock>\n) {\n return condition ? renderBlock(...args) : createCommentVNode('v-if', true)\n}\n\nexport function renderBlock(...args: Parameters<typeof createBlock>) {\n return openBlock(), createBlock(...args)\n}\n\nexport const getNormalizedProps = (node: VNode) => {\n if (!isVNode(node)) {\n debugWarn(SCOPE, '[getNormalizedProps] must be a VNode')\n return {}\n }\n\n const raw = node.props || {}\n const type = (isVNode(node.type) ? node.type.props : undefined) || {}\n const props: Record<string, any> = {}\n\n Object.keys(type).forEach((key) => {\n if (hasOwn(type[key], 'default')) {\n props[key] = type[key].default\n }\n })\n\n Object.keys(raw).forEach((key) => {\n props[camelize(key)] = raw[key]\n })\n\n return props\n}\n\nexport const ensureOnlyChild = (children: VNodeArrayChildren | undefined) => {\n if (!isArray(children) || children.length > 1) {\n throw new Error('expect to receive a single Vue element child')\n }\n return children[0]\n}\n\nexport type FlattenVNodes = Array<VNodeChildAtom | RawSlots>\n\nexport const flattedChildren = (\n children: FlattenVNodes | VNode | VNodeNormalizedChildren\n): FlattenVNodes => {\n const vNodes = isArray(children) ? children : [children]\n const result: FlattenVNodes = []\n\n vNodes.forEach((child) => {\n if (isArray(child)) {\n result.push(...flattedChildren(child))\n } else if (isVNode(child) && isArray(child.children)) {\n result.push(...flattedChildren(child.children))\n } else {\n result.push(child)\n if (isVNode(child) && child.component?.subTree) {\n result.push(...flattedChildren(child.component.subTree))\n }\n }\n })\n return result\n}\n"],"names":["SCOPE","PatchFlags","isFragment","node","isVNode","Fragment","isText","Text","isComment","Comment","TEMPLATE","isTemplate","isValidElementNode","getChildren","depth","getFirstValidNode","nodes","maxDepth","renderIf","condition","args","renderBlock","createCommentVNode","openBlock","createBlock","getNormalizedProps","debugWarn","raw","type","props","key","hasOwn","camelize","ensureOnlyChild","children","isArray","flattedChildren","vNodes","result","child","_a"],"mappings":";;;AAmBA,MAAMA,IAAQ;AAEF,IAAAC,sBAAAA,OACVA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,QAAQ,CAAR,IAAA,SACAA,EAAAA,EAAA,QAAQ,CAAR,IAAA,SACAA,EAAAA,EAAA,QAAQ,CAAR,IAAA,SACAA,EAAAA,EAAA,aAAa,EAAb,IAAA,cACAA,EAAAA,EAAA,iBAAiB,EAAjB,IAAA,kBACAA,EAAAA,EAAA,kBAAkB,EAAlB,IAAA,mBACAA,EAAAA,EAAA,iBAAiB,GAAjB,IAAA,kBACAA,EAAAA,EAAA,mBAAmB,GAAnB,IAAA,oBACAA,EAAAA,EAAA,aAAa,GAAb,IAAA,cACAA,EAAAA,EAAA,gBAAgB,IAAhB,IAAA,iBACAA,EAAAA,EAAA,UAAU,EAAV,IAAA,WACAA,EAAAA,EAAA,OAAO,EAAP,IAAA,QAbUA,IAAAA,KAAA,CAAA,CAAA;AAwBL,SAASC,EAAWC,GAA8B;AACvD,SAAOC,EAAQD,CAAI,KAAKA,EAAK,SAASE;AACxC;AAIO,SAASC,EAAOH,GAA8B;AACnD,SAAOC,EAAQD,CAAI,KAAKA,EAAK,SAASI;AACxC;AAIO,SAASC,EAAUL,GAA8B;AACtD,SAAOC,EAAQD,CAAI,KAAKA,EAAK,SAASM;AACxC;AAEA,MAAMC,IAAW;AAGV,SAASC,EAAWR,GAA8B;AACvD,SAAOC,EAAQD,CAAI,KAAKA,EAAK,SAASO;AACxC;AAQO,SAASE,EAAmBT,GAA8B;AACxD,SAAAC,EAAQD,CAAI,KAAK,CAACD,EAAWC,CAAI,KAAK,CAACK,EAAUL,CAAI;AAC9D;AAOA,SAASU,EACPV,GACAW,GACsC;AACtC,MAAI,CAAAN,EAAUL,CAAI;AAClB,WAAID,EAAWC,CAAI,KAAKQ,EAAWR,CAAI,IAC9BW,IAAQ,IAAIC,EAAkBZ,EAAK,UAAUW,IAAQ,CAAC,IAAI,SAE5DX;AACT;AAEO,MAAMY,IAAoB,CAC/BC,GACAC,IAAW,MAEP,MAAM,QAAQD,CAAK,IACdH,EAAYG,EAAM,CAAC,GAAGC,CAAQ,IAE9BJ,EAAYG,GAAOC,CAAQ;AAItB,SAAAC,EACdC,MACGC,GACH;AACA,SAAOD,IAAYE,EAAY,GAAGD,CAAI,IAAIE,EAAmB,QAAQ,EAAI;AAC3E;AAEO,SAASD,KAAeD,GAAsC;AACnE,SAAOG,EAAU,GAAGC,EAAY,GAAGJ,CAAI;AACzC;AAEa,MAAAK,IAAqB,CAACtB,MAAgB;AAC7C,MAAA,CAACC,EAAQD,CAAI;AACf,WAAAuB,EAAU1B,GAAO,sCAAsC,GAChD;AAGH,QAAA2B,IAAMxB,EAAK,SAAS,IACpByB,KAAQxB,EAAQD,EAAK,IAAI,IAAIA,EAAK,KAAK,QAAQ,WAAc,CAAA,GAC7D0B,IAA6B,CAAA;AAEnC,gBAAO,KAAKD,CAAI,EAAE,QAAQ,CAACE,MAAQ;AACjC,IAAIC,EAAOH,EAAKE,CAAG,GAAG,SAAS,MAC7BD,EAAMC,CAAG,IAAIF,EAAKE,CAAG,EAAE;AAAA,EACzB,CACD,GAED,OAAO,KAAKH,CAAG,EAAE,QAAQ,CAACG,MAAQ;AAChC,IAAAD,EAAMG,EAASF,CAAG,CAAC,IAAIH,EAAIG,CAAG;AAAA,EAAA,CAC/B,GAEMD;AACT,GAEaI,IAAkB,CAACC,MAA6C;AAC3E,MAAI,CAACC,EAAQD,CAAQ,KAAKA,EAAS,SAAS;AACpC,UAAA,IAAI,MAAM,8CAA8C;AAEhE,SAAOA,EAAS,CAAC;AACnB,GAIaE,IAAkB,CAC7BF,MACkB;AAClB,QAAMG,IAASF,EAAQD,CAAQ,IAAIA,IAAW,CAACA,CAAQ,GACjDI,IAAwB,CAAA;AAEvB,SAAAD,EAAA,QAAQ,CAACE,MAAU;;AACpB,IAAAJ,EAAQI,CAAK,IACfD,EAAO,KAAK,GAAGF,EAAgBG,CAAK,CAAC,IAC5BnC,EAAQmC,CAAK,KAAKJ,EAAQI,EAAM,QAAQ,IACjDD,EAAO,KAAK,GAAGF,EAAgBG,EAAM,QAAQ,CAAC,KAE9CD,EAAO,KAAKC,CAAK,GACbnC,EAAQmC,CAAK,OAAKC,IAAAD,EAAM,cAAN,QAAAC,EAAiB,YACrCF,EAAO,KAAK,GAAGF,EAAgBG,EAAM,UAAU,OAAO,CAAC;AAAA,EAE3D,CACD,GACMD;AACT;"}
package/lib/component.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./components/divider/index.js"),t=require("./components/icon/index.js"),i=require("./components/avatar/index.js"),n=require("./components/empty/index.js"),r=require("./components/result/index.js"),o=require("./components/exception/index.js"),u=[e.VftDivider,t.VftIcon,i.VftAvatar,n.VftEmpty,r.VftResult,o.VftException];exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./components/divider/index.js"),n=require("./components/icon/index.js"),i=require("./components/avatar/index.js"),r=require("./components/empty/index.js"),o=require("./components/result/index.js"),s=require("./components/exception/index.js"),e=require("./components/tabs/index.js"),u=[t.VftDivider,n.VftIcon,i.VftAvatar,r.VftEmpty,o.VftResult,s.VftException,e.VftTabs,e.VftTabPane];exports.default=u;
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../packages/vft/component.ts"],"sourcesContent":["import { VftDivider } from '@vft-ui/components/divider'\nimport { VftIcon } from '@vft-ui/components/icon'\nimport { VftAvatar } from '@vft-ui/components/avatar'\nimport { VftEmpty } from '@vft-ui/components/empty'\nimport { VftResult } from '@vft-ui/components/result'\nimport { VftException } from '@vft-ui/components/exception'\nimport type { Plugin } from 'vue'\n\nexport default [\n VftDivider,\n VftIcon,\n VftAvatar,\n VftEmpty,\n VftResult,\n VftException\n] as Plugin[]\n"],"names":["Components","VftDivider","VftIcon","VftAvatar","VftEmpty","VftResult","VftException"],"mappings":"+WAQeA,EAAA,CACbC,EAAA,WACAC,EAAA,QACAC,EAAA,UACAC,EAAA,SACAC,EAAA,UACAC,EAAA,YACF"}
1
+ {"version":3,"file":"component.js","sources":["../../../packages/vft/component.ts"],"sourcesContent":["import { VftDivider } from '@vft-ui/components/divider'\nimport { VftIcon } from '@vft-ui/components/icon'\nimport { VftAvatar } from '@vft-ui/components/avatar'\nimport { VftEmpty } from '@vft-ui/components/empty'\nimport { VftResult } from '@vft-ui/components/result'\nimport { VftException } from '@vft-ui/components/exception'\nimport { VftTabs, VftTabPane } from '@vft-ui/components/tabs'\nimport type { Plugin } from 'vue'\n\nexport default [\n VftDivider,\n VftIcon,\n VftAvatar,\n VftEmpty,\n VftResult,\n VftException,\n VftTabs,\n VftTabPane\n] as Plugin[]\n"],"names":["Components","VftDivider","VftIcon","VftAvatar","VftEmpty","VftResult","VftException","VftTabs","VftTabPane"],"mappings":"uZASeA,EAAA,CACbC,EAAA,WACAC,EAAA,QACAC,EAAA,UACAC,EAAA,SACAC,EAAA,UACAC,EAAA,aACAC,EAAA,QACAC,EAAA,UACF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("@vft/utils"),f=require("../icon/index.js"),d=require("../../hooks/use-namespace/index.js"),m=["src","alt","srcset"],h=e.defineComponent({__name:"avatar",props:{size:{default:""},shape:{default:"circle"},icon:null,src:null,alt:null,srcSet:null,fit:{default:"cover"}},emits:["error"],setup(t,{emit:r}){const c=d.useNamespace("avatar"),l=e.ref(!1),a=e.computed(()=>{const s=[c.b()];return n.isString(t.size)&&s.push(c.m(t.size)),t.icon&&s.push(c.m("icon")),t.shape&&s.push(c.m(t.shape)),s}),i=e.computed(()=>n.isNumber(t.size)?c.cssVarBlock({size:n.addUnit(t.size)||""}):void 0),u=e.computed(()=>({objectFit:t.fit}));e.watch(()=>t.src,()=>l.value=!1);function o(s){l.value=!0,r("error",s)}return(s,v)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),style:e.normalizeStyle(e.unref(i))},[(t.src||t.srcSet)&&!l.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:e.normalizeStyle(e.unref(u)),onError:o},null,44,m)):t.icon?(e.openBlock(),e.createBlock(e.unref(f.VftIcon),{key:1})):e.renderSlot(s.$slots,"default",{key:2})],6))}});exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@vft/utils"),f=require("../icon/index.js"),d=require("../../hooks/use-namespace/index.js");require("@vue/shared");const m=["src","alt","srcset"],h=e.defineComponent({__name:"avatar",props:{size:{default:""},shape:{default:"circle"},icon:null,src:null,alt:null,srcSet:null,fit:{default:"cover"}},emits:["error"],setup(t,{emit:n}){const s=d.useNamespace("avatar"),c=e.ref(!1),a=e.computed(()=>{const r=[s.b()];return l.isString(t.size)&&r.push(s.m(t.size)),t.icon&&r.push(s.m("icon")),t.shape&&r.push(s.m(t.shape)),r}),i=e.computed(()=>l.isNumber(t.size)?s.cssVarBlock({size:l.addUnit(t.size)||""}):void 0),u=e.computed(()=>({objectFit:t.fit}));e.watch(()=>t.src,()=>c.value=!1);function o(r){c.value=!0,n("error",r)}return(r,v)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),style:e.normalizeStyle(e.unref(i))},[(t.src||t.srcSet)&&!c.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:e.normalizeStyle(e.unref(u)),onError:o},null,44,m)):t.icon?(e.openBlock(),e.createBlock(e.unref(f.VftIcon),{key:1})):e.renderSlot(r.$slots,"default",{key:2})],6))}});exports.default=h;
2
2
  //# sourceMappingURL=avatar.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.vue2.js","sources":["../../../../../packages/components/avatar/avatar.vue"],"sourcesContent":["<template>\n <span :class=\"avatarClass\" :style=\"sizeStyle\">\n <img\n\t\t\t\tv-if=\"(src || srcSet) && !hasLoadError\"\n\t\t\t\t:src=\"src\"\n\t\t\t\t:alt=\"alt\"\n\t\t\t\t:srcset=\"srcSet\"\n\t\t\t\t:style=\"fitStyle\"\n\t\t\t\t@error=\"handleError\"\n\t\t/>\n <vft-icon v-else-if=\"icon\" />\n <slot v-else />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { addUnit, isNumber, isString } from '@vft/utils';\nimport type { CSSProperties } from 'vue';\nimport { computed, ref, watch } from 'vue';\nimport VftIcon, { type IconProps } from '@vft-ui/components/icon'\nimport { useNamespace } from '@vft-ui/use';\n\ninterface Props {\n\tsize?: number | 'large' | 'default' | 'small'\n\tshape?: 'circle' | 'square'\n\ticon?: IconProps\n\tsrc?: string\n\talt?: string\n\tsrcSet?: string\n\tfit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'\n}\n\ndefineProps({\n \"size\": { default: '' },\n \"shape\": { default: 'circle' },\n \"icon\": null,\n \"src\": null,\n \"alt\": null,\n \"srcSet\": null,\n \"fit\": { default: 'cover' }\n})\n\nconst emit = defineEmits(['error']);\n\nconst ns = useNamespace('avatar');\n\nconst hasLoadError = ref(false);\n\nconst avatarClass = computed(() => {\n\tconst classList = [ns.b()];\n\tif (isString(__props.size)) classList.push(ns.m(__props.size));\n\tif (__props.icon) classList.push(ns.m('icon'));\n\tif (__props.shape) classList.push(ns.m(__props.shape));\n\treturn classList;\n});\n\nconst sizeStyle = computed(() => {\n\treturn isNumber(__props.size)\n\t\t? (ns.cssVarBlock({\n\t\t\tsize: addUnit(__props.size) || ''\n\t\t}) as CSSProperties)\n\t\t: undefined;\n});\n\nconst fitStyle = computed<CSSProperties>(() => ({\n\tobjectFit: __props.fit\n}));\n\n// need reset hasLoadError to false if src changed\nwatch(\n\t() => __props.src,\n\t() => (hasLoadError.value = false)\n);\n\nfunction handleError (e: Event) {\n\thasLoadError.value = true;\n\temit('error', e);\n}\n</script>\n\n"],"names":["ns","useNamespace","hasLoadError","ref","avatarClass","computed","classList","isString","__props","sizeStyle","isNumber","addUnit","fitStyle","watch","handleError","e","emit"],"mappings":"0bA4CM,MAAAA,EAAKC,eAAa,QAAQ,EAE1BC,EAAeC,MAAI,EAAK,EAExBC,EAAcC,EAAAA,SAAS,IAAM,CAClC,MAAMC,EAAY,CAACN,EAAG,EAAG,CAAA,EACrB,OAAAO,EAAA,SAASC,EAAQ,IAAI,GAAGF,EAAU,KAAKN,EAAG,EAAEQ,EAAQ,IAAI,CAAC,EACzDA,EAAQ,MAAMF,EAAU,KAAKN,EAAG,EAAE,MAAM,CAAC,EACzCQ,EAAQ,OAAOF,EAAU,KAAKN,EAAG,EAAEQ,EAAQ,KAAK,CAAC,EAC9CF,CAAA,CACP,EAEKG,EAAYJ,EAAAA,SAAS,IACnBK,EAAS,SAAAF,EAAQ,IAAI,EACxBR,EAAG,YAAY,CACjB,KAAMW,EAAA,QAAQH,EAAQ,IAAI,GAAK,EAAA,CAC/B,EACC,MACH,EAEKI,EAAWP,EAAAA,SAAwB,KAAO,CAC/C,UAAWG,EAAQ,GAClB,EAAA,EAGFK,EAAA,MACC,IAAML,EAAQ,IACd,IAAON,EAAa,MAAQ,EAAA,EAG7B,SAASY,EAAaC,EAAU,CAC/Bb,EAAa,MAAQ,GACrBc,EAAK,QAASD,CAAC,CAChB"}
1
+ {"version":3,"file":"avatar.vue2.js","sources":["../../../../../packages/components/avatar/avatar.vue"],"sourcesContent":["<template>\n <span :class=\"avatarClass\" :style=\"sizeStyle\">\n <img\n\t\t\t\tv-if=\"(src || srcSet) && !hasLoadError\"\n\t\t\t\t:src=\"src\"\n\t\t\t\t:alt=\"alt\"\n\t\t\t\t:srcset=\"srcSet\"\n\t\t\t\t:style=\"fitStyle\"\n\t\t\t\t@error=\"handleError\"\n\t\t/>\n <vft-icon v-else-if=\"icon\" />\n <slot v-else />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { addUnit, isNumber, isString } from '@vft/utils';\nimport type { CSSProperties } from 'vue';\nimport { computed, ref, watch } from 'vue';\nimport VftIcon, { type IconProps } from '@vft-ui/components/icon'\nimport { useNamespace } from '@vft-ui/hooks';\n\ninterface Props {\n\tsize?: number | 'large' | 'default' | 'small'\n\tshape?: 'circle' | 'square'\n\ticon?: IconProps\n\tsrc?: string\n\talt?: string\n\tsrcSet?: string\n\tfit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'\n}\n\ndefineProps({\n \"size\": { default: '' },\n \"shape\": { default: 'circle' },\n \"icon\": null,\n \"src\": null,\n \"alt\": null,\n \"srcSet\": null,\n \"fit\": { default: 'cover' }\n})\n\nconst emit = defineEmits(['error']);\n\nconst ns = useNamespace('avatar');\n\nconst hasLoadError = ref(false);\n\nconst avatarClass = computed(() => {\n\tconst classList = [ns.b()];\n\tif (isString(__props.size)) classList.push(ns.m(__props.size));\n\tif (__props.icon) classList.push(ns.m('icon'));\n\tif (__props.shape) classList.push(ns.m(__props.shape));\n\treturn classList;\n});\n\nconst sizeStyle = computed(() => {\n\treturn isNumber(__props.size)\n\t\t? (ns.cssVarBlock({\n\t\t\tsize: addUnit(__props.size) || ''\n\t\t}) as CSSProperties)\n\t\t: undefined;\n});\n\nconst fitStyle = computed<CSSProperties>(() => ({\n\tobjectFit: __props.fit\n}));\n\n// need reset hasLoadError to false if src changed\nwatch(\n\t() => __props.src,\n\t() => (hasLoadError.value = false)\n);\n\nfunction handleError (e: Event) {\n\thasLoadError.value = true;\n\temit('error', e);\n}\n</script>\n\n"],"names":["ns","useNamespace","hasLoadError","ref","avatarClass","computed","classList","isString","__props","sizeStyle","isNumber","addUnit","fitStyle","watch","handleError","e","emit"],"mappings":"udA4CM,MAAAA,EAAKC,eAAa,QAAQ,EAE1BC,EAAeC,MAAI,EAAK,EAExBC,EAAcC,EAAAA,SAAS,IAAM,CAClC,MAAMC,EAAY,CAACN,EAAG,EAAG,CAAA,EACrB,OAAAO,EAAA,SAASC,EAAQ,IAAI,GAAGF,EAAU,KAAKN,EAAG,EAAEQ,EAAQ,IAAI,CAAC,EACzDA,EAAQ,MAAMF,EAAU,KAAKN,EAAG,EAAE,MAAM,CAAC,EACzCQ,EAAQ,OAAOF,EAAU,KAAKN,EAAG,EAAEQ,EAAQ,KAAK,CAAC,EAC9CF,CAAA,CACP,EAEKG,EAAYJ,EAAAA,SAAS,IACnBK,EAAS,SAAAF,EAAQ,IAAI,EACxBR,EAAG,YAAY,CACjB,KAAMW,EAAA,QAAQH,EAAQ,IAAI,GAAK,EAAA,CAC/B,EACC,MACH,EAEKI,EAAWP,EAAAA,SAAwB,KAAO,CAC/C,UAAWG,EAAQ,GAClB,EAAA,EAGFK,EAAA,MACC,IAAML,EAAQ,IACd,IAAON,EAAa,MAAQ,EAAA,EAG7B,SAASY,EAAaC,EAAU,CAC/Bb,EAAa,MAAQ,GACrBc,EAAK,QAASD,CAAC,CAChB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("@vft/utils");const r=require("./avatar.vue2.js"),e=t.withInstall(r.default);exports.VftAvatar=e;exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const r=require("./avatar.vue2.js"),e=t.withInstall(r.default);exports.VftAvatar=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/avatar/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Avatar from './avatar.vue'\n\nexport const VftAvatar = withInstall(Avatar)\nexport default VftAvatar\n\n"],"names":["VftAvatar","withInstall","Avatar"],"mappings":"oNAIaA,EAAYC,cAAYC,EAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/avatar/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Avatar from './avatar.vue'\n\nexport const VftAvatar = withInstall(Avatar)\nexport default VftAvatar\n\n"],"names":["VftAvatar","withInstall","Avatar"],"mappings":"0PAIaA,EAAYC,cAAYC,EAAM,OAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vft/utils");require("../divider/index.js");const m=require("../icon/index.js");require("../avatar/index.js");require("../empty/index.js");require("../result/index.js");require("../exception/index.js");const p=require("./use-back-top.js"),k=require("../../hooks/use-namespace/index.js"),n=k.useNamespace("back-top"),b=e.defineComponent({name:n.b()}),g=e.defineComponent({...b,props:{visibilityHeight:{default:200},target:null,right:{default:40},bottom:{default:40},icon:{default:"vi-back-top"}},emits:["click"],setup(o,{emit:c}){const l=e.getCurrentInstance(),{handleClick:r,visible:s}=p.useBackTop(l.props,c,n.b()),a=e.computed(()=>({right:`${o.right}px`,bottom:`${o.bottom}px`})),i=e.computed(()=>f.singleAttrToObj(o.icon,"icon",{color:"black"}));return(d,u)=>(e.openBlock(),e.createBlock(e.Transition,{name:`${e.unref(n).namespace}-fade-in`},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(e.unref(a)),class:e.normalizeClass(e.unref(n).b()),onClick:u[0]||(u[0]=e.withModifiers((...t)=>e.unref(r)&&e.unref(r)(...t),["stop"]))},[e.renderSlot(d.$slots,"default",{},()=>{var t;return[(t=e.unref(i))!=null&&t.icon?(e.openBlock(),e.createBlock(e.unref(m.VftIcon),e.normalizeProps(e.mergeProps({key:0},e.unref(i))),null,16)):e.createCommentVNode("",!0)]})],6)):e.createCommentVNode("",!0)]),_:3},8,["name"]))}});exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vft/utils");require("../divider/index.js");const m=require("../icon/index.js");require("../avatar/index.js");require("../empty/index.js");require("../result/index.js");require("../exception/index.js");require("../tabs/index.js");const p=require("./use-back-top.js"),k=require("../../hooks/use-namespace/index.js");require("@vue/shared");const n=k.useNamespace("back-top"),b=e.defineComponent({name:n.b()}),q=e.defineComponent({...b,props:{visibilityHeight:{default:200},target:null,right:{default:40},bottom:{default:40},icon:{default:"vi-back-top"}},emits:["click"],setup(r,{emit:c}){const l=e.getCurrentInstance(),{handleClick:o,visible:s}=p.useBackTop(l.props,c,n.b()),a=e.computed(()=>({right:`${r.right}px`,bottom:`${r.bottom}px`})),i=e.computed(()=>f.singleAttrToObj(r.icon,"icon",{color:"black"}));return(d,u)=>(e.openBlock(),e.createBlock(e.Transition,{name:`${e.unref(n).namespace}-fade-in`},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(e.unref(a)),class:e.normalizeClass(e.unref(n).b()),onClick:u[0]||(u[0]=e.withModifiers((...t)=>e.unref(o)&&e.unref(o)(...t),["stop"]))},[e.renderSlot(d.$slots,"default",{},()=>{var t;return[(t=e.unref(i))!=null&&t.icon?(e.openBlock(),e.createBlock(e.unref(m.VftIcon),e.normalizeProps(e.mergeProps({key:0},e.unref(i))),null,16)):e.createCommentVNode("",!0)]})],6)):e.createCommentVNode("",!0)]),_:3},8,["name"]))}});exports.default=q;
2
2
  //# sourceMappingURL=back-top.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"back-top.vue2.js","sources":["../../../../../packages/components/back-top/back-top.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('back-top')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n\tname: ns.b()\n});</script>\n<script lang=\"ts\" setup>\nimport { singleAttrToObj } from '@vft/utils';\nimport { type IconProps, VftIcon } from '@vft-ui/components';\nimport { useBackTop } from './use-back-top';\nimport { useNamespace } from '@vft-ui/use';\nimport { computed, getCurrentInstance } from 'vue';\n\ninterface BackTopProps {\n /** 滚动高度达到此参数值才出现 */\n visibilityHeight?: number\n /** 触发滚动的对象 */\n target?: string\n /** 控制其显示位置,距离页面右边距 */\n right?: number\n /** 控制其显示位置,距离页面底部距离 */\n bottom?: number\n /** 滚动 icon dom */\n icon?: IconProps\n}\n\ndefineProps({\n \"visibilityHeight\": { default: 200 },\n \"target\": null,\n \"right\": { default: 40 },\n \"bottom\": { default: 40 },\n \"icon\": { default: 'vi-back-top' }\n})\n\nconst emit = defineEmits(['click']);\n\n\n\n;\n\nconst instance = getCurrentInstance()!;\n\nconst { handleClick, visible } = useBackTop(instance.props, emit, ns.b());\n\nconst backTopStyle = computed(() => ({\n right: `${__props.right}px`,\n bottom: `${__props.bottom}px`\n}));\n\nconst _icon = computed(() => {\n return singleAttrToObj(__props.icon, 'icon', {\n color: 'black'\n }) as IconProps;\n});\n</script>\n\n<template>\n <transition :name=\"`${ns.namespace}-fade-in`\">\n <div\n v-if=\"visible\"\n :style=\"backTopStyle\"\n :class=\"ns.b()\"\n @click.stop=\"handleClick\"\n >\n <slot>\n <vft-icon v-if=\"_icon?.icon\" v-bind=\"_icon\" />\n </slot>\n </div>\n </transition>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","instance","getCurrentInstance","handleClick","visible","useBackTop","emit","backTopStyle","computed","__props","_icon","singleAttrToObj"],"mappings":"6aACMA,EAAuBC,EAAAA,aAAa,UAAU,EAGpDC,EAA6BC,EAAAA,gBAAmB,CAC/C,KAAMH,EAAG,EAAE,CACZ,CAAC,qLAmCD,MAAMI,EAAWC,EAAAA,qBAEX,CAAE,YAAAC,EAAa,QAAAC,CAAY,EAAAC,aAAWJ,EAAS,MAAOK,EAAMT,EAAG,EAAA,CAAG,EAElEU,EAAeC,EAAAA,SAAS,KAAO,CACnC,MAAO,GAAGC,EAAQ,UAClB,OAAQ,GAAGA,EAAQ,UACnB,EAAA,EAEIC,EAAQF,EAAAA,SAAS,IACdG,kBAAgBF,EAAQ,KAAM,OAAQ,CAC3C,MAAO,OAAA,CACR,CACF"}
1
+ {"version":3,"file":"back-top.vue2.js","sources":["../../../../../packages/components/back-top/back-top.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('back-top')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n\tname: ns.b()\n});</script>\n<script lang=\"ts\" setup>\nimport { singleAttrToObj } from '@vft/utils';\nimport { type IconProps, VftIcon } from '@vft-ui/components';\nimport { useBackTop } from './use-back-top';\nimport { useNamespace } from '@vft-ui/hooks';\nimport { computed, getCurrentInstance } from 'vue';\n\ninterface BackTopProps {\n /** 滚动高度达到此参数值才出现 */\n visibilityHeight?: number\n /** 触发滚动的对象 */\n target?: string\n /** 控制其显示位置,距离页面右边距 */\n right?: number\n /** 控制其显示位置,距离页面底部距离 */\n bottom?: number\n /** 滚动 icon dom */\n icon?: IconProps\n}\n\ndefineProps({\n \"visibilityHeight\": { default: 200 },\n \"target\": null,\n \"right\": { default: 40 },\n \"bottom\": { default: 40 },\n \"icon\": { default: 'vi-back-top' }\n})\n\nconst emit = defineEmits(['click']);\n\n\n\n;\n\nconst instance = getCurrentInstance()!;\n\nconst { handleClick, visible } = useBackTop(instance.props, emit, ns.b());\n\nconst backTopStyle = computed(() => ({\n right: `${__props.right}px`,\n bottom: `${__props.bottom}px`\n}));\n\nconst _icon = computed(() => {\n return singleAttrToObj(__props.icon, 'icon', {\n color: 'black'\n }) as IconProps;\n});\n</script>\n\n<template>\n <transition :name=\"`${ns.namespace}-fade-in`\">\n <div\n v-if=\"visible\"\n :style=\"backTopStyle\"\n :class=\"ns.b()\"\n @click.stop=\"handleClick\"\n >\n <slot>\n <vft-icon v-if=\"_icon?.icon\" v-bind=\"_icon\" />\n </slot>\n </div>\n </transition>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","instance","getCurrentInstance","handleClick","visible","useBackTop","emit","backTopStyle","computed","__props","_icon","singleAttrToObj"],"mappings":"geACA,MAAMA,EAAuBC,EAAAA,aAAa,UAAU,EAGpDC,EAA6BC,EAAAA,gBAAmB,CAC/C,KAAMH,EAAG,EAAE,CACZ,CAAC,qLAmCD,MAAMI,EAAWC,EAAAA,qBAEX,CAAE,YAAAC,EAAa,QAAAC,CAAY,EAAAC,aAAWJ,EAAS,MAAOK,EAAMT,EAAG,EAAA,CAAG,EAElEU,EAAeC,EAAAA,SAAS,KAAO,CACnC,MAAO,GAAGC,EAAQ,UAClB,OAAQ,GAAGA,EAAQ,UACnB,EAAA,EAEIC,EAAQF,EAAAA,SAAS,IACdG,kBAAgBF,EAAQ,KAAM,OAAQ,CAC3C,MAAO,OAAA,CACR,CACF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("@vft/utils");const u=require("./back-top.vue2.js"),e=t.withInstall(u.default);exports.VftBackTop=e;exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const r=require("./back-top.vue2.js"),e=t.withInstall(r.default);exports.VftBackTop=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/back-top/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport BackTop from './back-top.vue'\n\nexport const VftBackTop = withInstall(BackTop)\nexport default VftBackTop\n\nexport * from './types'\n"],"names":["VftBackTop","withInstall","BackTop"],"mappings":"sNAIaA,EAAaC,cAAYC,EAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/back-top/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport BackTop from './back-top.vue'\n\nexport const VftBackTop = withInstall(BackTop)\nexport default VftBackTop\n\nexport * from './types'\n"],"names":["VftBackTop","withInstall","BackTop"],"mappings":"4PAIaA,EAAaC,cAAYC,EAAO,OAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../hooks/use-namespace/index.js"),t=l.useNamespace("divider"),i=e.defineComponent({name:t.b()}),a=e.defineComponent({...i,props:{direction:{default:"horizontal"},contentPosition:{default:"center"},borderStyle:{default:"solid"},borderColor:null,marginY:null,marginX:null},setup(r){const o=e.computed(()=>({...t.cssVarBlock({"border-style":r.borderStyle,"border-color":r.borderColor,"margin-y":r.marginY,"margin-x":r.marginX})}));return(n,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(t).b(),e.unref(t).m(r.direction)]),style:e.normalizeStyle(e.unref(o)),role:"separator"},[n.$slots.default&&r.direction!=="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(t).e("text"),e.unref(t).is(r.contentPosition)])},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0)],6))}});exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../hooks/use-namespace/index.js");require("@vue/shared");require("@vft/utils");const t=l.useNamespace("divider"),i=e.defineComponent({name:t.b()}),a=e.defineComponent({...i,props:{direction:{default:"horizontal"},contentPosition:{default:"center"},borderStyle:{default:"solid"},borderColor:null,marginY:null,marginX:null},setup(r){const o=e.computed(()=>({...t.cssVarBlock({"border-style":r.borderStyle,"border-color":r.borderColor,"margin-y":r.marginY,"margin-x":r.marginX})}));return(n,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(t).b(),e.unref(t).m(r.direction)]),style:e.normalizeStyle(e.unref(o)),role:"separator"},[n.$slots.default&&r.direction!=="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(t).e("text"),e.unref(t).is(r.contentPosition)])},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0)],6))}});exports.default=a;
2
2
  //# sourceMappingURL=divider.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.vue2.js","sources":["../../../../../packages/components/divider/divider.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('divider')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n\tname: ns.b()\n});</script>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport { useNamespace } from '@vft-ui/use';\nimport type { CSSProperties } from 'vue';\nimport type { BorderColor, BorderStyle } from './types';\n\ninterface DividerProps {\n\tdirection?: 'horizontal' | 'vertical'\n\tcontentPosition?: 'left' | 'center' | 'right',\n\tborderStyle?: BorderStyle,\n\tborderColor?: BorderColor,\n\tmarginY?: string,\n\tmarginX?: string,\n}\n\ndefineProps({\n \"direction\": { default: 'horizontal' },\n \"contentPosition\": { default: 'center' },\n \"borderStyle\": { default: 'solid' },\n \"borderColor\": null,\n \"marginY\": null,\n \"marginX\": null\n})\n\n\n\n;\n\nconst dividerStyle = computed(() => {\n\treturn {\n\t\t...ns.cssVarBlock({\n\t\t\t'border-style': __props.borderStyle,\n\t\t\t'border-color': __props.borderColor,\n\t\t\t'margin-y': __props.marginY,\n\t\t\t'margin-x': __props.marginX\n\t\t})\n\t} as CSSProperties;\n});\n</script>\n\n<template>\n\t<div :class=\"[ns.b(), ns.m(direction)]\"\n\t\t\t:style=\"dividerStyle\" role=\"separator\">\n\t\t<div v-if=\"$slots.default && direction !== 'vertical'\"\n\t\t\t\t:class=\"[ns.e('text'), ns.is(contentPosition)]\">\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","dividerStyle","computed","__props"],"mappings":"mLACMA,EAAuBC,EAAAA,aAAa,SAAS,EAGnDC,EAA6BC,EAAAA,gBAAmB,CAC/C,KAAMH,EAAG,EAAE,CACZ,CAAC,0LA6BK,MAAAI,EAAeC,EAAAA,SAAS,KACtB,CACN,GAAGL,EAAG,YAAY,CACjB,eAAgBM,EAAQ,YACxB,eAAgBA,EAAQ,YACxB,WAAYA,EAAQ,QACpB,WAAYA,EAAQ,OAAA,CACpB,CAAA,EAEF"}
1
+ {"version":3,"file":"divider.vue2.js","sources":["../../../../../packages/components/divider/divider.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('divider')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n\tname: ns.b()\n});</script>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport { useNamespace } from '@vft-ui/hooks';\nimport type { CSSProperties } from 'vue';\nimport type { BorderColor, BorderStyle } from './types';\n\ninterface DividerProps {\n\tdirection?: 'horizontal' | 'vertical'\n\tcontentPosition?: 'left' | 'center' | 'right',\n\tborderStyle?: BorderStyle,\n\tborderColor?: BorderColor,\n\tmarginY?: string,\n\tmarginX?: string,\n}\n\ndefineProps({\n \"direction\": { default: 'horizontal' },\n \"contentPosition\": { default: 'center' },\n \"borderStyle\": { default: 'solid' },\n \"borderColor\": null,\n \"marginY\": null,\n \"marginX\": null\n})\n\n\n\n;\n\nconst dividerStyle = computed(() => {\n\treturn {\n\t\t...ns.cssVarBlock({\n\t\t\t'border-style': __props.borderStyle,\n\t\t\t'border-color': __props.borderColor,\n\t\t\t'margin-y': __props.marginY,\n\t\t\t'margin-x': __props.marginX\n\t\t})\n\t} as CSSProperties;\n});\n</script>\n\n<template>\n\t<div :class=\"[ns.b(), ns.m(direction)]\"\n\t\t\t:style=\"dividerStyle\" role=\"separator\">\n\t\t<div v-if=\"$slots.default && direction !== 'vertical'\"\n\t\t\t\t:class=\"[ns.e('text'), ns.is(contentPosition)]\">\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","dividerStyle","computed","__props"],"mappings":"gOACA,MAAMA,EAAuBC,EAAAA,aAAa,SAAS,EAGnDC,EAA6BC,EAAAA,gBAAmB,CAC/C,KAAMH,EAAG,EAAE,CACZ,CAAC,0LA6BK,MAAAI,EAAeC,EAAAA,SAAS,KACtB,CACN,GAAGL,EAAG,YAAY,CACjB,eAAgBM,EAAQ,YACxB,eAAgBA,EAAQ,YACxB,WAAYA,EAAQ,QACpB,WAAYA,EAAQ,OAAA,CACpB,CAAA,EAEF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("@vft/utils");const i=require("./divider.vue2.js"),e=t.withInstall(i.default);exports.VftDivider=e;exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const r=require("./divider.vue2.js"),e=t.withInstall(r.default);exports.VftDivider=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/divider/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Divider from './divider.vue'\n\nexport const VftDivider = withInstall(Divider)\nexport default VftDivider\n"],"names":["VftDivider","withInstall","Divider"],"mappings":"qNAIaA,EAAaC,cAAYC,EAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/divider/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Divider from './divider.vue'\n\nexport const VftDivider = withInstall(Divider)\nexport default VftDivider\n"],"names":["VftDivider","withInstall","Divider"],"mappings":"2PAIaA,EAAaC,cAAYC,EAAO,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"empty.vue2.js","sources":["../../../../../packages/components/empty/empty.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('empty')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n name: ns.b()\n});</script>\n<script setup lang=\"ts\">\nimport { renderTNode, setSize, VNode } from '@vft/utils';\nimport { useNamespace } from '@vft-ui/use';\nimport { getCurrentInstance, computed } from 'vue';\nimport type { ComponentSize } from '../types';\nimport { getSizeType } from '@vft-ui/utils';\nimport { EmptyEnum } from './constants';\n\nimport NoCollect from './assets/no-collect.png';\nimport NoData from './assets/no-data.png';\nimport NoFilter from './assets/no-filter.png';\nimport NoPageData from './assets/no-page-data.png';\nimport NoSearch from './assets/no-search.png';\n\ninterface EmptyProps {\n /** 图片类型或字符串 支持自定义 slot */\n img?: string;\n type?: EmptyEnum;\n /** 图片大小 */\n size?: ComponentSize | string | number[];\n /** 图片底部描述 支持自定义 slot */\n desc?: string;\n}\n\ndefineProps({\n \"img\": null,\n \"type\": { default: EmptyEnum.NO_DATA },\n \"size\": null,\n \"desc\": null\n})\n\n\n\n;\n\nconst instance = getCurrentInstance();\n\nconst imgTypeMap = new Map<EmptyEnum, {text: string; img: string; size?: EmptyProps['size']; descStyle?: Record<string, Numberish>}>([\n [\n\t\tEmptyEnum.NO_COLLECT,\n {\n text: '暂无收藏记录',\n img: NoCollect\n }\n ],\n [\n\t\tEmptyEnum.NO_PAGE_DATA,\n {\n text: '没有找到相关信息',\n size: 300,\n img: NoPageData\n }\n ],\n [\n\t\tEmptyEnum.NO_DATA,\n {\n text: '暂无数据',\n img: NoData\n }\n ],\n [\n\t\tEmptyEnum.NO_FILTER,\n {\n text: '此筛选条件下无结果',\n img: NoFilter\n }\n ],\n [\n\t\tEmptyEnum.NO_SEARCH,\n {\n text: '没有搜索结果',\n img: NoSearch\n }\n ]\n]);\n\nconst imgInfos = imgTypeMap.get(__props.type);\n\nconst imgContent = computed(() => __props.img || imgInfos?.img);\n\nconst descContent = computed(() => renderTNode(instance, 'desc', { defaultNode: imgInfos?.text }));\n\nconst _sizeType = getSizeType(__props.size as string);\n</script>\n\n<template>\n <div :class=\"[ns.b(), _sizeType ? ns.m(_sizeType) : '']\">\n <div :class=\"ns.e('image')\" :style=\"_sizeType ? {} : setSize(imgInfos?.size || size)\">\n <slot v-if=\"$slots.img\" name=\"img\" />\n <img v-else :src=\"imgContent\" alt=\"\" />\n </div>\n <span :class=\"ns.e('desc')\" v-if=\"descContent\">\n <v-node :content=\"descContent\" />\n </span>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","instance","getCurrentInstance","imgInfos","EmptyEnum","NoCollect","NoPageData","NoData","NoFilter","NoSearch","__props","imgContent","computed","descContent","renderTNode","_sizeType","getSizeType"],"mappings":"sfACMA,EAAuBC,EAAAA,aAAa,OAAO,EAGjDC,EAA6BC,EAAAA,gBAAmB,CAC9C,KAAMH,EAAG,EAAE,CACb,CAAC,6GAoCD,MAAMI,EAAWC,EAAAA,qBAyCXC,MAvCiB,IAA8G,CACnI,CACAC,EAAAA,UAAU,WACR,CACE,KAAM,SACN,IAAKC,EAAA,OACP,CACF,EACA,CACAD,EAAAA,UAAU,aACR,CACE,KAAM,WACN,KAAM,IACN,IAAKE,EAAA,OACP,CACF,EACA,CACAF,EAAAA,UAAU,QACR,CACE,KAAM,OACN,IAAKG,EAAA,OACP,CACF,EACA,CACAH,EAAAA,UAAU,UACR,CACE,KAAM,YACN,IAAKI,EAAA,OACP,CACF,EACA,CACAJ,EAAAA,UAAU,UACR,CACE,KAAM,SACN,IAAKK,EAAA,OACP,CACF,CAAA,CACD,EAE2B,IAAIC,EAAQ,IAAI,EAEtCC,EAAaC,EAAAA,SAAS,IAAMF,EAAQ,MAAOP,GAAA,YAAAA,EAAU,IAAG,EAExDU,EAAcD,EAAAA,SAAS,IAAME,EAAAA,YAAYb,EAAU,OAAQ,CAAE,YAAaE,GAAA,YAAAA,EAAU,IAAK,CAAC,CAAC,EAE3FY,EAAYC,EAAAA,YAAYN,EAAQ,IAAc"}
1
+ {"version":3,"file":"empty.vue2.js","sources":["../../../../../packages/components/empty/empty.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('empty')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n name: ns.b()\n});</script>\n<script setup lang=\"ts\">\nimport { renderTNode, setSize, VNode } from '@vft/utils';\nimport { useNamespace } from '@vft-ui/hooks';\nimport { getCurrentInstance, computed } from 'vue';\nimport type { ComponentSize } from '../types';\nimport { getSizeType } from '@vft-ui/utils';\nimport { EmptyEnum } from './constants';\n\nimport NoCollect from './assets/no-collect.png';\nimport NoData from './assets/no-data.png';\nimport NoFilter from './assets/no-filter.png';\nimport NoPageData from './assets/no-page-data.png';\nimport NoSearch from './assets/no-search.png';\n\ninterface EmptyProps {\n /** 图片类型或字符串 支持自定义 slot */\n img?: string;\n type?: EmptyEnum;\n /** 图片大小 */\n size?: ComponentSize | string | number[];\n /** 图片底部描述 支持自定义 slot */\n desc?: string;\n}\n\ndefineProps({\n \"img\": null,\n \"type\": { default: EmptyEnum.NO_DATA },\n \"size\": null,\n \"desc\": null\n})\n\n\n\n;\n\nconst instance = getCurrentInstance();\n\nconst imgTypeMap = new Map<EmptyEnum, {text: string; img: string; size?: EmptyProps['size']; descStyle?: Record<string, Numberish>}>([\n [\n\t\tEmptyEnum.NO_COLLECT,\n {\n text: '暂无收藏记录',\n img: NoCollect\n }\n ],\n [\n\t\tEmptyEnum.NO_PAGE_DATA,\n {\n text: '没有找到相关信息',\n size: 300,\n img: NoPageData\n }\n ],\n [\n\t\tEmptyEnum.NO_DATA,\n {\n text: '暂无数据',\n img: NoData\n }\n ],\n [\n\t\tEmptyEnum.NO_FILTER,\n {\n text: '此筛选条件下无结果',\n img: NoFilter\n }\n ],\n [\n\t\tEmptyEnum.NO_SEARCH,\n {\n text: '没有搜索结果',\n img: NoSearch\n }\n ]\n]);\n\nconst imgInfos = imgTypeMap.get(__props.type);\n\nconst imgContent = computed(() => __props.img || imgInfos?.img);\n\nconst descContent = computed(() => renderTNode(instance, 'desc', { defaultNode: imgInfos?.text }));\n\nconst _sizeType = getSizeType(__props.size as string);\n</script>\n\n<template>\n <div :class=\"[ns.b(), _sizeType ? ns.m(_sizeType) : '']\">\n <div :class=\"ns.e('image')\" :style=\"_sizeType ? {} : setSize(imgInfos?.size || size)\">\n <slot v-if=\"$slots.img\" name=\"img\" />\n <img v-else :src=\"imgContent\" alt=\"\" />\n </div>\n <span :class=\"ns.e('desc')\" v-if=\"descContent\">\n <v-node :content=\"descContent\" />\n </span>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","instance","getCurrentInstance","imgInfos","EmptyEnum","NoCollect","NoPageData","NoData","NoFilter","NoSearch","__props","imgContent","computed","descContent","renderTNode","_sizeType","getSizeType"],"mappings":"sfACMA,EAAuBC,EAAAA,aAAa,OAAO,EAGjDC,EAA6BC,EAAAA,gBAAmB,CAC9C,KAAMH,EAAG,EAAE,CACb,CAAC,6GAoCD,MAAMI,EAAWC,EAAAA,qBAyCXC,MAvCiB,IAA8G,CACnI,CACAC,EAAAA,UAAU,WACR,CACE,KAAM,SACN,IAAKC,EAAA,OACP,CACF,EACA,CACAD,EAAAA,UAAU,aACR,CACE,KAAM,WACN,KAAM,IACN,IAAKE,EAAA,OACP,CACF,EACA,CACAF,EAAAA,UAAU,QACR,CACE,KAAM,OACN,IAAKG,EAAA,OACP,CACF,EACA,CACAH,EAAAA,UAAU,UACR,CACE,KAAM,YACN,IAAKI,EAAA,OACP,CACF,EACA,CACAJ,EAAAA,UAAU,UACR,CACE,KAAM,SACN,IAAKK,EAAA,OACP,CACF,CAAA,CACD,EAE2B,IAAIC,EAAQ,IAAI,EAEtCC,EAAaC,EAAAA,SAAS,IAAMF,EAAQ,MAAOP,GAAA,YAAAA,EAAU,IAAG,EAExDU,EAAcD,EAAAA,SAAS,IAAME,EAAAA,YAAYb,EAAU,OAAQ,CAAE,YAAaE,GAAA,YAAAA,EAAU,IAAK,CAAC,CAAC,EAE3FY,EAAYC,EAAAA,YAAYN,EAAQ,IAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../utils/vue/install.js");require("@vft/utils");const u=require("./empty.vue2.js"),r=require("./constants.js"),t=e.withInstall(u.default);exports.EmptyEnum=r.EmptyEnum;exports.VftEmpty=t;exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const u=require("./empty.vue2.js"),r=require("./constants.js"),e=t.withInstall(u.default);exports.EmptyEnum=r.EmptyEnum;exports.VftEmpty=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/empty/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Empty from './empty.vue'\n\nexport * from './constants'\n\nexport const VftEmpty = withInstall(Empty)\nexport default VftEmpty\n"],"names":["VftEmpty","withInstall","Empty"],"mappings":"+OAMaA,EAAWC,cAAYC,EAAK,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/empty/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Empty from './empty.vue'\n\nexport * from './constants'\n\nexport const VftEmpty = withInstall(Empty)\nexport default VftEmpty\n"],"names":["VftEmpty","withInstall","Empty"],"mappings":"qRAMaA,EAAWC,cAAYC,EAAK,OAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("@vft/utils");const u=require("./exception.vue2.js"),e=t.withInstall(u.default);exports.VftException=e;exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const r=require("./exception.vue2.js"),e=t.withInstall(r.default);exports.VftException=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/exception/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Exception from './exception.vue'\n\nexport const VftException = withInstall(Exception)\nexport default VftException\n"],"names":["VftException","withInstall","Exception"],"mappings":"uNAIaA,EAAeC,cAAYC,EAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/exception/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Exception from './exception.vue'\n\nexport const VftException = withInstall(Exception)\nexport default VftException\n"],"names":["VftException","withInstall","Exception"],"mappings":"6PAIaA,EAAeC,cAAYC,EAAS,OAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("@vft/utils"),l=require("../../hooks/use-namespace/index.js"),s=l.useNamespace("icon"),u=t.defineComponent({name:s.b()}),r=t.defineComponent({...u,props:{dot:{type:Boolean},icon:null,size:null,badge:null,color:null,classPrefix:null,spin:{type:Boolean},cursor:{type:Boolean},scale:null},emits:["click"],setup(n,{emit:a}){t.computed(()=>{const e={};return n.color&&(e.color=n.color),n.size&&(e.fontSize=c.addUnit(n.size)),n.spin&&(e.animation="vri-rotate 1s linear 0s infinite"),n.cursor&&(e.cursor="pointer"),n.scale&&(e.transform="scale(0.8)"),e});const i=(e=>e==null?void 0:e.includes("/"))(n.icon),o=t.computed(()=>n.classPrefix);return t.computed(()=>i?"":[n.icon.startsWith("vi-")?"vicon":"iconfont",`${o.value||""}${n.icon}`]),(e,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(e.$slots,"default")]))}});exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),c=require("@vft/utils"),l=require("../../hooks/use-namespace/index.js");require("@vue/shared");const s=l.useNamespace("icon"),u=i.defineComponent({name:s.b()}),r=i.defineComponent({...u,props:{dot:{type:Boolean},icon:null,size:null,badge:null,color:null,classPrefix:null,spin:{type:Boolean},cursor:{type:Boolean},scale:null},emits:["click"],setup(n,{emit:a}){i.computed(()=>{const e={};return n.color&&(e.color=n.color),n.size&&(e.fontSize=c.addUnit(n.size)),n.spin&&(e.animation="vri-rotate 1s linear 0s infinite"),n.cursor&&(e.cursor="pointer"),n.scale&&(e.transform="scale(0.8)"),e});const t=(e=>e==null?void 0:e.includes("/"))(n.icon),o=i.computed(()=>n.classPrefix);return i.computed(()=>t?"":[n.icon.startsWith("vi-")?"vicon":"iconfont",`${o.value||""}${n.icon}`]),(e,f)=>(i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(e.$slots,"default")]))}});exports.default=r;
2
2
  //# sourceMappingURL=icon.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.vue2.js","sources":["../../../../../packages/components/icon/icon.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('icon')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n name: ns.b()\n});</script>\n<script lang=\"ts\" setup>\nimport { computed, type CSSProperties, inject } from 'vue';\nimport { addUnit } from '@vft/utils';\nimport { useNamespace } from '@vft-ui/use';\n\nexport interface IconProps {\n /** 是否显示图标右上角小红点 */\n dot?: boolean;\n /** 图标名称或图片链接 */\n icon: string;\n /** 图标大小 */\n size?: Numberish;\n /** 图标右上角徽标的内容 */\n badge?: Numberish;\n /** 图标颜色 */\n color?: string;\n /** 类名前缀,用于使用自定义图标 */\n classPrefix?: string;\n spin?: boolean;\n cursor?: boolean;\n scale?: number\n}\n\nconst emit = defineEmits(['click']);\n\ndefineProps({\n \"dot\": { type: Boolean, },\n \"icon\": null,\n \"size\": null,\n \"badge\": null,\n \"color\": null,\n \"classPrefix\": null,\n \"spin\": { type: Boolean, },\n \"cursor\": { type: Boolean, },\n \"scale\": null\n})\n\n\n\n;\n\nconst style = computed(() => {\n const _style: CSSProperties = {};\n if (__props.color) {\n _style['color'] = __props.color;\n }\n if (__props.size) {\n _style['fontSize'] = addUnit(__props.size);\n }\n if (__props.spin) {\n _style['animation'] = 'vri-rotate 1s linear 0s infinite';\n }\n if (__props.cursor) {\n _style['cursor'] = 'pointer';\n }\n if (__props.scale) {\n _style.transform = 'scale(0.8)';\n }\n return _style;\n});\n\nconst isImage = (name?: string) => name?.includes('/');\nconst isImageIcon = isImage(__props.icon);\n\n\nconst _classPrefix = computed(() => __props.classPrefix);\nconst classes = computed(() => (isImageIcon ? '' : [__props.icon.startsWith('vi-') ? 'vicon' : 'iconfont', `${_classPrefix.value || ''}${__props.icon}`]));\n</script>\n\n<template>\n\t<div>\n\t\t<slot></slot>\n\t</div>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","computed","_style","__props","addUnit","isImageIcon","name","_classPrefix"],"mappings":"2MACMA,EAAuBC,EAAAA,aAAa,MAAM,EAGhDC,EAA6BC,EAAAA,gBAAmB,CAC9C,KAAMH,EAAG,EAAE,CACb,CAAC,yMA0CaI,EAAAA,SAAS,IAAM,CAC3B,MAAMC,EAAwB,CAAA,EAC9B,OAAIC,EAAQ,QACHD,EAAA,MAAWC,EAAQ,OAExBA,EAAQ,OACVD,EAAO,SAAcE,EAAQ,QAAAD,EAAQ,IAAI,GAEvCA,EAAQ,OACVD,EAAO,UAAe,oCAEpBC,EAAQ,SACVD,EAAO,OAAY,WAEjBC,EAAQ,QACVD,EAAO,UAAY,cAEdA,CAAA,CACR,EAGK,MAAAG,GADWC,GAAkBA,GAAA,YAAAA,EAAM,SAAS,MACtBH,EAAQ,IAAI,EAGlCI,EAAeN,EAAA,SAAS,IAAME,EAAQ,WAAW,EACvCF,OAAAA,WAAS,IAAOI,EAAc,GAAK,CAACF,EAAQ,KAAK,WAAW,KAAK,EAAI,QAAU,WAAY,GAAGI,EAAa,OAAS,KAAKJ,EAAQ,MAAM,CAAE"}
1
+ {"version":3,"file":"icon.vue2.js","sources":["../../../../../packages/components/icon/icon.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('icon')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n name: ns.b()\n});</script>\n<script lang=\"ts\" setup>\nimport { computed, type CSSProperties, inject } from 'vue';\nimport { addUnit } from '@vft/utils';\nimport { useNamespace } from '@vft-ui/hooks';\n\nexport interface IconProps {\n /** 是否显示图标右上角小红点 */\n dot?: boolean;\n /** 图标名称或图片链接 */\n icon: string;\n /** 图标大小 */\n size?: Numberish;\n /** 图标右上角徽标的内容 */\n badge?: Numberish;\n /** 图标颜色 */\n color?: string;\n /** 类名前缀,用于使用自定义图标 */\n classPrefix?: string;\n spin?: boolean;\n cursor?: boolean;\n scale?: number\n}\n\nconst emit = defineEmits(['click']);\n\ndefineProps({\n \"dot\": { type: Boolean, },\n \"icon\": null,\n \"size\": null,\n \"badge\": null,\n \"color\": null,\n \"classPrefix\": null,\n \"spin\": { type: Boolean, },\n \"cursor\": { type: Boolean, },\n \"scale\": null\n})\n\n\n\n;\n\nconst style = computed(() => {\n const _style: CSSProperties = {};\n if (__props.color) {\n _style['color'] = __props.color;\n }\n if (__props.size) {\n _style['fontSize'] = addUnit(__props.size);\n }\n if (__props.spin) {\n _style['animation'] = 'vri-rotate 1s linear 0s infinite';\n }\n if (__props.cursor) {\n _style['cursor'] = 'pointer';\n }\n if (__props.scale) {\n _style.transform = 'scale(0.8)';\n }\n return _style;\n});\n\nconst isImage = (name?: string) => name?.includes('/');\nconst isImageIcon = isImage(__props.icon);\n\n\nconst _classPrefix = computed(() => __props.classPrefix);\nconst classes = computed(() => (isImageIcon ? '' : [__props.icon.startsWith('vi-') ? 'vicon' : 'iconfont', `${_classPrefix.value || ''}${__props.icon}`]));\n</script>\n\n<template>\n\t<div>\n\t\t<slot></slot>\n\t</div>\n</template>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","computed","_style","__props","addUnit","isImageIcon","name","_classPrefix"],"mappings":"kOACA,MAAMA,EAAuBC,EAAAA,aAAa,MAAM,EAGhDC,EAA6BC,EAAAA,gBAAmB,CAC9C,KAAMH,EAAG,EAAE,CACb,CAAC,yMA0CaI,EAAAA,SAAS,IAAM,CAC3B,MAAMC,EAAwB,CAAA,EAC9B,OAAIC,EAAQ,QACHD,EAAA,MAAWC,EAAQ,OAExBA,EAAQ,OACVD,EAAO,SAAcE,EAAQ,QAAAD,EAAQ,IAAI,GAEvCA,EAAQ,OACVD,EAAO,UAAe,oCAEpBC,EAAQ,SACVD,EAAO,OAAY,WAEjBC,EAAQ,QACVD,EAAO,UAAY,cAEdA,CAAA,CACR,EAGK,MAAAG,GADWC,GAAkBA,GAAA,YAAAA,EAAM,SAAS,MACtBH,EAAQ,IAAI,EAGlCI,EAAeN,EAAA,SAAS,IAAME,EAAQ,WAAW,EACvCF,OAAAA,WAAS,IAAOI,EAAc,GAAK,CAACF,EAAQ,KAAK,WAAW,KAAK,EAAI,QAAU,WAAY,GAAGI,EAAa,OAAS,KAAKJ,EAAQ,MAAM,CAAE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("@vft/utils");const u=require("./icon.vue2.js"),e=t.withInstall(u.default);exports.VftIcon=e;exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const r=require("./icon.vue2.js"),e=t.withInstall(r.default);exports.VftIcon=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/icon/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils';\n\nimport Icon, { type IconProps } from './icon.vue';\n\nexport {\n\ttype IconProps\n} from './icon.vue';\n\nexport const VftIcon = withInstall(Icon);\nexport default VftIcon;\n"],"names":["VftIcon","withInstall","Icon"],"mappings":"kNAQaA,EAAUC,cAAYC,EAAI,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/icon/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils';\n\nimport Icon, { type IconProps } from './icon.vue';\n\nexport {\n\ttype IconProps\n} from './icon.vue';\n\nexport const VftIcon = withInstall(Icon);\nexport default VftIcon;\n"],"names":["VftIcon","withInstall","Icon"],"mappings":"wPAQaA,EAAUC,cAAYC,EAAI,OAAA"}
@@ -4,3 +4,4 @@ export * from './avatar';
4
4
  export * from './empty';
5
5
  export * from './result';
6
6
  export * from './exception';
7
+ export * from './tabs';
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./divider/index.js"),e=require("./icon/index.js"),n=require("./avatar/index.js"),i=require("./empty/index.js"),r=require("./result/index.js"),o=require("./exception/index.js"),c=require("./empty/constants.js");exports.VftDivider=t.VftDivider;exports.VftIcon=e.VftIcon;exports.VftAvatar=n.VftAvatar;exports.VftEmpty=i.VftEmpty;exports.VftResult=r.VftResult;exports.VftException=o.VftException;exports.EmptyEnum=c.EmptyEnum;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./divider/index.js"),n=require("./icon/index.js"),r=require("./avatar/index.js"),i=require("./empty/index.js"),o=require("./result/index.js"),s=require("./exception/index.js"),t=require("./tabs/index.js"),f=require("./empty/constants.js"),c=require("./tabs/types.js");exports.VftDivider=e.VftDivider;exports.VftIcon=n.VftIcon;exports.VftAvatar=r.VftAvatar;exports.VftEmpty=i.VftEmpty;exports.VftResult=o.VftResult;exports.VftException=s.VftException;exports.VftTabPane=t.VftTabPane;exports.VftTabs=t.VftTabs;exports.EmptyEnum=f.EmptyEnum;exports.TabsRootContextKey=c.TabsRootContextKey;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("@vft/utils");const u=require("./result.vue2.js"),e=t.withInstall(u.default);exports.VftResult=e;exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/vue/install.js");require("vue");require("@vue/shared");require("@vft/utils");const u=require("./result.vue2.js"),e=t.withInstall(u.default);exports.VftResult=e;exports.default=e;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/result/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Result from './result.vue'\n\nexport const VftResult = withInstall(Result)\nexport default VftResult\n"],"names":["VftResult","withInstall","Result"],"mappings":"oNAIaA,EAAYC,cAAYC,EAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/result/index.ts"],"sourcesContent":["import { withInstall } from '@vft-ui/utils'\n\nimport Result from './result.vue'\n\nexport const VftResult = withInstall(Result)\nexport default VftResult\n"],"names":["VftResult","withInstall","Result"],"mappings":"0PAIaA,EAAYC,cAAYC,EAAM,OAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@vft/utils"),v=require("../../hooks/use-namespace/index.js");require("../divider/index.js");const p=require("../icon/index.js");require("../avatar/index.js");require("../empty/index.js");require("./index.js");require("../exception/index.js");const u=v.useNamespace("result"),q=e.defineComponent({name:u.b()}),_=e.defineComponent({...q,props:{title:null,subTitle:null,icon:null},setup(a){var o,s;const d=e.getCurrentInstance(),n=e.useSlots(),r=e.computed(()=>l.singleAttrToObj(a.icon,"icon")),f=(o=r.value)!=null&&o.icon?e.h("div",{class:u.e("icon")},[e.h(p.VftIcon,{...r.value})]):(s=n.default)==null?void 0:s.call(n),i=t=>{const c=l.renderTNode(d,t);return c?e.h("div",{class:u.e(t)},[e.h("p",{},{default:()=>c})]):null};return()=>e.h("div",{class:u.b()},{default:()=>[f,i("title"),i("sub-title"),n.extra?e.h("div",{class:u.e("extra")},{default:()=>{var t;return(t=n.extra)==null?void 0:t.call(n)}}):null]})}});exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@vft/utils"),q=require("../../hooks/use-namespace/index.js");require("@vue/shared");require("../divider/index.js");const v=require("../icon/index.js");require("../avatar/index.js");require("../empty/index.js");require("./index.js");require("../exception/index.js");require("../tabs/index.js");const r=q.useNamespace("result"),p=e.defineComponent({name:r.b()}),_=e.defineComponent({...p,props:{title:null,subTitle:null,icon:null},setup(a){var o,s;const d=e.getCurrentInstance(),n=e.useSlots(),u=e.computed(()=>l.singleAttrToObj(a.icon,"icon")),f=(o=u.value)!=null&&o.icon?e.h("div",{class:r.e("icon")},[e.h(v.VftIcon,{...u.value})]):(s=n.default)==null?void 0:s.call(n),i=t=>{const c=l.renderTNode(d,t);return c?e.h("div",{class:r.e(t)},[e.h("p",{},{default:()=>c})]):null};return()=>e.h("div",{class:r.b()},{default:()=>[f,i("title"),i("sub-title"),n.extra?e.h("div",{class:r.e("extra")},{default:()=>{var t;return(t=n.extra)==null?void 0:t.call(n)}}):null]})}});exports.default=_;
2
2
  //# sourceMappingURL=result.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"result.vue2.js","sources":["../../../../../packages/components/result/result.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('result')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n name: ns.b()\n});</script>\n<script setup lang=\"ts\">\nimport { renderTNode, singleAttrToObj } from '@vft/utils';\nimport { h, getCurrentInstance, computed, useSlots } from 'vue';\nimport { useNamespace } from '@vft-ui/use';\nimport { type IconProps, VftIcon } from '@vft-ui/components';\n\ninterface Props {\n title?: string | number;\n subTitle?: string | number;\n icon?: IconProps;\n}\n\ndefineProps({\n \"title\": null,\n \"subTitle\": null,\n \"icon\": null\n})\n\n\n\n;\n\nconst instance = getCurrentInstance()!;\n\nconst slots = useSlots();\n\nconst _icon = computed(() => {\n return singleAttrToObj(__props.icon, 'icon') as IconProps;\n});\n\nconst vIcon = _icon.value?.icon ? h('div', {\n class: ns.e('icon')\n}, [h(VftIcon, { ..._icon.value })]) : slots.default?.();\n\nconst vCon = (attrName: string) => {\n const nodeCon = renderTNode(instance, attrName);\n return nodeCon ? h(\n 'div',\n {\n class: ns.e(attrName)\n }, [h('p', {}, { default: () => nodeCon })]\n ) : null;\n};\n\ndefineRender(() => {\n return (\n h(\n 'div', { class: ns.b() }, {\n default: () => [\n vIcon,\n vCon('title'),\n vCon('sub-title'),\n slots.extra ? h('div', { class: ns.e('extra') }, { default: ()=> slots.extra?.() }) : null\n ]\n }\n )\n );\n});\n</script>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","instance","getCurrentInstance","slots","useSlots","_icon","computed","singleAttrToObj","__props","vIcon","_a","h","VftIcon","_b","vCon","attrName","nodeCon","renderTNode"],"mappings":"gYACA,MAAMA,EAAuBC,EAAAA,aAAa,QAAQ,EAGlDC,EAA6BC,EAAAA,gBAAmB,CAC9C,KAAMH,EAAG,EAAE,CACb,CAAC,wFAuBD,MAAMI,EAAWC,EAAAA,qBAEXC,EAAQC,EAAAA,WAERC,EAAQC,EAAAA,SAAS,IACdC,kBAAgBC,EAAQ,KAAM,MAAM,CAC5C,EAEKC,GAAQC,EAAAL,EAAM,QAAN,MAAAK,EAAa,KAAOC,EAAAA,EAAE,MAAO,CACzC,MAAOd,EAAG,EAAE,MAAM,CACjB,EAAA,CAACc,EAAE,EAAAC,UAAS,CAAE,GAAGP,EAAM,KAAO,CAAA,CAAC,CAAC,GAAIQ,EAAAV,EAAM,UAAN,YAAAU,EAAA,KAAAV,GAEjCW,EAAQC,GAAqB,CAC3B,MAAAC,EAAUC,EAAAA,YAAYhB,EAAUc,CAAQ,EAC9C,OAAOC,EAAUL,EAAA,EACf,MACA,CACE,MAAOd,EAAG,EAAEkB,CAAQ,CACtB,EAAG,CAACJ,EAAAA,EAAE,IAAK,CAAC,EAAG,CAAE,QAAS,IAAMK,CAAQ,CAAC,CAAC,CACxC,EAAA,IAAA,EAGO,MAAA,IAETL,EAAA,EACE,MAAO,CAAE,MAAOd,EAAG,GAAI,EAAG,CACxB,QAAS,IAAM,CACbY,EACAK,EAAK,OAAO,EACZA,EAAK,WAAW,EAChBX,EAAM,MAAQQ,EAAA,EAAE,MAAO,CAAE,MAAOd,EAAG,EAAE,OAAO,CAAE,EAAG,CAAE,QAAS,IAAA,OAAK,OAAAa,EAAAP,EAAM,QAAN,YAAAO,EAAA,KAAAP,GAAiB,CAAA,EAAI,IACxF,CACF,CAAA"}
1
+ {"version":3,"file":"result.vue2.js","sources":["../../../../../packages/components/result/result.vue"],"sourcesContent":["<script lang=\"ts\">\nconst ns = /* hoist-static*/ useNamespace('result')\n\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n name: ns.b()\n});</script>\n<script setup lang=\"ts\">\nimport { renderTNode, singleAttrToObj } from '@vft/utils';\nimport { h, getCurrentInstance, computed, useSlots } from 'vue';\nimport { useNamespace } from '@vft-ui/hooks';\nimport { type IconProps, VftIcon } from '@vft-ui/components';\n\ninterface Props {\n title?: string | number;\n subTitle?: string | number;\n icon?: IconProps;\n}\n\ndefineProps({\n \"title\": null,\n \"subTitle\": null,\n \"icon\": null\n})\n\n\n\n;\n\nconst instance = getCurrentInstance()!;\n\nconst slots = useSlots();\n\nconst _icon = computed(() => {\n return singleAttrToObj(__props.icon, 'icon') as IconProps;\n});\n\nconst vIcon = _icon.value?.icon ? h('div', {\n class: ns.e('icon')\n}, [h(VftIcon, { ..._icon.value })]) : slots.default?.();\n\nconst vCon = (attrName: string) => {\n const nodeCon = renderTNode(instance, attrName);\n return nodeCon ? h(\n 'div',\n {\n class: ns.e(attrName)\n }, [h('p', {}, { default: () => nodeCon })]\n ) : null;\n};\n\ndefineRender(() => {\n return (\n h(\n 'div', { class: ns.b() }, {\n default: () => [\n vIcon,\n vCon('title'),\n vCon('sub-title'),\n slots.extra ? h('div', { class: ns.e('extra') }, { default: ()=> slots.extra?.() }) : null\n ]\n }\n )\n );\n});\n</script>\n"],"names":["ns","useNamespace","__default__","DO_defineComponent","instance","getCurrentInstance","slots","useSlots","_icon","computed","singleAttrToObj","__props","vIcon","_a","h","VftIcon","_b","vCon","attrName","nodeCon","renderTNode"],"mappings":"mbACA,MAAMA,EAAuBC,EAAAA,aAAa,QAAQ,EAGlDC,EAA6BC,EAAAA,gBAAmB,CAC9C,KAAMH,EAAG,EAAE,CACb,CAAC,wFAuBD,MAAMI,EAAWC,EAAAA,qBAEXC,EAAQC,EAAAA,WAERC,EAAQC,EAAAA,SAAS,IACdC,kBAAgBC,EAAQ,KAAM,MAAM,CAC5C,EAEKC,GAAQC,EAAAL,EAAM,QAAN,MAAAK,EAAa,KAAOC,EAAAA,EAAE,MAAO,CACzC,MAAOd,EAAG,EAAE,MAAM,CACjB,EAAA,CAACc,EAAE,EAAAC,UAAS,CAAE,GAAGP,EAAM,KAAO,CAAA,CAAC,CAAC,GAAIQ,EAAAV,EAAM,UAAN,YAAAU,EAAA,KAAAV,GAEjCW,EAAQC,GAAqB,CAC3B,MAAAC,EAAUC,EAAAA,YAAYhB,EAAUc,CAAQ,EAC9C,OAAOC,EAAUL,EAAA,EACf,MACA,CACE,MAAOd,EAAG,EAAEkB,CAAQ,CACtB,EAAG,CAACJ,EAAAA,EAAE,IAAK,CAAC,EAAG,CAAE,QAAS,IAAMK,CAAQ,CAAC,CAAC,CACxC,EAAA,IAAA,EAGO,MAAA,IAETL,EAAA,EACE,MAAO,CAAE,MAAOd,EAAG,GAAI,EAAG,CACxB,QAAS,IAAM,CACbY,EACAK,EAAK,OAAO,EACZA,EAAK,WAAW,EAChBX,EAAM,MAAQQ,EAAA,EAAE,MAAO,CAAE,MAAOd,EAAG,EAAE,OAAO,CAAE,EAAG,CAAE,QAAS,IAAA,OAAK,OAAAa,EAAAP,EAAM,QAAN,YAAAO,EAAA,KAAAP,GAAiB,CAAA,EAAI,IACxF,CACF,CAAA"}