@dpa-id-components/dpa-shared-components 7.0.9-0 → 7.0.9

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.
@@ -10,3 +10,4 @@ import UiButton from "@/components/UiButton/UiButton.vue";
10
10
 
11
11
  const { lg } = useTailwindBreakpoints();
12
12
  </script>
13
+ ./useBreakpoints
@@ -0,0 +1,2 @@
1
+ import useTailwindBreakpoints from '../tailwind/useBreakpoints';
2
+ export { useTailwindBreakpoints };
@@ -0,0 +1,9 @@
1
+ declare const _default: () => {
2
+ currentBreakpoint: import("vue").ComputedRef<string[]>;
3
+ sm: import("vue").ComputedRef<boolean>;
4
+ md: import("vue").ComputedRef<boolean>;
5
+ lg: import("vue").ComputedRef<boolean>;
6
+ xl: import("vue").ComputedRef<boolean>;
7
+ xxl: import("vue").ComputedRef<boolean>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { useBreakpoints } from "@vueuse/core";
2
+ import { computed } from "vue";
3
+ import screens from "./screens.json";
4
+
5
+ export default () => {
6
+ const breakpoints = useBreakpoints({
7
+ ...screens,
8
+ });
9
+
10
+ const currentBreakpoint = breakpoints.current();
11
+
12
+ const sm = computed(() => currentBreakpoint.value.includes("sm"));
13
+ const md = computed(() => currentBreakpoint.value.includes("md"));
14
+ const lg = computed(() => currentBreakpoint.value.includes("lg"));
15
+ const xl = computed(() => currentBreakpoint.value.includes("xl"));
16
+ const xxl = computed(() => currentBreakpoint.value.includes("xxl"));
17
+
18
+ return { currentBreakpoint, sm, md, lg, xl, xxl };
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpa-id-components/dpa-shared-components",
3
- "version": "7.0.9-0",
3
+ "version": "7.0.9",
4
4
  "engines": {
5
5
  "node": ">=16"
6
6
  },
@@ -88,7 +88,7 @@
88
88
  "vite": "^4.0.1",
89
89
  "vite-plugin-dts": "^2.0.0",
90
90
  "vite-svg-loader": "^4.0.0",
91
- "vitest": "^0.32.0",
91
+ "vitest": "^0.33.0",
92
92
  "vue-loader": "^17.0.0",
93
93
  "vue-tsc": "^1.0.13"
94
94
  },