@opentinyvue/vue-collapse-item 2.21.0 → 3.21.0
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.
- package/lib/index.js +1 -1
- package/lib/mobile-first.js +125 -127
- package/lib/pc.js +126 -126
- package/package.json +4 -4
- package/src/index.d.ts +54 -1
- package/src/mobile-first.vue.d.ts +37 -1
- package/src/pc.vue.d.ts +41 -1
package/lib/index.js
CHANGED
package/lib/mobile-first.js
CHANGED
|
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/collapse-item/vue';
|
|
|
2
2
|
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import CollapseTransition from '@opentinyvue/vue-collapse-transition';
|
|
4
4
|
import { IconArrowBottom } from '@opentinyvue/vue-icon';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, withKeys, withModifiers, renderSlot, createTextVNode, toDisplayString, createVNode, withCtx, withDirectives, vShow } from 'vue';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var originalRender = options.render;
|
|
21
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
-
hook.call(context);
|
|
23
|
-
return originalRender(h, context);
|
|
24
|
-
};
|
|
25
|
-
} else {
|
|
26
|
-
var existing = options.beforeCreate;
|
|
27
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
-
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
29
24
|
}
|
|
30
|
-
return {
|
|
31
|
-
exports: scriptExports,
|
|
32
|
-
options
|
|
33
|
-
};
|
|
34
25
|
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var _sfc_main = defineComponent({
|
|
37
41
|
props: [].concat(props, ["title", "titleRight", "name", "disabled"]),
|
|
38
42
|
components: {
|
|
39
43
|
CollapseTransition,
|
|
@@ -48,109 +52,103 @@ var __vue2_script = defineComponent({
|
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
});
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
55
|
+
var _hoisted_1 = {
|
|
56
|
+
"data-tag": "tiny-collapse-item",
|
|
57
|
+
class: "border-b-0.5 sm:border-b border-solid border-color-border-separator last:border-0"
|
|
58
|
+
};
|
|
59
|
+
var _hoisted_2 = ["aria-expanded", "aria-controls", "aria-describedby"];
|
|
60
|
+
var _hoisted_3 = ["id", "tabindex"];
|
|
61
|
+
var _hoisted_4 = {
|
|
62
|
+
"data-tag": "tiny-collapse-item-titleright",
|
|
63
|
+
class: "text-xs font-normal"
|
|
64
|
+
};
|
|
65
|
+
var _hoisted_5 = ["aria-hidden", "aria-labelledby", "id"];
|
|
66
|
+
var _hoisted_6 = {
|
|
67
|
+
class: "pb-6 pt-0 px-4 sm:pt-0 sm:pr-0 sm:pl-4 sm:pb-4 text-xs text-color-text-primary leading-relaxed"
|
|
68
|
+
};
|
|
69
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
70
|
+
var _component_icon_arrow_bottom = resolveComponent("icon-arrow-bottom");
|
|
71
|
+
var _component_collapse_transition = resolveComponent("collapse-transition");
|
|
72
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
|
|
73
|
+
role: "tab",
|
|
74
|
+
"data-tag": "tiny-collapse-item-tab",
|
|
75
|
+
"aria-expanded": _ctx.state.isActive,
|
|
76
|
+
"aria-controls": "tiny-collapse-content-" + _ctx.state.id,
|
|
77
|
+
"aria-describedby": "tiny-collapse-content-" + _ctx.state.id
|
|
78
|
+
}, [createElementVNode("div", {
|
|
79
|
+
"data-tag": "tiny-collapse-item-body",
|
|
80
|
+
class: normalizeClass(["flex relative items-center h-12 sm:h-10 py-0 sm:pr-0 pl-4 pr-10 text-sm font-bold justify-between whitespace-nowrap", _ctx.disabled ? "text-color-text-disabled" : "text-color-text-primary sm:[&:has(.peer:hover)_[role=title]]:text-color-brand"]),
|
|
81
|
+
id: "tiny-collapse-head-" + _ctx.state.id,
|
|
82
|
+
tabindex: _ctx.disabled ? void 0 : 0,
|
|
83
|
+
onKeyup: _cache[2] || (_cache[2] = withKeys(withModifiers(function() {
|
|
84
|
+
return _ctx.handleEnterClick && _ctx.handleEnterClick.apply(_ctx, arguments);
|
|
85
|
+
}, ["stop"]), ["space", "enter"])),
|
|
86
|
+
onFocus: _cache[3] || (_cache[3] = function() {
|
|
87
|
+
return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
|
|
88
|
+
}),
|
|
89
|
+
onBlur: _cache[4] || (_cache[4] = function($event) {
|
|
90
|
+
return _ctx.state.focusing = false;
|
|
91
|
+
})
|
|
92
|
+
}, [createElementVNode(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
91
95
|
"data-tag": "tiny-collapse-item-title",
|
|
92
|
-
"
|
|
96
|
+
class: normalizeClass(["whitespace-nowrap overflow-hidden overflow-ellipsis inline-block peer", [_ctx.disabled ? "cursor-not-allowed" : "cursor-pointer sm:hover:text-color-brand"]]),
|
|
97
|
+
role: "title",
|
|
98
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
99
|
+
return _ctx.handleHeaderClick && _ctx.handleHeaderClick.apply(_ctx, arguments);
|
|
100
|
+
})
|
|
93
101
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
[renderSlot(_ctx.$slots, "title", {}, function() {
|
|
103
|
+
return [createTextVNode(
|
|
104
|
+
toDisplayString(_ctx.title),
|
|
105
|
+
1
|
|
106
|
+
/* TEXT */
|
|
107
|
+
)];
|
|
108
|
+
})],
|
|
109
|
+
2
|
|
110
|
+
/* CLASS */
|
|
111
|
+
), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "title-right", {}, function() {
|
|
112
|
+
return [createTextVNode(
|
|
113
|
+
toDisplayString(_ctx.titleRight),
|
|
114
|
+
1
|
|
115
|
+
/* TEXT */
|
|
116
|
+
)];
|
|
117
|
+
})]), createElementVNode(
|
|
118
|
+
"div",
|
|
119
|
+
{
|
|
120
|
+
"data-tag": "tiny-collapse-item-icon",
|
|
121
|
+
class: normalizeClass(["absolute sm:left-0 right-3.5 text-xs mr-1 w-3 peer", [_ctx.disabled ? "fill-color-text-disabled cursor-not-allowed" : "fill-color-icon-secondary cursor-pointer sm:peer-hover:fill-color-brand sm:hover:fill-color-brand"]]),
|
|
122
|
+
onClick: _cache[1] || (_cache[1] = function() {
|
|
123
|
+
return _ctx.handleHeaderClick && _ctx.handleHeaderClick.apply(_ctx, arguments);
|
|
124
|
+
})
|
|
111
125
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"aria-labelledby": "tiny-collapse-head-" + _vm.state.id,
|
|
138
|
-
"id": "tiny-collapse-content-" + _vm.state.id
|
|
139
|
-
}
|
|
140
|
-
}, [_c("div", {
|
|
141
|
-
staticClass: "pb-6 pt-0 px-4 sm:pt-0 sm:pr-0 sm:pl-4 sm:pb-4 text-xs text-color-text-primary leading-relaxed"
|
|
142
|
-
}, [_vm._t("default")], 2)])])], 1);
|
|
143
|
-
};
|
|
144
|
-
var staticRenderFns = [];
|
|
145
|
-
var __cssModules = {};
|
|
146
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
147
|
-
function __vue2_injectStyles(context) {
|
|
148
|
-
for (var o in __cssModules) {
|
|
149
|
-
this[o] = __cssModules[o];
|
|
150
|
-
}
|
|
126
|
+
[renderSlot(_ctx.$slots, "icon", {
|
|
127
|
+
active: _ctx.state.isActive,
|
|
128
|
+
disabled: _ctx.disabled
|
|
129
|
+
}, function() {
|
|
130
|
+
return [createVNode(_component_icon_arrow_bottom, {
|
|
131
|
+
"custom-class": "w-2.5 h-2.5 sm:w-3 sm:h-3 transition-transform duration-300",
|
|
132
|
+
class: normalizeClass([_ctx.state.isActive ? "sm:rotate-0 rotate-180" : "sm:-rotate-90 rotate-0"])
|
|
133
|
+
}, null, 8, ["class"])];
|
|
134
|
+
})],
|
|
135
|
+
2
|
|
136
|
+
/* CLASS */
|
|
137
|
+
)], 42, _hoisted_3)], 8, _hoisted_2), createVNode(_component_collapse_transition, null, {
|
|
138
|
+
default: withCtx(function() {
|
|
139
|
+
return [withDirectives(createElementVNode("div", {
|
|
140
|
+
"data-tag": "tiny-collapse-item-active",
|
|
141
|
+
class: "will-change-[height] bg-color-bg-1 overflow-hidden box-border",
|
|
142
|
+
role: "tabpanel",
|
|
143
|
+
"aria-hidden": !_ctx.state.isActive,
|
|
144
|
+
"aria-labelledby": "tiny-collapse-head-" + _ctx.state.id,
|
|
145
|
+
id: "tiny-collapse-content-" + _ctx.state.id
|
|
146
|
+
}, [createElementVNode("div", _hoisted_6, [renderSlot(_ctx.$slots, "default")])], 8, _hoisted_5), [[vShow, _ctx.state.isActive]])];
|
|
147
|
+
}),
|
|
148
|
+
_: 3
|
|
149
|
+
/* FORWARDED */
|
|
150
|
+
})]);
|
|
151
151
|
}
|
|
152
|
-
var mobileFirst = /* @__PURE__ */
|
|
153
|
-
return __component__.exports;
|
|
154
|
-
}();
|
|
152
|
+
var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
155
153
|
|
|
156
154
|
export { mobileFirst as default };
|
package/lib/pc.js
CHANGED
|
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/collapse-item/vue';
|
|
|
2
2
|
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import CollapseTransition from '@opentinyvue/vue-collapse-transition';
|
|
4
4
|
import { iconChevronRight } from '@opentinyvue/vue-icon';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withKeys, withModifiers, renderSlot, createBlock, resolveDynamicComponent, createTextVNode, toDisplayString, createVNode, withCtx, withDirectives, vShow } from 'vue';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var originalRender = options.render;
|
|
21
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
-
hook.call(context);
|
|
23
|
-
return originalRender(h, context);
|
|
24
|
-
};
|
|
25
|
-
} else {
|
|
26
|
-
var existing = options.beforeCreate;
|
|
27
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
-
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
29
24
|
}
|
|
30
|
-
return {
|
|
31
|
-
exports: scriptExports,
|
|
32
|
-
options
|
|
33
|
-
};
|
|
34
25
|
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
37
41
|
props: [].concat(props, ["title", "titleRight", "name", "disabled", "expandIcon"]),
|
|
38
42
|
components: {
|
|
39
43
|
CollapseTransition,
|
|
@@ -48,107 +52,103 @@ var __vue2_script = defineComponent({
|
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
});
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
staticClass: "tiny-collapse-item__header",
|
|
70
|
-
class: {
|
|
71
|
-
focusing: _vm.state.focusing,
|
|
72
|
-
"is-active": _vm.state.isActive
|
|
73
|
-
},
|
|
74
|
-
attrs: {
|
|
75
|
-
"role": "button",
|
|
76
|
-
"id": "tiny-collapse-head-" + _vm.state.id,
|
|
77
|
-
"tabindex": _vm.disabled ? void 0 : 0
|
|
55
|
+
var _hoisted_1 = ["aria-expanded", "aria-controls", "aria-describedby"];
|
|
56
|
+
var _hoisted_2 = ["id", "tabindex"];
|
|
57
|
+
var _hoisted_3 = {
|
|
58
|
+
class: "tiny-collapse-item__title__right"
|
|
59
|
+
};
|
|
60
|
+
var _hoisted_4 = ["aria-hidden", "aria-labelledby", "id"];
|
|
61
|
+
var _hoisted_5 = {
|
|
62
|
+
class: "tiny-collapse-item__content"
|
|
63
|
+
};
|
|
64
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
65
|
+
var _component_collapse_transition = resolveComponent("collapse-transition");
|
|
66
|
+
return openBlock(), createElementBlock(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
class: normalizeClass(["tiny-collapse-item", {
|
|
70
|
+
"is-active": _ctx.state.isActive,
|
|
71
|
+
"is-disabled": _ctx.disabled
|
|
72
|
+
}])
|
|
78
73
|
},
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
[createElementVNode("div", {
|
|
75
|
+
role: "tab",
|
|
76
|
+
"aria-expanded": _ctx.state.isActive,
|
|
77
|
+
"aria-controls": "tiny-collapse-content-" + _ctx.state.id,
|
|
78
|
+
"aria-describedby": "tiny-collapse-content-" + _ctx.state.id
|
|
79
|
+
}, [createElementVNode("div", {
|
|
80
|
+
class: normalizeClass(["tiny-collapse-item__header", {
|
|
81
|
+
focusing: _ctx.state.focusing,
|
|
82
|
+
"is-active": _ctx.state.isActive
|
|
83
|
+
}]),
|
|
84
|
+
role: "button",
|
|
85
|
+
id: "tiny-collapse-head-" + _ctx.state.id,
|
|
86
|
+
tabindex: _ctx.disabled ? void 0 : 0,
|
|
87
|
+
onKeyup: _cache[2] || (_cache[2] = withKeys(withModifiers(function() {
|
|
88
|
+
return _ctx.handleEnterClick && _ctx.handleEnterClick.apply(_ctx, arguments);
|
|
89
|
+
}, ["stop"]), ["space", "enter"])),
|
|
90
|
+
onFocus: _cache[3] || (_cache[3] = function() {
|
|
91
|
+
return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
|
|
92
|
+
}),
|
|
93
|
+
onBlur: _cache[4] || (_cache[4] = function($event) {
|
|
94
|
+
return _ctx.state.focusing = false;
|
|
95
|
+
}),
|
|
96
|
+
onClick: _cache[5] || (_cache[5] = function() {
|
|
97
|
+
return _ctx.handleHeaderContainerClick && _ctx.handleHeaderContainerClick.apply(_ctx, arguments);
|
|
98
|
+
})
|
|
99
|
+
}, [createElementVNode(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
class: normalizeClass(["tiny-collapse-item__arrow", {
|
|
103
|
+
"is-active": _ctx.state.isActive
|
|
104
|
+
}]),
|
|
105
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(function() {
|
|
106
|
+
return _ctx.handleHeaderClick && _ctx.handleHeaderClick.apply(_ctx, arguments);
|
|
107
|
+
}, ["stop"]))
|
|
88
108
|
},
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})]
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
staticClass: "tiny-collapse-item__wrap",
|
|
132
|
-
attrs: {
|
|
133
|
-
"role": "tabpanel",
|
|
134
|
-
"aria-hidden": !_vm.state.isActive,
|
|
135
|
-
"aria-labelledby": "tiny-collapse-head-" + _vm.state.id,
|
|
136
|
-
"id": "tiny-collapse-content-" + _vm.state.id
|
|
137
|
-
}
|
|
138
|
-
}, [_c("div", {
|
|
139
|
-
staticClass: "tiny-collapse-item__content"
|
|
140
|
-
}, [_vm._t("default")], 2)])])], 1)]);
|
|
141
|
-
};
|
|
142
|
-
var staticRenderFns = [];
|
|
143
|
-
var __cssModules = {};
|
|
144
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
145
|
-
function __vue2_injectStyles(context) {
|
|
146
|
-
for (var o in __cssModules) {
|
|
147
|
-
this[o] = __cssModules[o];
|
|
148
|
-
}
|
|
109
|
+
[renderSlot(_ctx.$slots, "icon", {}, function() {
|
|
110
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.arrowIcon), {
|
|
111
|
+
class: normalizeClass(["tiny-collapse-item__arrow-icon tiny-svg-size", {
|
|
112
|
+
"is-active": _ctx.state.isActive
|
|
113
|
+
}])
|
|
114
|
+
}, null, 8, ["class"]))];
|
|
115
|
+
})],
|
|
116
|
+
2
|
|
117
|
+
/* CLASS */
|
|
118
|
+
), createElementVNode("div", {
|
|
119
|
+
class: "tiny-collapse-item__word-overflow",
|
|
120
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(function() {
|
|
121
|
+
return _ctx.handleHeaderClick && _ctx.handleHeaderClick.apply(_ctx, arguments);
|
|
122
|
+
}, ["stop"]))
|
|
123
|
+
}, [renderSlot(_ctx.$slots, "title", {}, function() {
|
|
124
|
+
return [createTextVNode(
|
|
125
|
+
toDisplayString(_ctx.title),
|
|
126
|
+
1
|
|
127
|
+
/* TEXT */
|
|
128
|
+
)];
|
|
129
|
+
})]), createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "title-right", {}, function() {
|
|
130
|
+
return [createTextVNode(
|
|
131
|
+
toDisplayString(_ctx.titleRight),
|
|
132
|
+
1
|
|
133
|
+
/* TEXT */
|
|
134
|
+
)];
|
|
135
|
+
})])], 42, _hoisted_2), createVNode(_component_collapse_transition, null, {
|
|
136
|
+
default: withCtx(function() {
|
|
137
|
+
return [withDirectives(createElementVNode("div", {
|
|
138
|
+
class: "tiny-collapse-item__wrap",
|
|
139
|
+
role: "tabpanel",
|
|
140
|
+
"aria-hidden": !_ctx.state.isActive,
|
|
141
|
+
"aria-labelledby": "tiny-collapse-head-" + _ctx.state.id,
|
|
142
|
+
id: "tiny-collapse-content-" + _ctx.state.id
|
|
143
|
+
}, [createElementVNode("div", _hoisted_5, [renderSlot(_ctx.$slots, "default")])], 8, _hoisted_4), [[vShow, _ctx.state.isActive]])];
|
|
144
|
+
}),
|
|
145
|
+
_: 3
|
|
146
|
+
/* FORWARDED */
|
|
147
|
+
})], 8, _hoisted_1)],
|
|
148
|
+
2
|
|
149
|
+
/* CLASS */
|
|
150
|
+
);
|
|
149
151
|
}
|
|
150
|
-
var pc = /* @__PURE__ */
|
|
151
|
-
return __component__.exports;
|
|
152
|
-
}();
|
|
152
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
153
153
|
|
|
154
154
|
export { pc as default };
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-collapse-item",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@opentinyvue/vue-common": "~
|
|
10
|
+
"@opentinyvue/vue-common": "~3.21.0",
|
|
11
11
|
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
12
|
-
"@opentinyvue/vue-icon": "~
|
|
12
|
+
"@opentinyvue/vue-icon": "~3.21.0",
|
|
13
13
|
"@opentinyvue/vue-theme": "~3.21.0",
|
|
14
|
-
"@opentinyvue/vue-collapse-transition": "~
|
|
14
|
+
"@opentinyvue/vue-collapse-transition": "~3.21.0"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"types": "index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -25,5 +25,58 @@ export declare const collapseItemProps: {
|
|
|
25
25
|
tiny_theme: StringConstructor;
|
|
26
26
|
tiny_chart_theme: ObjectConstructor;
|
|
27
27
|
};
|
|
28
|
-
declare const _default:
|
|
28
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
29
|
+
_constants: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
default: () => {
|
|
32
|
+
INTERVAL: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
title: StringConstructor;
|
|
36
|
+
titleRight: StringConstructor;
|
|
37
|
+
name: {
|
|
38
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
39
|
+
default(): any;
|
|
40
|
+
};
|
|
41
|
+
expandIcon: {
|
|
42
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
43
|
+
};
|
|
44
|
+
disabled: BooleanConstructor;
|
|
45
|
+
tiny_mode: StringConstructor;
|
|
46
|
+
tiny_mode_root: BooleanConstructor;
|
|
47
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
48
|
+
tiny_renderless: FunctionConstructor;
|
|
49
|
+
tiny_theme: StringConstructor;
|
|
50
|
+
tiny_chart_theme: ObjectConstructor;
|
|
51
|
+
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
54
|
+
_constants: {
|
|
55
|
+
type: ObjectConstructor;
|
|
56
|
+
default: () => {
|
|
57
|
+
INTERVAL: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
title: StringConstructor;
|
|
61
|
+
titleRight: StringConstructor;
|
|
62
|
+
name: {
|
|
63
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
64
|
+
default(): any;
|
|
65
|
+
};
|
|
66
|
+
expandIcon: {
|
|
67
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
68
|
+
};
|
|
69
|
+
disabled: BooleanConstructor;
|
|
70
|
+
tiny_mode: StringConstructor;
|
|
71
|
+
tiny_mode_root: BooleanConstructor;
|
|
72
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
73
|
+
tiny_renderless: FunctionConstructor;
|
|
74
|
+
tiny_theme: StringConstructor;
|
|
75
|
+
tiny_chart_theme: ObjectConstructor;
|
|
76
|
+
}>>, {
|
|
77
|
+
name: string | number;
|
|
78
|
+
disabled: boolean;
|
|
79
|
+
tiny_mode_root: boolean;
|
|
80
|
+
_constants: Record<string, any>;
|
|
81
|
+
}, {}>;
|
|
29
82
|
export default _default;
|
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
name?: any;
|
|
3
|
+
disabled?: any;
|
|
4
|
+
title?: any;
|
|
5
|
+
tiny_mode?: any;
|
|
6
|
+
tiny_mode_root?: any;
|
|
7
|
+
tiny_template?: any;
|
|
8
|
+
tiny_renderless?: any;
|
|
9
|
+
_constants?: any;
|
|
10
|
+
tiny_theme?: any;
|
|
11
|
+
tiny_chart_theme?: any;
|
|
12
|
+
titleRight?: any;
|
|
13
|
+
}>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
14
|
+
name?: any;
|
|
15
|
+
disabled?: any;
|
|
16
|
+
title?: any;
|
|
17
|
+
tiny_mode?: any;
|
|
18
|
+
tiny_mode_root?: any;
|
|
19
|
+
tiny_template?: any;
|
|
20
|
+
tiny_renderless?: any;
|
|
21
|
+
_constants?: any;
|
|
22
|
+
tiny_theme?: any;
|
|
23
|
+
tiny_chart_theme?: any;
|
|
24
|
+
titleRight?: any;
|
|
25
|
+
}>>>, {
|
|
26
|
+
readonly name?: any;
|
|
27
|
+
readonly disabled?: any;
|
|
28
|
+
readonly title?: any;
|
|
29
|
+
readonly tiny_mode?: any;
|
|
30
|
+
readonly tiny_mode_root?: any;
|
|
31
|
+
readonly tiny_template?: any;
|
|
32
|
+
readonly tiny_renderless?: any;
|
|
33
|
+
readonly _constants?: any;
|
|
34
|
+
readonly tiny_theme?: any;
|
|
35
|
+
readonly tiny_chart_theme?: any;
|
|
36
|
+
readonly titleRight?: any;
|
|
37
|
+
}, {}>;
|
|
2
38
|
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ICollapseItemApi } from '@opentinyvue/vue-renderless/types/collapse-item.type';
|
|
2
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
3
|
+
name?: any;
|
|
4
|
+
disabled?: any;
|
|
5
|
+
title?: any;
|
|
6
|
+
tiny_mode?: any;
|
|
7
|
+
tiny_mode_root?: any;
|
|
8
|
+
tiny_template?: any;
|
|
9
|
+
tiny_renderless?: any;
|
|
10
|
+
_constants?: any;
|
|
11
|
+
tiny_theme?: any;
|
|
12
|
+
tiny_chart_theme?: any;
|
|
13
|
+
expandIcon?: any;
|
|
14
|
+
titleRight?: any;
|
|
15
|
+
}>, ICollapseItemApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
16
|
+
name?: any;
|
|
17
|
+
disabled?: any;
|
|
18
|
+
title?: any;
|
|
19
|
+
tiny_mode?: any;
|
|
20
|
+
tiny_mode_root?: any;
|
|
21
|
+
tiny_template?: any;
|
|
22
|
+
tiny_renderless?: any;
|
|
23
|
+
_constants?: any;
|
|
24
|
+
tiny_theme?: any;
|
|
25
|
+
tiny_chart_theme?: any;
|
|
26
|
+
expandIcon?: any;
|
|
27
|
+
titleRight?: any;
|
|
28
|
+
}>>>, {
|
|
29
|
+
readonly name?: any;
|
|
30
|
+
readonly disabled?: any;
|
|
31
|
+
readonly title?: any;
|
|
32
|
+
readonly tiny_mode?: any;
|
|
33
|
+
readonly tiny_mode_root?: any;
|
|
34
|
+
readonly tiny_template?: any;
|
|
35
|
+
readonly tiny_renderless?: any;
|
|
36
|
+
readonly _constants?: any;
|
|
37
|
+
readonly tiny_theme?: any;
|
|
38
|
+
readonly tiny_chart_theme?: any;
|
|
39
|
+
readonly expandIcon?: any;
|
|
40
|
+
readonly titleRight?: any;
|
|
41
|
+
}, {}>;
|
|
2
42
|
export default _default;
|