eco-vue-js 0.5.18 → 0.5.20
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
|
|
1
1
|
import { type VNode } from 'vue';
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
3
3
|
names?: string[] | undefined;
|
4
|
+
icons?: SVGComponent[] | Record<number, SVGComponent> | undefined;
|
4
5
|
slots?: VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
5
6
|
[key: string]: any;
|
6
7
|
}>[] | undefined;
|
@@ -20,6 +21,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
20
21
|
"update:has-changes": (value: boolean) => void;
|
21
22
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
22
23
|
names?: string[] | undefined;
|
24
|
+
icons?: SVGComponent[] | Record<number, SVGComponent> | undefined;
|
23
25
|
slots?: VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
24
26
|
[key: string]: any;
|
25
27
|
}>[] | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AA2FA;AAEA,OAAO,EAAkC,KAAK,KAAK,EAAoD,MAAM,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0ZlH,wBAcG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useSlots, computed, ref, reactive, inject, watch, onMounted, onUnmounted, openBlock, createElementBlock, Fragment, renderList, normalizeClass, unref, createElementVNode, createTextVNode, toDisplayString, createVNode, Transition, withCtx,
|
1
|
+
import { defineComponent, useSlots, computed, ref, reactive, inject, watch, onMounted, onUnmounted, openBlock, createElementBlock, Fragment, renderList, normalizeClass, unref, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, createTextVNode, toDisplayString, createVNode, Transition, withCtx, normalizeStyle, TransitionGroup, nextTick } from 'vue';
|
2
2
|
import _sfc_main$1 from './components/TabItem.vue.js';
|
3
3
|
import _sfc_main$2 from '../Form/WForm.vue.js';
|
4
4
|
import { throttle, debounce } from '../../utils/utils.js';
|
@@ -7,14 +7,15 @@ import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
|
|
7
7
|
const _hoisted_1 = { class: "mb-8" };
|
8
8
|
const _hoisted_2 = {
|
9
9
|
key: 0,
|
10
|
-
class: "relative flex mb-4 sm-not:-px--inner-margin"
|
10
|
+
class: "relative flex mb-4 sm-not:-px--inner-margin overflow-x-auto overscroll-x-contain no-scrollbar snap-x snap-always snap-mandatory"
|
11
11
|
};
|
12
12
|
const _hoisted_3 = ["onClick"];
|
13
|
-
const _hoisted_4 = { class: "relative" };
|
13
|
+
const _hoisted_4 = { class: "relative whitespace-nowrap px-4" };
|
14
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
15
15
|
__name: "WTabs",
|
16
16
|
props: {
|
17
17
|
names: {},
|
18
|
+
icons: {},
|
18
19
|
slots: {},
|
19
20
|
lessTransitions: { type: Boolean },
|
20
21
|
initTab: {}
|
@@ -102,12 +103,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
103
|
watch(current, (value) => {
|
103
104
|
emit("update:current", value);
|
104
105
|
updateIndicator();
|
106
|
+
button.value[value]?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
105
107
|
}, { immediate: true });
|
106
108
|
watch(hasChanges, (value) => {
|
107
109
|
emit("update:has-changes", value);
|
108
110
|
}, { immediate: true });
|
109
111
|
onMounted(() => {
|
110
112
|
updateIndicator();
|
113
|
+
button.value[current.value]?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
111
114
|
tabItemListenerInjected?.(updateIndicator);
|
112
115
|
});
|
113
116
|
onUnmounted(() => {
|
@@ -130,7 +133,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
130
133
|
ref_key: "button",
|
131
134
|
ref: button,
|
132
135
|
key: index,
|
133
|
-
class: normalizeClass(["flex-1 font-semibold flex items-center justify-center h-10 cursor-pointer relative w-ripple w-ripple-hover select-none transition-colors duration-500 outline-none", {
|
136
|
+
class: normalizeClass(["flex-1 font-semibold flex items-center justify-center h-10 cursor-pointer snap-center relative w-ripple w-ripple-hover select-none transition-colors duration-500 outline-none", {
|
134
137
|
"text-description": current.value !== index && isValidMap[index] !== false,
|
135
138
|
"text-primary-default dark:text-primary-dark": current.value === index && isValidMap[index] !== false,
|
136
139
|
"text-negative dark:text-negative-dark": isValidMap[index] === false
|
@@ -138,7 +141,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
138
141
|
onClick: ($event) => unref(switchTab)(index)
|
139
142
|
}, [
|
140
143
|
createElementVNode("div", _hoisted_4, [
|
141
|
-
|
144
|
+
_ctx.icons?.[index] ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icons?.[index]), {
|
145
|
+
key: 0,
|
146
|
+
class: "inline -mt-1"
|
147
|
+
})) : createCommentVNode("", true),
|
148
|
+
createTextVNode(" " + toDisplayString(_ctx.names[index]) + " ", 1),
|
142
149
|
createVNode(Transition, {
|
143
150
|
"enter-active-class": "transition-opacity",
|
144
151
|
"leave-active-class": "transition-opacity",
|