y-design-ssr 0.2.3 → 0.2.4

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 (119) hide show
  1. package/libs/button/index.css +1 -579
  2. package/libs/button/index.mjs +66 -111
  3. package/libs/button/index.umd.js +2 -203
  4. package/libs/button/package.json +1 -8
  5. package/libs/cell/index.css +1 -1077
  6. package/libs/cell/index.mjs +104 -167
  7. package/libs/cell/index.umd.js +2 -300
  8. package/libs/cell/package.json +1 -8
  9. package/libs/checkbox/index.css +1 -1053
  10. package/libs/checkbox/index.mjs +127 -242
  11. package/libs/checkbox/index.umd.js +2 -369
  12. package/libs/checkbox/package.json +1 -8
  13. package/libs/checkboxGroup/index.css +1 -422
  14. package/libs/checkboxGroup/index.mjs +87 -173
  15. package/libs/checkboxGroup/index.umd.js +2 -265
  16. package/libs/checkboxGroup/package.json +1 -8
  17. package/libs/col/index.css +1 -615
  18. package/libs/col/index.mjs +81 -246
  19. package/libs/col/index.umd.js +2 -305
  20. package/libs/col/package.json +1 -8
  21. package/libs/countdown/index.css +1 -417
  22. package/libs/countdown/index.mjs +71 -179
  23. package/libs/countdown/index.umd.js +2 -231
  24. package/libs/countdown/package.json +1 -8
  25. package/libs/dialog/index.css +1 -1405
  26. package/libs/dialog/index.mjs +476 -646
  27. package/libs/dialog/index.umd.js +2 -1128
  28. package/libs/dialog/package.json +1 -8
  29. package/libs/empty/index.css +1 -457
  30. package/libs/empty/index.mjs +44 -91
  31. package/libs/empty/index.umd.js +2 -139
  32. package/libs/empty/package.json +1 -8
  33. package/libs/form/index.css +1 -477
  34. package/libs/form/index.mjs +126 -226
  35. package/libs/form/index.umd.js +2 -319
  36. package/libs/form/package.json +1 -8
  37. package/libs/formItem/index.css +1 -477
  38. package/libs/formItem/index.mjs +126 -276
  39. package/libs/formItem/index.umd.js +2 -372
  40. package/libs/formItem/package.json +1 -8
  41. package/libs/icon/index.css +1 -982
  42. package/libs/icon/index.mjs +58 -107
  43. package/libs/icon/index.umd.js +2 -186
  44. package/libs/icon/package.json +1 -8
  45. package/libs/index.css +1 -2902
  46. package/libs/index.mjs +2348 -3789
  47. package/libs/index.umd.js +2 -5509
  48. package/libs/input/index.css +1 -483
  49. package/libs/input/index.mjs +92 -183
  50. package/libs/input/index.umd.js +2 -274
  51. package/libs/input/package.json +1 -8
  52. package/libs/layout/index.css +1 -684
  53. package/libs/layout/index.mjs +130 -230
  54. package/libs/layout/index.umd.js +2 -318
  55. package/libs/layout/package.json +1 -8
  56. package/libs/list/index.css +1 -440
  57. package/libs/list/index.mjs +207 -388
  58. package/libs/list/index.umd.js +2 -571
  59. package/libs/list/package.json +1 -8
  60. package/libs/loading/index.css +1 -548
  61. package/libs/loading/index.mjs +118 -196
  62. package/libs/loading/index.umd.js +2 -321
  63. package/libs/loading/package.json +1 -8
  64. package/libs/mask/index.css +1 -426
  65. package/libs/mask/index.mjs +70 -131
  66. package/libs/mask/index.umd.js +2 -201
  67. package/libs/mask/package.json +1 -8
  68. package/libs/popup/index.css +1 -465
  69. package/libs/popup/index.mjs +134 -210
  70. package/libs/popup/index.umd.js +2 -358
  71. package/libs/popup/package.json +1 -8
  72. package/libs/progress/index.css +1 -488
  73. package/libs/progress/index.mjs +128 -200
  74. package/libs/progress/index.umd.js +2 -322
  75. package/libs/progress/package.json +1 -8
  76. package/libs/pullrefresh/index.css +1 -441
  77. package/libs/pullrefresh/index.mjs +111 -241
  78. package/libs/pullrefresh/index.umd.js +2 -302
  79. package/libs/pullrefresh/package.json +1 -8
  80. package/libs/row/index.css +1 -485
  81. package/libs/row/index.mjs +89 -181
  82. package/libs/row/index.umd.js +2 -237
  83. package/libs/row/package.json +1 -8
  84. package/libs/slider/index.css +1 -558
  85. package/libs/slider/index.mjs +160 -356
  86. package/libs/slider/index.umd.js +2 -453
  87. package/libs/slider/package.json +1 -8
  88. package/libs/stepper/index.css +1 -489
  89. package/libs/stepper/index.mjs +101 -181
  90. package/libs/stepper/index.umd.js +2 -269
  91. package/libs/stepper/package.json +1 -8
  92. package/libs/swipe/index.css +1 -506
  93. package/libs/swipe/index.mjs +259 -542
  94. package/libs/swipe/index.umd.js +2 -703
  95. package/libs/swipe/package.json +1 -8
  96. package/libs/swipeItem/index.css +1 -424
  97. package/libs/swipeItem/index.mjs +52 -111
  98. package/libs/swipeItem/index.umd.js +2 -154
  99. package/libs/swipeItem/package.json +1 -8
  100. package/libs/switch/index.css +1 -472
  101. package/libs/switch/index.mjs +62 -121
  102. package/libs/switch/index.umd.js +2 -200
  103. package/libs/switch/package.json +1 -8
  104. package/libs/tab/index.mjs +68 -131
  105. package/libs/tab/index.umd.js +1 -190
  106. package/libs/tab/package.json +1 -8
  107. package/libs/tabs/index.css +1 -514
  108. package/libs/tabs/index.mjs +410 -751
  109. package/libs/tabs/index.umd.js +2 -1020
  110. package/libs/tabs/package.json +1 -8
  111. package/libs/toast/index.css +1 -1050
  112. package/libs/toast/index.mjs +114 -183
  113. package/libs/toast/index.umd.js +2 -306
  114. package/libs/toast/package.json +1 -8
  115. package/libs/tooltip/index.css +1 -514
  116. package/libs/tooltip/index.mjs +155 -293
  117. package/libs/tooltip/index.umd.js +2 -416
  118. package/libs/tooltip/package.json +1 -8
  119. package/package.json +5 -12
