@fastkit/vui 0.16.38 → 0.16.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastkit/vui",
3
- "version": "0.16.38",
3
+ "version": "0.16.39",
4
4
  "description": "A simple, extensible UI kit for Vue applications.",
5
5
  "keywords": [
6
6
  "fastkit",
@@ -46,29 +46,29 @@
46
46
  "dependencies": {
47
47
  "@fastkit/color-scheme": "1.0.10",
48
48
  "@fastkit/color-scheme-gen": "0.13.10",
49
- "@fastkit/dom": "0.1.3",
50
49
  "@fastkit/helpers": "0.13.3",
51
- "@fastkit/icon-font": "1.0.9",
50
+ "@fastkit/dom": "0.1.3",
52
51
  "@fastkit/media-match": "1.0.9",
53
52
  "@fastkit/media-match-gen": "0.13.10",
54
53
  "@fastkit/rules": "0.13.4",
55
- "@fastkit/stylebase": "0.13.1",
56
- "@fastkit/tiny-logger": "0.13.3",
57
54
  "@fastkit/vue-action": "0.2.8",
58
- "@fastkit/vue-app-layout": "0.14.7",
59
- "@fastkit/vue-body-scroll-lock": "0.1.8",
55
+ "@fastkit/icon-font": "1.0.9",
56
+ "@fastkit/vue-app-layout": "0.14.8",
57
+ "@fastkit/tiny-logger": "0.13.3",
58
+ "@fastkit/stylebase": "0.13.1",
60
59
  "@fastkit/vue-click-outside": "0.1.9",
61
- "@fastkit/vue-form-control": "0.15.26",
62
60
  "@fastkit/vue-color-scheme": "0.14.8",
63
- "@fastkit/vue-loading": "0.14.9",
64
- "@fastkit/vue-keyboard": "0.1.3",
65
- "@fastkit/vue-media-match": "0.13.10",
61
+ "@fastkit/vue-form-control": "0.15.26",
62
+ "@fastkit/vue-body-scroll-lock": "0.1.8",
66
63
  "@fastkit/vue-location": "0.1.8",
67
- "@fastkit/vue-resize": "0.1.8",
68
- "@fastkit/vue-scroller": "0.14.7",
64
+ "@fastkit/vue-media-match": "0.13.10",
65
+ "@fastkit/vue-keyboard": "0.1.3",
66
+ "@fastkit/vue-scroller": "0.14.8",
69
67
  "@fastkit/vue-stack": "0.15.20",
68
+ "@fastkit/vue-resize": "0.1.8",
70
69
  "@fastkit/vue-transitions": "0.1.9",
71
- "@fastkit/vue-utils": "0.14.6"
70
+ "@fastkit/vue-utils": "0.14.6",
71
+ "@fastkit/vue-loading": "0.14.9"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "vue": "^3.3.0",
@@ -222,8 +222,8 @@ export const VPagination = defineComponent({
222
222
  } else {
223
223
  number = false;
224
224
  const isPrev = source === 'prev';
225
- const ammount = isPrev ? -1 : 1;
226
- page = currentPage + ammount;
225
+ const amount = isPrev ? -1 : 1;
226
+ page = currentPage + amount;
227
227
  active = false;
228
228
  disabled = page < 1 || page > length;
229
229
  }
@@ -16,11 +16,7 @@ import { useVui } from '../../injections';
16
16
  import { defineSlots } from '@fastkit/vue-utils';
17
17
  import { RouteLocationRaw, RouteLocation } from 'vue-router';
18
18
  import { VTab, VTabRef } from './VTab';
19
- import {
20
- VScroller,
21
- useVScrollerRef,
22
- ScrollResult,
23
- } from '@fastkit/vue-scroller';
19
+ import { VScroller, ScrollResult } from '@fastkit/vue-scroller';
24
20
  import { useScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
25
21
  import { isPromise } from '@fastkit/helpers';
26
22
 
@@ -93,7 +89,7 @@ export const VTabs = defineComponent({
93
89
  const vui = useVui();
94
90
 
95
91
  const internalValueRef = ref<string>(null as any);
96
- const scrollerRef = useVScrollerRef();
92
+ const ScrollerRef = VScroller.$ref();
97
93
  const elRef = ref<HTMLElement>(null as any);
98
94
  let scrollResult: ScrollResult | undefined;
99
95
  const tabRefs = ref<VTabRef[]>([]);
@@ -214,7 +210,7 @@ export const VTabs = defineComponent({
214
210
  const $tab = tab.$el as HTMLElement;
215
211
  if (!$tab) return;
216
212
 
217
- const scroller = scrollerRef.value;
213
+ const scroller = ScrollerRef.instance;
218
214
  if (!scroller) return;
219
215
  const container = scroller.scroller.element();
220
216
  if (!container) return;
@@ -233,17 +229,17 @@ export const VTabs = defineComponent({
233
229
  if (hiddenLeft > 0) hiddenLeft += autoScrollOffset;
234
230
  if (hiddenRight > 0) hiddenRight += autoScrollOffset;
235
231
 
236
- let scrollAmmount = 0;
232
+ let scrollAmount = 0;
237
233
  if (hiddenRight > 0) {
238
- scrollAmmount = hiddenRight;
234
+ scrollAmount = hiddenRight;
239
235
  }
240
236
  if (hiddenLeft > 0) {
241
- scrollAmmount = -hiddenLeft;
237
+ scrollAmount = -hiddenLeft;
242
238
  }
243
239
 
244
- if (Math.abs(scrollAmmount) > 0) {
240
+ if (Math.abs(scrollAmount) > 0) {
245
241
  cancelScroll();
246
- scrollResult = scroller.scroller.by(scrollAmmount, 0, {
242
+ scrollResult = scroller.scroller.by(scrollAmount, 0, {
247
243
  duration: 150,
248
244
  });
249
245
  }
@@ -327,13 +323,12 @@ export const VTabs = defineComponent({
327
323
 
328
324
  return (
329
325
  <div class={['v-tabs', classes.value]} ref={elRef}>
330
- <VScroller
326
+ <ScrollerRef
331
327
  class="v-tabs__scroller"
332
328
  containerClass="v-tabs__scroller__container"
333
- guide
334
- ref={scrollerRef}>
329
+ guide>
335
330
  <div class="v-tabs__content">{children}</div>
336
- </VScroller>
331
+ </ScrollerRef>
337
332
  </div>
338
333
  );
339
334
  };