eco-vue-js 0.5.18 → 0.5.19

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":"AAkFA;AAEA,OAAO,EAAkC,KAAK,KAAK,EAAoD,MAAM,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwYlH,wBAaG;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
+ {"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwZlH,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, createCommentVNode, normalizeStyle, TransitionGroup, createBlock, resolveDynamicComponent, nextTick } from 'vue';
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,6 +103,7 @@ 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);
@@ -130,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
132
  ref_key: "button",
131
133
  ref: button,
132
134
  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", {
135
+ 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
136
  "text-description": current.value !== index && isValidMap[index] !== false,
135
137
  "text-primary-default dark:text-primary-dark": current.value === index && isValidMap[index] !== false,
136
138
  "text-negative dark:text-negative-dark": isValidMap[index] === false
@@ -138,7 +140,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
138
140
  onClick: ($event) => unref(switchTab)(index)
139
141
  }, [
140
142
  createElementVNode("div", _hoisted_4, [
141
- createTextVNode(toDisplayString(_ctx.names[index]) + " ", 1),
143
+ _ctx.icons?.[index] ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icons?.[index]), {
144
+ key: 0,
145
+ class: "inline -mt-1"
146
+ })) : createCommentVNode("", true),
147
+ createTextVNode(" " + toDisplayString(_ctx.names[index]) + " ", 1),
142
148
  createVNode(Transition, {
143
149
  "enter-active-class": "transition-opacity",
144
150
  "leave-active-class": "transition-opacity",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.5.18",
7
+ "version": "0.5.19",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",