y-design-ssr 0.2.1 → 0.2.2

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 (90) hide show
  1. package/libs/button/index.css +579 -1
  2. package/libs/button/index.mjs +111 -66
  3. package/libs/button/index.umd.js +203 -2
  4. package/libs/cell/index.css +1077 -1
  5. package/libs/cell/index.mjs +167 -104
  6. package/libs/cell/index.umd.js +300 -2
  7. package/libs/checkbox/index.css +1053 -1
  8. package/libs/checkbox/index.mjs +242 -127
  9. package/libs/checkbox/index.umd.js +369 -2
  10. package/libs/checkboxGroup/index.css +422 -1
  11. package/libs/checkboxGroup/index.mjs +173 -87
  12. package/libs/checkboxGroup/index.umd.js +265 -2
  13. package/libs/col/index.css +615 -1
  14. package/libs/col/index.mjs +246 -81
  15. package/libs/col/index.umd.js +305 -2
  16. package/libs/countdown/index.css +417 -1
  17. package/libs/countdown/index.mjs +179 -71
  18. package/libs/countdown/index.umd.js +231 -2
  19. package/libs/dialog/index.css +1405 -1
  20. package/libs/dialog/index.mjs +646 -476
  21. package/libs/dialog/index.umd.js +1128 -2
  22. package/libs/empty/index.css +457 -1
  23. package/libs/empty/index.mjs +91 -44
  24. package/libs/empty/index.umd.js +139 -2
  25. package/libs/form/index.css +477 -1
  26. package/libs/form/index.mjs +226 -126
  27. package/libs/form/index.umd.js +319 -2
  28. package/libs/formItem/index.css +477 -1
  29. package/libs/formItem/index.mjs +276 -126
  30. package/libs/formItem/index.umd.js +372 -2
  31. package/libs/icon/index.css +982 -1
  32. package/libs/icon/index.mjs +107 -58
  33. package/libs/icon/index.umd.js +186 -2
  34. package/libs/index.css +2902 -1
  35. package/libs/index.mjs +3785 -2344
  36. package/libs/index.umd.js +5509 -2
  37. package/libs/input/index.css +483 -1
  38. package/libs/input/index.mjs +183 -92
  39. package/libs/input/index.umd.js +274 -2
  40. package/libs/layout/index.css +684 -1
  41. package/libs/layout/index.mjs +230 -130
  42. package/libs/layout/index.umd.js +318 -2
  43. package/libs/list/index.css +440 -1
  44. package/libs/list/index.mjs +388 -207
  45. package/libs/list/index.umd.js +571 -2
  46. package/libs/loading/index.css +548 -1
  47. package/libs/loading/index.mjs +196 -118
  48. package/libs/loading/index.umd.js +321 -2
  49. package/libs/mask/index.css +426 -1
  50. package/libs/mask/index.mjs +131 -70
  51. package/libs/mask/index.umd.js +201 -2
  52. package/libs/popup/index.css +465 -1
  53. package/libs/popup/index.mjs +210 -134
  54. package/libs/popup/index.umd.js +358 -2
  55. package/libs/progress/index.css +488 -1
  56. package/libs/progress/index.mjs +200 -128
  57. package/libs/progress/index.umd.js +322 -2
  58. package/libs/pullrefresh/index.css +441 -1
  59. package/libs/pullrefresh/index.mjs +241 -111
  60. package/libs/pullrefresh/index.umd.js +302 -2
  61. package/libs/row/index.css +485 -1
  62. package/libs/row/index.mjs +181 -89
  63. package/libs/row/index.umd.js +237 -2
  64. package/libs/slider/index.css +558 -1
  65. package/libs/slider/index.mjs +356 -160
  66. package/libs/slider/index.umd.js +453 -2
  67. package/libs/stepper/index.css +489 -1
  68. package/libs/stepper/index.mjs +181 -101
  69. package/libs/stepper/index.umd.js +269 -2
  70. package/libs/swipe/index.css +506 -1
  71. package/libs/swipe/index.mjs +542 -259
  72. package/libs/swipe/index.umd.js +703 -2
  73. package/libs/swipeItem/index.css +424 -1
  74. package/libs/swipeItem/index.mjs +111 -52
  75. package/libs/swipeItem/index.umd.js +154 -2
  76. package/libs/switch/index.css +472 -1
  77. package/libs/switch/index.mjs +121 -62
  78. package/libs/switch/index.umd.js +200 -2
  79. package/libs/tab/index.mjs +131 -68
  80. package/libs/tab/index.umd.js +190 -1
  81. package/libs/tabs/index.css +514 -1
  82. package/libs/tabs/index.mjs +751 -410
  83. package/libs/tabs/index.umd.js +1020 -2
  84. package/libs/toast/index.css +1050 -1
  85. package/libs/toast/index.mjs +183 -114
  86. package/libs/toast/index.umd.js +306 -2
  87. package/libs/tooltip/index.css +514 -1
  88. package/libs/tooltip/index.mjs +293 -155
  89. package/libs/tooltip/index.umd.js +416 -2
  90. package/package.json +2 -2
