vueless 0.0.58 → 0.0.59

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": "vueless",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -244,9 +244,6 @@ onMounted(() => {
244
244
  &:deep(.vueless-dropdown-tag, .vueless-dropdown-link, .vueless-dropdown-button) {
245
245
  @apply w-full md:w-auto;
246
246
 
247
- .dropdown-list {
248
- }
249
-
250
247
  .dropdown-wrapper-list {
251
248
  @apply mb-2 md:mb-0;
252
249
  }
@@ -48,40 +48,40 @@ const ellipseClasses = computed(() => [
48
48
  <style scoped lang="postcss">
49
49
  .vueless-internal-loader-ellipse {
50
50
  &:nth-child(1) {
51
- @apply animate-[lds-ellipsis1_0.6s_infinite];
51
+ animation: lds-ellipsis1 0.6s infinite;
52
52
  }
53
53
 
54
54
  &:nth-child(4) {
55
- @apply animate-[lds-ellipsis3_0.6s_infinite];
55
+ animation: lds-ellipsis3 0.6s infinite;
56
56
  }
57
57
 
58
58
  &-sm {
59
59
  &:nth-child(2) {
60
- @apply animate-[lds-ellipsis2-sm_0.6s_infinite];
60
+ animation: lds-ellipsis2-sm 0.6s infinite;
61
61
  }
62
62
 
63
63
  &:nth-child(3) {
64
- @apply animate-[lds-ellipsis2-sm_0.6s_infinite];
64
+ animation: lds-ellipsis2-sm 0.6s infinite;
65
65
  }
66
66
  }
67
67
 
68
68
  &-md {
69
69
  &:nth-child(2) {
70
- @apply animate-[lds-ellipsis2-md_0.6s_infinite];
70
+ animation: lds-ellipsis2-md 0.6s infinite;
71
71
  }
72
72
 
73
73
  &:nth-child(3) {
74
- @apply animate-[lds-ellipsis2-md_0.6s_infinite];
74
+ animation: lds-ellipsis2-md 0.6s infinite;
75
75
  }
76
76
  }
77
77
 
78
78
  &-lg {
79
79
  &:nth-child(2) {
80
- @apply animate-[lds-ellipsis2-lg_0.6s_infinite];
80
+ animation: lds-ellipsis2-lg 0.6s infinite;
81
81
  }
82
82
 
83
83
  &:nth-child(3) {
84
- @apply animate-[lds-ellipsis2-lg_0.6s_infinite];
84
+ animation: lds-ellipsis2-lg 0.6s infinite;
85
85
  }
86
86
  }
87
87
  }
@@ -0,0 +1,20 @@
1
+ import useUI from "../../composable.ui";
2
+
3
+ import defaultConfig from "../configs/default.config";
4
+
5
+ export function useAttrs(props) {
6
+ const { getAttrs, config } = useUI(defaultConfig, () => props.config);
7
+
8
+ const wrapperAttrs = getAttrs("wrapper");
9
+ const loaderAttrs = getAttrs("loader");
10
+ const rippleAttrs = getAttrs("ripple");
11
+ const rippleElementAttrs = getAttrs("rippleElement");
12
+
13
+ return {
14
+ wrapperAttrs,
15
+ loaderAttrs,
16
+ rippleAttrs,
17
+ rippleElementAttrs,
18
+ config,
19
+ };
20
+ }
@@ -0,0 +1,13 @@
1
+ export default /*tw*/ {
2
+ wrapper: "",
3
+ loader: `
4
+ flex justify-center items-center fixed left-0 top-0 z-[9999] h-screen w-screen bg-gray-800
5
+ transition-all duration-300"
6
+ `,
7
+ ripple: "relative h-40 w-40 ml-auto mr-auto",
8
+ rippleElement: "absolute opacity-100 rounded-full border-4 border-solid border-white",
9
+ transition: {
10
+ enterFromClass: "scale-110 transform",
11
+ leaveActiveClass: "scale-110 transform",
12
+ },
13
+ };
@@ -0,0 +1,5 @@
1
+ /*
2
+ This const is needed to prevent the issue in script setup:
3
+ `defineProps` is referencing locally declared variables. (vue/valid-define-props)
4
+ */
5
+ export const ULoaderRendering = "ULoaderRendering";
@@ -1,21 +1,22 @@
1
1
  <template>
2
- <transition name="loader">
3
- <div v-if="showLoader" class="app-loader">
4
- <div class="lds-ripple">
5
- <div></div>
6
- <div></div>
2
+ <Transition name="loader" v-bind="{ ...config.transition, ...wrapperAttrs }">
3
+ <div v-if="showLoader" v-bind="loaderAttrs">
4
+ <div v-bind="rippleAttrs">
5
+ <div v-bind="rippleElementAttrs" class="ripple-element" />
6
+ <div v-bind="rippleElementAttrs" class="ripple-element" />
7
7
  </div>
8
8
  </div>
9
- </transition>
9
+ </Transition>
10
10
  </template>
11
11
 
12
12
  <script setup>
13
13
  import { computed } from "vue";
14
14
 
15
+ import { useAttrs } from "./composables/attrs.composable";
15
16
  import useLoaderRendering from "./composables/useLoaderRendering";
16
17
 
17
18
  /* Should be a string for correct web-types gen */
18
- defineOptions({ name: "ULoaderRendering" });
19
+ defineOptions({ name: "ULoaderRendering", inheritAttrs: false });
19
20
 
20
21
  const props = defineProps({
21
22
  loading: {
@@ -24,6 +25,7 @@ const props = defineProps({
24
25
  },
25
26
  });
26
27
 
28
+ const { wrapperAttrs, loaderAttrs, rippleAttrs, rippleElementAttrs, config } = useAttrs(props);
27
29
  const { isRenderingPage } = useLoaderRendering();
28
30
 
29
31
  const showLoader = computed(() => {
@@ -32,40 +34,29 @@ const showLoader = computed(() => {
32
34
  </script>
33
35
 
34
36
  <style lang="postcss" scoped>
35
- .app-loader {
36
- @apply flex justify-center items-center;
37
- @apply fixed left-0 top-0 z-[9999] h-screen w-screen;
38
- @apply bg-gray-800;
39
- @apply transition-all duration-300;
37
+ .ripple-element {
38
+ animation: ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
40
39
 
41
- .lds-ripple {
42
- @apply relative h-40 w-40;
43
- @apply ml-auto mr-auto;
44
-
45
- div {
46
- @apply absolute opacity-100;
47
- @apply rounded-full border-4 border-solid border-white;
48
- animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
49
-
50
- &:nth-child(2) {
51
- animation-delay: -0.5s;
52
- }
53
- }
40
+ &:nth-child(2) {
41
+ animation-delay: -0.5s;
54
42
  }
43
+ }
55
44
 
56
- @keyframes lds-ripple {
57
- 0% {
58
- @apply left-20 top-20 h-0 w-0 opacity-100;
59
- }
60
-
61
- 100% {
62
- @apply left-0 top-0 h-40 w-40 opacity-0;
63
- }
45
+ @keyframes ripple {
46
+ 0% {
47
+ left: 5rem;
48
+ top: 5rem;
49
+ height: 0px;
50
+ width: 0px;
51
+ opacity: 1;
64
52
  }
65
- }
66
53
 
67
- .loader-enter-from .loader-container-loader,
68
- .loader-leave-active .loader-container-loader {
69
- @apply scale-110 transform;
54
+ 100% {
55
+ left: 0px;
56
+ top: 0px;
57
+ height: 10rem;
58
+ width: 10rem;
59
+ opacity: 0;
60
+ }
70
61
  }
71
62
  </style>
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.58",
4
+ "version": "0.0.59",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",