@@ -1,58 +1,24 @@
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
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
13
9
  };
14
10
  }
15
11
  return {
16
12
  parent: null,
17
- index: ref(-1)
13
+ index: h(-1)
18
14
  };
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 = {
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 = {
56
22
  "pull-refresh": {
57
23
  pulling: "下拉刷新...",
58
24
  loosing: "释放刷新...",
@@ -64,19 +30,15 @@ const defaultLang = {
64
30
  validateMessage: "请输入正确内容"
65
31
  }
66
32
  };
67
- ref("zh-CN");
68
- reactive({
69
- "zh-CN": defaultLang
33
+ h("zh-CN");
34
+ b({
35
+ "zh-CN": w
70
36
  });
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,
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,
80
42
  props: {
81
43
  clonenNode: {
82
44
  type: Object,
@@ -87,60 +49,42 @@ const SwipeItem = /* @__PURE__ */ defineComponent({
87
49
  default: -1
88
50
  }
89
51
  },
90
- setup(props, {
91
- slots
52
+ setup(n, {
53
+ slots: t
92
54
  }) {
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
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
124
71
  };
125
72
  });
126
73
  return () => {
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]);
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]);
133
80
  };
134
81
  }
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);
82
+ }), [E, V] = s("tabs"), z = E;
83
+ function A(n) {
84
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !_(n);
140
85
  }
141
- const [name] = createNamespace("tab");
142
- const Tab = /* @__PURE__ */ defineComponent({
143
- name,
86
+ const [D] = s("tab"), d = /* @__PURE__ */ p({
87
+ name: D,
144
88
  props: {
145
89
  title: {
146
90
  type: String,
@@ -152,36 +96,29 @@ const Tab = /* @__PURE__ */ defineComponent({
152
96
  },
153
97
  disabled: {
154
98
  type: Boolean,
155
- default: false
99
+ default: !1
156
100
  }
157
101
  },
158
- setup(_, {
159
- slots
102
+ setup(n, {
103
+ slots: t
160
104
  }) {
161
105
  const {
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]
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]
177
114
  }) : null;
178
115
  };
179
116
  }
180
117
  });
181
- Tab.install = (Vue) => {
182
- const { name: name2 } = Tab;
183
- Vue.component(name2, Tab);
118
+ d.install = (n) => {
119
+ const { name: t } = d;
120
+ n.component(t, d);
184
121
  };
185
122
  export {
186
- Tab as default
123
+ d as default
187
124
  };
@@ -1,190 +1 @@
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
- });
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,12 +1,5 @@
1
1
  {
2
2
  "name": "y-design-ssr/tab",
3
3
  "main": "index.umd.js",
4
- "module": "index.mjs",
5
- "exports": {
6
- ".": {
7
- "import": "./index.mjs",
8
- "require": "./index.umd.js"
9
- },
10
- "./index.css": "./index.css"
11
- }
4
+ "module": "index.mjs"
12
5
  }