vueless 0.0.191 → 0.0.192

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.191",
3
+ "version": "0.0.192",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -47,5 +47,6 @@ export function useAttrs(props) {
47
47
  return {
48
48
  loaderAttrs,
49
49
  ellipseAttrs,
50
+ config,
50
51
  };
51
52
  }
@@ -41,9 +41,17 @@ export default /*tw*/ {
41
41
  },
42
42
  },
43
43
  },
44
+ loaderTransition: {
45
+ moveClass: "transition duration-500",
46
+ enterActiveClass: "transition duration-500",
47
+ leaveActiveClass: "transition duration-500 absolute",
48
+ enterFromClass: "opacity-0",
49
+ leaveToClass: "opacity-0",
50
+ },
44
51
  defaultVariants: {
45
52
  color: "brand",
46
53
  size: "md",
54
+ loading: true,
47
55
  },
48
56
  safelist: (colors) => [{ pattern: `bg-(${colors})-600` }],
49
57
  };
@@ -1,7 +1,13 @@
1
1
  <template>
2
- <div v-bind="loaderAttrs">
3
- <div v-for="ellipse in ELLIPSES_AMOUNT" :key="ellipse" v-bind="ellipseAttrs(ellipseClasses)" />
4
- </div>
2
+ <Transition v-bind="config.loaderTransition">
3
+ <div v-if="!loading" v-bind="loaderAttrs">
4
+ <div
5
+ v-for="ellipse in ELLIPSES_AMOUNT"
6
+ :key="ellipse"
7
+ v-bind="ellipseAttrs(ellipseClasses)"
8
+ />
9
+ </div>
10
+ </Transition>
5
11
  </template>
6
12
 
7
13
  <script setup>
@@ -33,11 +39,19 @@ const props = defineProps({
33
39
  type: String,
34
40
  default: UIService.get(defaultConfig, ULoader).default.color,
35
41
  },
42
+
43
+ /**
44
+ * Turn off/on loader.
45
+ */
46
+ loading: {
47
+ type: Boolean,
48
+ default: UIService.get(defaultConfig, ULoader).default.loading,
49
+ },
36
50
  });
37
51
 
38
52
  const ELLIPSES_AMOUNT = 4;
39
53
 
40
- const { loaderAttrs, ellipseAttrs } = useAttrs(props);
54
+ const { loaderAttrs, ellipseAttrs, config } = useAttrs(props);
41
55
 
42
56
  const ellipseClasses = computed(() => [
43
57
  "vueless-internal-loader-ellipse",
@@ -23,7 +23,7 @@ export function useAttrs(props) {
23
23
  ),
24
24
  );
25
25
 
26
- const wrapperAttrs = getAttrs("wrapper", { classes: wrapperClasses });
26
+ const wrapperAttrs = getAttrs("wrapper", { classes: wrapperClasses, isComponent: true });
27
27
 
28
28
  return {
29
29
  wrapperAttrs,
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.191",
4
+ "version": "0.0.192",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -4746,6 +4746,15 @@
4746
4746
  "type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'white'"
4747
4747
  },
4748
4748
  "default": "brand"
4749
+ },
4750
+ {
4751
+ "name": "loading",
4752
+ "description": "Turn off/on loader.",
4753
+ "value": {
4754
+ "kind": "expression",
4755
+ "type": "boolean"
4756
+ },
4757
+ "default": "true"
4749
4758
  }
4750
4759
  ],
4751
4760
  "source": {