vueless 0.0.400 → 0.0.401
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 +1 -1
- package/ui.loader/ULoader.vue +1 -1
- package/ui.loader/useAttrs.js +5 -1
- package/ui.loader-rendering/ULoaderRendering.vue +12 -9
- package/ui.loader-rendering/config.js +6 -6
- package/ui.loader-rendering/useAttrs.js +5 -1
- package/ui.loader-top/ULoaderTop.vue +3 -3
- package/ui.loader-top/config.js +1 -2
- package/web-types.json +10 -4
package/package.json
CHANGED
package/ui.loader/ULoader.vue
CHANGED
package/ui.loader/useAttrs.js
CHANGED
|
@@ -4,7 +4,11 @@ import useUI from "../composables/useUI.js";
|
|
|
4
4
|
import defaultConfig from "./config.js";
|
|
5
5
|
|
|
6
6
|
export default function useAttrs(props) {
|
|
7
|
-
const { config, getKeysAttrs, hasSlotContent } = useUI(
|
|
7
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(
|
|
8
|
+
defaultConfig,
|
|
9
|
+
() => props.config,
|
|
10
|
+
"loader",
|
|
11
|
+
);
|
|
8
12
|
|
|
9
13
|
const keysAttrs = getKeysAttrs({}, [], {
|
|
10
14
|
ellipse: {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Transition v-bind="config.transition">
|
|
3
|
-
<div v-if="showLoader" v-bind="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<div v-if="showLoader" v-bind="overlayAttrs">
|
|
4
|
+
<!-- @slot Use it to add something instead of the default loader. -->
|
|
5
|
+
<slot>
|
|
6
|
+
<ULoader
|
|
7
|
+
:loading="showLoader"
|
|
8
|
+
size="lg"
|
|
9
|
+
:color="color === 'white' ? 'grayscale' : 'white'"
|
|
10
|
+
v-bind="nestedLoaderAttrs"
|
|
11
|
+
/>
|
|
12
|
+
</slot>
|
|
10
13
|
</div>
|
|
11
14
|
</Transition>
|
|
12
15
|
</template>
|
|
@@ -26,7 +29,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
26
29
|
|
|
27
30
|
const props = defineProps({
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
32
|
+
* Loader state (shown / hidden).
|
|
30
33
|
*/
|
|
31
34
|
loading: {
|
|
32
35
|
type: Boolean,
|
|
@@ -43,7 +46,7 @@ const props = defineProps({
|
|
|
43
46
|
},
|
|
44
47
|
});
|
|
45
48
|
|
|
46
|
-
const {
|
|
49
|
+
const { overlayAttrs, nestedLoaderAttrs, config } = useAttrs(props);
|
|
47
50
|
const { isLoading, loaderRenderingOn, loaderRenderingOff } = useLoaderRendering();
|
|
48
51
|
|
|
49
52
|
onMounted(() => {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
|
|
2
|
+
transition: {
|
|
3
|
+
enterFromClass: "scale-110 transform",
|
|
4
|
+
leaveActiveClass: "scale-110 transform",
|
|
5
|
+
},
|
|
6
|
+
overlay: {
|
|
3
7
|
base: `
|
|
4
8
|
bg-{color}-600
|
|
5
9
|
h-screen w-screen
|
|
@@ -14,11 +18,7 @@ export default /*tw*/ {
|
|
|
14
18
|
},
|
|
15
19
|
},
|
|
16
20
|
},
|
|
17
|
-
|
|
18
|
-
transition: {
|
|
19
|
-
enterFromClass: "scale-110 transform",
|
|
20
|
-
leaveActiveClass: "scale-110 transform",
|
|
21
|
-
},
|
|
21
|
+
nestedLoader: "{ULoader}",
|
|
22
22
|
defaults: {
|
|
23
23
|
color: "brand",
|
|
24
24
|
loading: undefined,
|
|
@@ -3,7 +3,11 @@ import useUI from "../composables/useUI.js";
|
|
|
3
3
|
import defaultConfig from "./config.js";
|
|
4
4
|
|
|
5
5
|
export default function useAttrs(props) {
|
|
6
|
-
const { config, getKeysAttrs, hasSlotContent } = useUI(
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(
|
|
7
|
+
defaultConfig,
|
|
8
|
+
() => props.config,
|
|
9
|
+
"overlay",
|
|
10
|
+
);
|
|
7
11
|
|
|
8
12
|
const keysAttrs = getKeysAttrs();
|
|
9
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Transition :css="false" @before-enter="beforeEnter" @enter="enter" @after-enter="afterEnter">
|
|
3
|
-
<div v-if="show" v-bind="
|
|
3
|
+
<div v-if="show" v-bind="stripeAttrs" :style="barStyle" />
|
|
4
4
|
</Transition>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
20
20
|
|
|
21
21
|
const props = defineProps({
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Loader stripe color.
|
|
24
24
|
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white
|
|
25
25
|
*/
|
|
26
26
|
color: {
|
|
@@ -44,7 +44,7 @@ const opacity = ref(1);
|
|
|
44
44
|
const status = ref(null);
|
|
45
45
|
|
|
46
46
|
const { requestQueue, removeRequestUrl, isLoading, loaderTopOff, loaderTopOn } = useLoaderTop();
|
|
47
|
-
const {
|
|
47
|
+
const { stripeAttrs } = useAttrs(props, { error, isMobileApp });
|
|
48
48
|
|
|
49
49
|
const isStarted = computed(() => {
|
|
50
50
|
return typeof status.value === "number";
|
package/ui.loader-top/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
|
|
2
|
+
stripe: {
|
|
3
3
|
base: "top-0 left-0 right-0 fixed h-[3px] transition-all ease-linear bg-{color}-600",
|
|
4
4
|
variants: {
|
|
5
5
|
color: {
|
|
@@ -11,7 +11,6 @@ export default /*tw*/ {
|
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
|
-
progressMobile: "mt-safe-top mx-3 rounded max-w-[calc(100%-1.5rem)]",
|
|
15
14
|
defaults: {
|
|
16
15
|
color: "brand",
|
|
17
16
|
},
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.401",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -5825,7 +5825,7 @@
|
|
|
5825
5825
|
"attributes": [
|
|
5826
5826
|
{
|
|
5827
5827
|
"name": "loading",
|
|
5828
|
-
"description": "
|
|
5828
|
+
"description": "Loader state (shown / hidden).",
|
|
5829
5829
|
"value": {
|
|
5830
5830
|
"kind": "expression",
|
|
5831
5831
|
"type": "boolean"
|
|
@@ -5868,7 +5868,7 @@
|
|
|
5868
5868
|
"attributes": [
|
|
5869
5869
|
{
|
|
5870
5870
|
"name": "loading",
|
|
5871
|
-
"description": "
|
|
5871
|
+
"description": "Loader state (shown / hidden).",
|
|
5872
5872
|
"value": {
|
|
5873
5873
|
"kind": "expression",
|
|
5874
5874
|
"type": "boolean"
|
|
@@ -5884,6 +5884,12 @@
|
|
|
5884
5884
|
"default": "brand"
|
|
5885
5885
|
}
|
|
5886
5886
|
],
|
|
5887
|
+
"slots": [
|
|
5888
|
+
{
|
|
5889
|
+
"name": "default",
|
|
5890
|
+
"description": "Use it to add something instead of the default loader."
|
|
5891
|
+
}
|
|
5892
|
+
],
|
|
5887
5893
|
"source": {
|
|
5888
5894
|
"module": "./src/ui.loader-rendering/ULoaderRendering.vue",
|
|
5889
5895
|
"symbol": "default"
|
|
@@ -5895,7 +5901,7 @@
|
|
|
5895
5901
|
"attributes": [
|
|
5896
5902
|
{
|
|
5897
5903
|
"name": "color",
|
|
5898
|
-
"description": "
|
|
5904
|
+
"description": "Loader stripe color.",
|
|
5899
5905
|
"value": {
|
|
5900
5906
|
"kind": "expression",
|
|
5901
5907
|
"type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'white'"
|