@@ -1,24 +1,58 @@
1
- import { inject as x, getCurrentInstance as m, onUnmounted as $, computed as f, ref as h, reactive as b, defineComponent as p, createVNode as y, onBeforeUnmount as N, isVNode as _ } from "vue";
2
- const g = (n) => {
3
- const t = x(n, null), i = m();
4
- if (t && i) {
5
- const { childrens: e, addChild: r, removeChild: a } = t;
6
- return r(i), $(() => a(i)), {
7
- index: f(() => e.indexOf(i)),
8
- parent: t
1
+ import { inject, getCurrentInstance, onUnmounted, computed, ref, reactive, defineComponent, createVNode, onBeforeUnmount, isVNode } from "vue";
2
+ const useRelation = (key) => {
3
+ const parent = inject(key, null);
4
+ const currentInstance = getCurrentInstance();
5
+ if (parent && currentInstance) {
6
+ const { childrens, addChild, removeChild } = parent;
7
+ addChild(currentInstance);
8
+ onUnmounted(() => removeChild(currentInstance));
9
+ const index = computed(() => childrens.indexOf(currentInstance));
10
+ return {
11
+ index,
12
+ parent
9
13
  };
10
14
  }
11
15
  return {
12
16
  parent: null,
13
- index: h(-1)
17
+ index: ref(-1)
14
18
  };
15
- }, u = (n, t) => t ? typeof t == "string" ? ` ${n}--${t}` : Array.isArray(t) ? t.reduce((i, e) => i + u(n, e), "") : Object.keys(t).reduce(
16
- (i, e) => i + (t[e] ? u(n, e) : ""),
17
- ""
18
- ) : "", v = (n) => (t, i) => {
19
- let e = t, r = i;
20
- return e && typeof e != "string" && (r = e, e = ""), e = e ? `${n}__${e}` : n, `${e}${u(e, r)}`;
21
- }, S = () => (n, t) => t ? `${u(`y-${n}`, t)}` : `y-${n}`, w = {
19
+ };
20
+ const getMods = (el, mods) => {
21
+ if (!mods) {
22
+ return "";
23
+ }
24
+ if (typeof mods === "string") {
25
+ return ` ${el}--${mods}`;
26
+ }
27
+ if (Array.isArray(mods)) {
28
+ return mods.reduce((acc, cur) => acc + getMods(el, cur), "");
29
+ }
30
+ return Object.keys(mods).reduce(
31
+ (acc, cur) => acc + (mods[cur] ? getMods(el, cur) : ""),
32
+ ""
33
+ );
34
+ };
35
+ const createBEM = (block) => {
36
+ return (el, mods) => {
37
+ let _el = el;
38
+ let _mods = mods;
39
+ if (_el && typeof _el !== "string") {
40
+ _mods = _el;
41
+ _el = "";
42
+ }
43
+ _el = _el ? `${block}__${_el}` : block;
44
+ return `${_el}${getMods(_el, _mods)}`;
45
+ };
46
+ };
47
+ const createGlobalBem = () => {
48
+ return (el, mods) => {
49
+ if (!mods) {
50
+ return `y-${el}`;
51
+ }
52
+ return `${getMods(`y-${el}`, mods)}`;
53
+ };
54
+ };
55
+ const defaultLang = {
22
56
  "pull-refresh": {
23
57
  pulling: "下拉刷新...",
24
58
  loosing: "释放刷新...",
@@ -30,15 +64,19 @@ const g = (n) => {
30
64
  validateMessage: "请输入正确内容"
31
65
  }
32
66
  };
33
- h("zh-CN");
34
- b({
35
- "zh-CN": w
67
+ ref("zh-CN");
68
+ reactive({
69
+ "zh-CN": defaultLang
36
70
  });
37
- const s = (n) => {
38
- const t = `y-${n}`;
39
- return [t, v(t), S()];
40
- }, [I, R] = s("swipe"), j = I, [B, C] = s("swipe-item"), O = /* @__PURE__ */ p({
41
- name: B,
71
+ const createNamespace = (name2) => {
72
+ const prefixedName = `y-${name2}`;
73
+ return [prefixedName, createBEM(prefixedName), createGlobalBem()];
74
+ };
75
+ const [name$3, bem$2] = createNamespace("swipe");
76
+ const SWIPE_PROVIDE_KEY = name$3;
77
+ const [name$2, bem$1] = createNamespace("swipe-item");
78
+ const SwipeItem = /* @__PURE__ */ defineComponent({
79
+ name: name$2,
42
80
  props: {
43
81
  clonenNode: {
44
82
  type: Object,
@@ -49,42 +87,60 @@ const s = (n) => {
49
87
  default: -1
50
88
  }
51
89
  },
52
- setup(n, {
53
- slots: t
90
+ setup(props, {
91
+ slots
54
92
  }) {
55
- const i = m(), {
56
- parent: e
57
- } = g(j);
58
- !n.clonenNode && i && (e == null || e.children.push(i));
59
- const r = f(() => n.clonenNode ? n.index : e == null ? void 0 : e.children.findIndex((o) => o.proxy === (i == null ? void 0 : i.proxy))), a = f(() => {
60
- const o = `${(e == null ? void 0 : e.itemDetail.size) || 0}px`;
61
- let c = "auto";
62
- const l = `${(e == null ? void 0 : e.itemDetail.space) || 0}px`;
63
- return e != null && e.props.autoHeight && (e == null ? void 0 : e.activeIndex) !== r.value && (c = "0"), e != null && e.props.vertical ? {
64
- height: o,
65
- width: c,
66
- marginBottom: l
67
- } : {
68
- width: o,
69
- height: c,
70
- marginRight: l
93
+ const instance = getCurrentInstance();
94
+ const {
95
+ parent
96
+ } = useRelation(SWIPE_PROVIDE_KEY);
97
+ if (!props.clonenNode && instance) {
98
+ parent == null ? void 0 : parent.children.push(instance);
99
+ }
100
+ const index = computed(() => {
101
+ if (props.clonenNode) {
102
+ return props.index;
103
+ }
104
+ return parent == null ? void 0 : parent.children.findIndex((item) => item.proxy === (instance == null ? void 0 : instance.proxy));
105
+ });
106
+ const style = computed(() => {
107
+ const width = `${(parent == null ? void 0 : parent.itemDetail.size) || 0}px`;
108
+ let height = "auto";
109
+ const spacing = `${(parent == null ? void 0 : parent.itemDetail.space) || 0}px`;
110
+ if ((parent == null ? void 0 : parent.props.autoHeight) && (parent == null ? void 0 : parent.activeIndex) !== index.value) {
111
+ height = "0";
112
+ }
113
+ if (parent == null ? void 0 : parent.props.vertical) {
114
+ return {
115
+ height: width,
116
+ width: height,
117
+ marginBottom: spacing
118
+ };
119
+ }
120
+ return {
121
+ width,
122
+ height,
123
+ marginRight: spacing
71
124
  };
72
125
  });
73
126
  return () => {
74
- var c, l;
75
- const o = ((c = e == null ? void 0 : e.itemShowedList) == null ? void 0 : c.list[r.value || 0]) || !1;
76
- return y("div", {
77
- class: C(),
78
- style: a.value
79
- }, [o ? n.clonenNode || ((l = t.default) == null ? void 0 : l.call(t)) : null]);
127
+ var _a, _b;
128
+ const isShow = ((_a = parent == null ? void 0 : parent.itemShowedList) == null ? void 0 : _a.list[index.value || 0]) || false;
129
+ return createVNode("div", {
130
+ "class": bem$1(),
131
+ "style": style.value
132
+ }, [isShow ? props.clonenNode || ((_b = slots.default) == null ? void 0 : _b.call(slots)) : null]);
80
133
  };
81
134
  }
82
- }), [E, V] = s("tabs"), z = E;
83
- function A(n) {
84
- return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !_(n);
135
+ });
136
+ const [name$1, bem] = createNamespace("tabs");
137
+ const TABS_KEY = name$1;
138
+ function _isSlot(s) {
139
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
85
140
  }
86
- const [D] = s("tab"), d = /* @__PURE__ */ p({
87
- name: D,
141
+ const [name] = createNamespace("tab");
142
+ const Tab = /* @__PURE__ */ defineComponent({
143
+ name,
88
144
  props: {
89
145
  title: {
90
146
  type: String,
@@ -96,29 +152,36 @@ const [D] = s("tab"), d = /* @__PURE__ */ p({
96
152
  },
97
153
  disabled: {
98
154
  type: Boolean,
99
- default: !1
155
+ default: false
100
156
  }
101
157
  },
102
- setup(n, {
103
- slots: t
158
+ setup(_, {
159
+ slots
104
160
  }) {
105
161
  const {
106
- parent: i
107
- } = g(z), e = m();
108
- return e.proxy && (i == null || i.children.push(e.proxy)), N(() => {
109
- i && (i.children = i.children.filter((r) => r !== e.proxy));
110
- }), () => {
111
- let r;
112
- return t.default ? y(O, null, A(r = t.default()) ? r : {
113
- default: () => [r]
162
+ parent
163
+ } = useRelation(TABS_KEY);
164
+ const instance = getCurrentInstance();
165
+ if (instance.proxy) {
166
+ parent == null ? void 0 : parent.children.push(instance.proxy);
167
+ }
168
+ onBeforeUnmount(() => {
169
+ if (parent) {
170
+ parent.children = parent.children.filter((item) => item !== instance.proxy);
171
+ }
172
+ });
173
+ return () => {
174
+ let _slot;
175
+ return slots.default ? createVNode(SwipeItem, null, _isSlot(_slot = slots.default()) ? _slot : {
176
+ default: () => [_slot]
114
177
  }) : null;
115
178
  };
116
179
  }
117
180
  });
118
- d.install = (n) => {
119
- const { name: t } = d;
120
- n.component(t, d);
181
+ Tab.install = (Vue) => {
182
+ const { name: name2 } = Tab;
183
+ Vue.component(name2, Tab);
121
184
  };
122
185
  export {
123
- d as default
186
+ Tab as default
124
187
  };
@@ -1 +1,190 @@
1
- (function(c,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(c=typeof globalThis<"u"?globalThis:c||self,o(c.tab={},c.Vue))})(this,function(c,o){"use strict";const p=n=>{const t=o.inject(n,null),i=o.getCurrentInstance();if(t&&i){const{childrens:e,addChild:r,removeChild:m}=t;return r(i),o.onUnmounted(()=>m(i)),{index:o.computed(()=>e.indexOf(i)),parent:t}}return{parent:null,index:o.ref(-1)}},d=(n,t)=>t?typeof t=="string"?` ${n}--${t}`:Array.isArray(t)?t.reduce((i,e)=>i+d(n,e),""):Object.keys(t).reduce((i,e)=>i+(t[e]?d(n,e):""),""):"",h=n=>(t,i)=>{let e=t,r=i;return e&&typeof e!="string"&&(r=e,e=""),e=e?`${n}__${e}`:n,`${e}${d(e,r)}`},y=()=>(n,t)=>t?`${d(`y-${n}`,t)}`:`y-${n}`,g={"pull-refresh":{pulling:"下拉刷新...",loosing:"释放刷新...",loading:"数据加载中...",success:"数据已更新",failed:"数据跟新失败,请稍后再试"},"form-item":{validateMessage:"请输入正确内容"}};o.ref("zh-CN"),o.reactive({"zh-CN":g});const f=n=>{const t=`y-${n}`;return[t,h(t),y()]},[x,w]=f("swipe"),b=x,[$,N]=f("swipe-item"),_=o.defineComponent({name:$,props:{clonenNode:{type:Object,default:null},index:{type:Number,default:-1}},setup(n,{slots:t}){const i=o.getCurrentInstance(),{parent:e}=p(b);!n.clonenNode&&i&&(e==null||e.children.push(i));const r=o.computed(()=>n.clonenNode?n.index:e==null?void 0:e.children.findIndex(l=>l.proxy===(i==null?void 0:i.proxy))),m=o.computed(()=>{const l=`${(e==null?void 0:e.itemDetail.size)||0}px`;let s="auto";const u=`${(e==null?void 0:e.itemDetail.space)||0}px`;return e!=null&&e.props.autoHeight&&(e==null?void 0:e.activeIndex)!==r.value&&(s="0"),e!=null&&e.props.vertical?{height:l,width:s,marginBottom:u}:{width:l,height:s,marginRight:u}});return()=>{var s,u;const l=((s=e==null?void 0:e.itemShowedList)==null?void 0:s.list[r.value||0])||!1;return o.createVNode("div",{class:N(),style:m.value},[l?n.clonenNode||((u=t.default)==null?void 0:u.call(t)):null])}}}),[S,O]=f("tabs"),C=S;function I(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!o.isVNode(n)}const[j]=f("tab"),a=o.defineComponent({name:j,props:{title:{type:String,default:""},name:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},setup(n,{slots:t}){const{parent:i}=p(C),e=o.getCurrentInstance();return e.proxy&&(i==null||i.children.push(e.proxy)),o.onBeforeUnmount(()=>{i&&(i.children=i.children.filter(r=>r!==e.proxy))}),()=>{let r;return t.default?o.createVNode(_,null,I(r=t.default())?r:{default:()=>[r]}):null}}});a.install=n=>{const{name:t}=a;n.component(t,a)},c.default=a,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(global, factory) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tab = {}, global.Vue));
3
+ })(this, function(exports2, vue) {
4
+ "use strict";
5
+ const useRelation = (key) => {
6
+ const parent = vue.inject(key, null);
7
+ const currentInstance = vue.getCurrentInstance();
8
+ if (parent && currentInstance) {
9
+ const { childrens, addChild, removeChild } = parent;
10
+ addChild(currentInstance);
11
+ vue.onUnmounted(() => removeChild(currentInstance));
12
+ const index = vue.computed(() => childrens.indexOf(currentInstance));
13
+ return {
14
+ index,
15
+ parent
16
+ };
17
+ }
18
+ return {
19
+ parent: null,
20
+ index: vue.ref(-1)
21
+ };
22
+ };
23
+ const getMods = (el, mods) => {
24
+ if (!mods) {
25
+ return "";
26
+ }
27
+ if (typeof mods === "string") {
28
+ return ` ${el}--${mods}`;
29
+ }
30
+ if (Array.isArray(mods)) {
31
+ return mods.reduce((acc, cur) => acc + getMods(el, cur), "");
32
+ }
33
+ return Object.keys(mods).reduce(
34
+ (acc, cur) => acc + (mods[cur] ? getMods(el, cur) : ""),
35
+ ""
36
+ );
37
+ };
38
+ const createBEM = (block) => {
39
+ return (el, mods) => {
40
+ let _el = el;
41
+ let _mods = mods;
42
+ if (_el && typeof _el !== "string") {
43
+ _mods = _el;
44
+ _el = "";
45
+ }
46
+ _el = _el ? `${block}__${_el}` : block;
47
+ return `${_el}${getMods(_el, _mods)}`;
48
+ };
49
+ };
50
+ const createGlobalBem = () => {
51
+ return (el, mods) => {
52
+ if (!mods) {
53
+ return `y-${el}`;
54
+ }
55
+ return `${getMods(`y-${el}`, mods)}`;
56
+ };
57
+ };
58
+ const defaultLang = {
59
+ "pull-refresh": {
60
+ pulling: "下拉刷新...",
61
+ loosing: "释放刷新...",
62
+ loading: "数据加载中...",
63
+ success: "数据已更新",
64
+ failed: "数据跟新失败,请稍后再试"
65
+ },
66
+ "form-item": {
67
+ validateMessage: "请输入正确内容"
68
+ }
69
+ };
70
+ vue.ref("zh-CN");
71
+ vue.reactive({
72
+ "zh-CN": defaultLang
73
+ });
74
+ const createNamespace = (name2) => {
75
+ const prefixedName = `y-${name2}`;
76
+ return [prefixedName, createBEM(prefixedName), createGlobalBem()];
77
+ };
78
+ const [name$3, bem$2] = createNamespace("swipe");
79
+ const SWIPE_PROVIDE_KEY = name$3;
80
+ const [name$2, bem$1] = createNamespace("swipe-item");
81
+ const SwipeItem = /* @__PURE__ */ vue.defineComponent({
82
+ name: name$2,
83
+ props: {
84
+ clonenNode: {
85
+ type: Object,
86
+ default: null
87
+ },
88
+ index: {
89
+ type: Number,
90
+ default: -1
91
+ }
92
+ },
93
+ setup(props, {
94
+ slots
95
+ }) {
96
+ const instance = vue.getCurrentInstance();
97
+ const {
98
+ parent
99
+ } = useRelation(SWIPE_PROVIDE_KEY);
100
+ if (!props.clonenNode && instance) {
101
+ parent == null ? void 0 : parent.children.push(instance);
102
+ }
103
+ const index = vue.computed(() => {
104
+ if (props.clonenNode) {
105
+ return props.index;
106
+ }
107
+ return parent == null ? void 0 : parent.children.findIndex((item) => item.proxy === (instance == null ? void 0 : instance.proxy));
108
+ });
109
+ const style = vue.computed(() => {
110
+ const width = `${(parent == null ? void 0 : parent.itemDetail.size) || 0}px`;
111
+ let height = "auto";
112
+ const spacing = `${(parent == null ? void 0 : parent.itemDetail.space) || 0}px`;
113
+ if ((parent == null ? void 0 : parent.props.autoHeight) && (parent == null ? void 0 : parent.activeIndex) !== index.value) {
114
+ height = "0";
115
+ }
116
+ if (parent == null ? void 0 : parent.props.vertical) {
117
+ return {
118
+ height: width,
119
+ width: height,
120
+ marginBottom: spacing
121
+ };
122
+ }
123
+ return {
124
+ width,
125
+ height,
126
+ marginRight: spacing
127
+ };
128
+ });
129
+ return () => {
130
+ var _a, _b;
131
+ const isShow = ((_a = parent == null ? void 0 : parent.itemShowedList) == null ? void 0 : _a.list[index.value || 0]) || false;
132
+ return vue.createVNode("div", {
133
+ "class": bem$1(),
134
+ "style": style.value
135
+ }, [isShow ? props.clonenNode || ((_b = slots.default) == null ? void 0 : _b.call(slots)) : null]);
136
+ };
137
+ }
138
+ });
139
+ const [name$1, bem] = createNamespace("tabs");
140
+ const TABS_KEY = name$1;
141
+ function _isSlot(s) {
142
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
143
+ }
144
+ const [name] = createNamespace("tab");
145
+ const Tab = /* @__PURE__ */ vue.defineComponent({
146
+ name,
147
+ props: {
148
+ title: {
149
+ type: String,
150
+ default: ""
151
+ },
152
+ name: {
153
+ type: [String, Number],
154
+ default: ""
155
+ },
156
+ disabled: {
157
+ type: Boolean,
158
+ default: false
159
+ }
160
+ },
161
+ setup(_, {
162
+ slots
163
+ }) {
164
+ const {
165
+ parent
166
+ } = useRelation(TABS_KEY);
167
+ const instance = vue.getCurrentInstance();
168
+ if (instance.proxy) {
169
+ parent == null ? void 0 : parent.children.push(instance.proxy);
170
+ }
171
+ vue.onBeforeUnmount(() => {
172
+ if (parent) {
173
+ parent.children = parent.children.filter((item) => item !== instance.proxy);
174
+ }
175
+ });
176
+ return () => {
177
+ let _slot;
178
+ return slots.default ? vue.createVNode(SwipeItem, null, _isSlot(_slot = slots.default()) ? _slot : {
179
+ default: () => [_slot]
180
+ }) : null;
181
+ };
182
+ }
183
+ });
184
+ Tab.install = (Vue) => {
185
+ const { name: name2 } = Tab;
186
+ Vue.component(name2, Tab);
187
+ };
188
+ exports2.default = Tab;
189
+ Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
190
+ });