sprintify-ui 0.11.25 → 0.11.26
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
CHANGED
|
@@ -23026,7 +23026,7 @@ const vI = ["disabled"], yI = ["accept", "multiple"], ep = /* @__PURE__ */ te({
|
|
|
23026
23026
|
}
|
|
23027
23027
|
}), bI = {
|
|
23028
23028
|
key: 0,
|
|
23029
|
-
class: "absolute inset-0
|
|
23029
|
+
class: "absolute inset-0 h-full w-full"
|
|
23030
23030
|
}, tp = /* @__PURE__ */ te({
|
|
23031
23031
|
__name: "BaseLoadingCover",
|
|
23032
23032
|
props: {
|
|
@@ -23071,23 +23071,32 @@ const vI = ["disabled"], yI = ["accept", "multiple"], ep = /* @__PURE__ */ te({
|
|
|
23071
23071
|
delay: {
|
|
23072
23072
|
default: 0,
|
|
23073
23073
|
type: Number
|
|
23074
|
+
},
|
|
23075
|
+
/**
|
|
23076
|
+
* Maximum distance in pixels from the top of the loading cover for the spinner center.
|
|
23077
|
+
*/
|
|
23078
|
+
maxSpinnerTopOffset: {
|
|
23079
|
+
default: 200,
|
|
23080
|
+
type: Number
|
|
23074
23081
|
}
|
|
23075
23082
|
},
|
|
23076
23083
|
setup(n) {
|
|
23077
23084
|
const t = n;
|
|
23078
23085
|
let e = null;
|
|
23079
|
-
const r = z(!1)
|
|
23086
|
+
const r = z(!1), o = S(
|
|
23087
|
+
() => `min(50%, ${t.maxSpinnerTopOffset}px)`
|
|
23088
|
+
);
|
|
23080
23089
|
return We(
|
|
23081
23090
|
() => t.modelValue,
|
|
23082
|
-
(
|
|
23083
|
-
|
|
23091
|
+
(i) => {
|
|
23092
|
+
i ? e = setTimeout(() => {
|
|
23084
23093
|
r.value = !0;
|
|
23085
23094
|
}, t.delay) : (e && clearTimeout(e), r.value = !1);
|
|
23086
23095
|
},
|
|
23087
23096
|
{
|
|
23088
23097
|
immediate: !0
|
|
23089
23098
|
}
|
|
23090
|
-
), (
|
|
23099
|
+
), (i, s) => (k(), re(An, {
|
|
23091
23100
|
"enter-active-class": "transition ease-out " + n.duration,
|
|
23092
23101
|
"enter-from-class": "opacity-0",
|
|
23093
23102
|
"enter-to-class": "opacity-100",
|
|
@@ -23100,13 +23109,18 @@ const vI = ["disabled"], yI = ["accept", "multiple"], ep = /* @__PURE__ */ te({
|
|
|
23100
23109
|
A("div", {
|
|
23101
23110
|
class: j(g(Ze)("absolute h-full w-full bg-white", n.twBackdrop))
|
|
23102
23111
|
}, null, 2),
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
},
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
|
|
23112
|
+
A("div", {
|
|
23113
|
+
class: "absolute left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
23114
|
+
style: Fe({ top: g(o) })
|
|
23115
|
+
}, [
|
|
23116
|
+
n.size == "sm" ? (k(), re(d0, {
|
|
23117
|
+
key: 0,
|
|
23118
|
+
class: j(g(Ze)("h-10 w-10 text-blue-500", n.twIcon))
|
|
23119
|
+
}, null, 8, ["class"])) : n.size == "lg" ? (k(), re(V0, {
|
|
23120
|
+
key: 1,
|
|
23121
|
+
class: j(g(Ze)("h-10 w-10 text-blue-500", n.twIcon))
|
|
23122
|
+
}, null, 8, ["class"])) : Z("", !0)
|
|
23123
|
+
], 4)
|
|
23110
23124
|
])) : Z("", !0)
|
|
23111
23125
|
]),
|
|
23112
23126
|
_: 1
|
|
@@ -42,6 +42,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
default: number;
|
|
43
43
|
type: NumberConstructor;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Maximum distance in pixels from the top of the loading cover for the spinner center.
|
|
47
|
+
*/
|
|
48
|
+
maxSpinnerTopOffset: {
|
|
49
|
+
default: number;
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
};
|
|
45
52
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
53
|
/**
|
|
47
54
|
* Show/Hide the loading cover
|
|
@@ -85,6 +92,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
85
92
|
default: number;
|
|
86
93
|
type: NumberConstructor;
|
|
87
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* Maximum distance in pixels from the top of the loading cover for the spinner center.
|
|
97
|
+
*/
|
|
98
|
+
maxSpinnerTopOffset: {
|
|
99
|
+
default: number;
|
|
100
|
+
type: NumberConstructor;
|
|
101
|
+
};
|
|
88
102
|
}>> & Readonly<{}>, {
|
|
89
103
|
size: "sm" | "lg";
|
|
90
104
|
duration: string;
|
|
@@ -92,5 +106,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
92
106
|
modelValue: boolean;
|
|
93
107
|
twIcon: string;
|
|
94
108
|
twBackdrop: string;
|
|
109
|
+
maxSpinnerTopOffset: number;
|
|
95
110
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
96
111
|
export default _default;
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ const Template = (args) => ({
|
|
|
24
24
|
return { args };
|
|
25
25
|
},
|
|
26
26
|
template: `
|
|
27
|
-
<div class="relative bg-slate-100 p-6
|
|
27
|
+
<div class="relative bg-slate-100 p-6 h-[1000px] border border-slate-700 border-dashed">
|
|
28
28
|
<p class="text-center text-slate-700">Non dolor consectetur et occaecat.</p>
|
|
29
29
|
<BaseLoadingCover v-bind="args" />
|
|
30
30
|
</div>
|
|
@@ -9,18 +9,23 @@
|
|
|
9
9
|
>
|
|
10
10
|
<div
|
|
11
11
|
v-if="showSpinner"
|
|
12
|
-
class="absolute inset-0
|
|
12
|
+
class="absolute inset-0 h-full w-full"
|
|
13
13
|
>
|
|
14
14
|
<div :class="twMerge('absolute h-full w-full bg-white', twBackdrop)" />
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
<div
|
|
17
|
+
class="absolute left-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
18
|
+
:style="{ top: spinnerTopOffset }"
|
|
19
|
+
>
|
|
20
|
+
<BaseSpinnerSmall
|
|
21
|
+
v-if="size == 'sm'"
|
|
22
|
+
:class="twMerge('h-10 w-10 text-blue-500', twIcon)"
|
|
23
|
+
/>
|
|
24
|
+
<BaseSpinnerLarge
|
|
25
|
+
v-else-if="size == 'lg'"
|
|
26
|
+
:class="twMerge('h-10 w-10 text-blue-500', twIcon)"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
24
29
|
</div>
|
|
25
30
|
</Transition>
|
|
26
31
|
</template>
|
|
@@ -74,11 +79,21 @@ const props = defineProps({
|
|
|
74
79
|
default: 0,
|
|
75
80
|
type: Number,
|
|
76
81
|
},
|
|
82
|
+
/**
|
|
83
|
+
* Maximum distance in pixels from the top of the loading cover for the spinner center.
|
|
84
|
+
*/
|
|
85
|
+
maxSpinnerTopOffset: {
|
|
86
|
+
default: 200,
|
|
87
|
+
type: Number,
|
|
88
|
+
},
|
|
77
89
|
});
|
|
78
90
|
|
|
79
91
|
let timeoutId = null as number | null;
|
|
80
92
|
|
|
81
93
|
const showSpinner = ref(false);
|
|
94
|
+
const spinnerTopOffset = computed(
|
|
95
|
+
() => `min(50%, ${props.maxSpinnerTopOffset}px)`
|
|
96
|
+
);
|
|
82
97
|
|
|
83
98
|
watch(
|
|
84
99
|
() => props.modelValue,
|