sprintify-ui 0.8.55 → 0.8.57
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/dist/sprintify-ui.es.js +9 -5
- package/dist/types/composables/paginatedData.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BaseDataIterator.stories.js +2 -2
- package/src/components/BaseDataIterator.vue +7 -1
- package/src/components/BaseTabs.vue +20 -13
- package/src/composables/paginatedData.ts +1 -1
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -24569,7 +24569,10 @@ const HB = { class: "grow" }, UB = {
|
|
|
24569
24569
|
), O = T(() => _.value.page && parseInt(_.value.page + "") ? parseInt(_.value.page + "") : 1), j = T(() => a.value == s ? ce.value : nt(r.items)), { items: G, paginationMetadata: be, lastPage: Te } = zp(
|
|
24570
24570
|
j,
|
|
24571
24571
|
O,
|
|
24572
|
-
T(() =>
|
|
24572
|
+
T(() => {
|
|
24573
|
+
if (a.value != s)
|
|
24574
|
+
return r.perPage;
|
|
24575
|
+
})
|
|
24573
24576
|
), Oe = T(() => a.value == s ? G.value : _t(xt(G.value)));
|
|
24574
24577
|
function nt(ge) {
|
|
24575
24578
|
if (!ge)
|
|
@@ -44984,11 +44987,12 @@ const U7 = /* @__PURE__ */ Yo(P7, [["render", H7]]), V7 = { class: "flex-shrink-
|
|
|
44984
44987
|
l.value.style.transform = `translateX(${m}px)`, l.value.style.width = `${f}px`;
|
|
44985
44988
|
return;
|
|
44986
44989
|
}
|
|
44987
|
-
|
|
44990
|
+
const g = `translateX(${m}px)`, v = `${f}px`;
|
|
44991
|
+
l.value.animate ? l.value.animate(
|
|
44988
44992
|
[
|
|
44989
44993
|
{
|
|
44990
|
-
transform:
|
|
44991
|
-
width:
|
|
44994
|
+
transform: g,
|
|
44995
|
+
width: v
|
|
44992
44996
|
}
|
|
44993
44997
|
],
|
|
44994
44998
|
{
|
|
@@ -44996,7 +45000,7 @@ const U7 = /* @__PURE__ */ Yo(P7, [["render", H7]]), V7 = { class: "flex-shrink-
|
|
|
44996
45000
|
easing: "ease-in-out",
|
|
44997
45001
|
fill: "both"
|
|
44998
45002
|
}
|
|
44999
|
-
);
|
|
45003
|
+
) : (l.value.style.transform = g, l.value.style.width = v);
|
|
45000
45004
|
}
|
|
45001
45005
|
return (u, d) => (A(), $("div", b9, [
|
|
45002
45006
|
d[0] || (d[0] = M("div", { class: "absolute bottom-0 left-0 h-px w-full bg-slate-300" }, null, -1)),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import { Collection, PaginatedCollection, ResourceCollection, PaginationMetadata } from '@/types';
|
|
3
|
-
export declare function useHasPaginatedData(data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>, page?: ComputedRef<number>, perPage?: ComputedRef<number>): {
|
|
3
|
+
export declare function useHasPaginatedData(data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>, page?: ComputedRef<number>, perPage?: ComputedRef<number | undefined>): {
|
|
4
4
|
items: ComputedRef<Collection>;
|
|
5
5
|
paginationMetadata: ComputedRef<PaginationMetadata | null>;
|
|
6
6
|
lastPage: ComputedRef<number>;
|
package/package.json
CHANGED
|
@@ -721,7 +721,13 @@ const dataInternal = computed<ResourceCollection | PaginatedCollection | Collect
|
|
|
721
721
|
const { items, paginationMetadata, lastPage } = useHasPaginatedData(
|
|
722
722
|
dataInternal,
|
|
723
723
|
page,
|
|
724
|
-
computed(() =>
|
|
724
|
+
computed(() => {
|
|
725
|
+
if (dataMode.value == REMOTE) {
|
|
726
|
+
return undefined;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
return props.perPage;
|
|
730
|
+
}),
|
|
725
731
|
);
|
|
726
732
|
|
|
727
733
|
const itemsInternal = computed(() => {
|
|
@@ -146,19 +146,26 @@ function animateLine(animate = true) {
|
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
const transformPx = `translateX(${x}px)`;
|
|
150
|
+
const widthPx = `${width}px`;
|
|
151
|
+
|
|
152
|
+
if (lineRef.value.animate) {
|
|
153
|
+
lineRef.value.animate(
|
|
154
|
+
[
|
|
155
|
+
{
|
|
156
|
+
transform: transformPx,
|
|
157
|
+
width: widthPx,
|
|
158
|
+
}
|
|
159
|
+
],
|
|
151
160
|
{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
);
|
|
162
|
-
|
|
161
|
+
duration: 200,
|
|
162
|
+
easing: 'ease-in-out',
|
|
163
|
+
fill: 'both',
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
} else {
|
|
167
|
+
lineRef.value.style.transform = transformPx;
|
|
168
|
+
lineRef.value.style.width = widthPx;
|
|
169
|
+
}
|
|
163
170
|
}
|
|
164
171
|
</script>
|
|
@@ -11,7 +11,7 @@ import { getItems } from '@/utils/getApiData';
|
|
|
11
11
|
export function useHasPaginatedData(
|
|
12
12
|
data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>,
|
|
13
13
|
page?: ComputedRef<number>,
|
|
14
|
-
perPage?: ComputedRef<number>,
|
|
14
|
+
perPage?: ComputedRef<number | undefined>,
|
|
15
15
|
) {
|
|
16
16
|
const items = computed(() => {
|
|
17
17
|
return getItems(data.value);
|