erp-blocks 1.1.4 → 1.1.6

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "erp-blocks",
3
3
  "configKey": "erp",
4
- "version": "1.1.4",
4
+ "version": "1.1.6",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div>
3
3
  <UCollapsible
4
+ v-if="breakpoints.isGreaterOrEqual('lg')"
4
5
  v-model:open="sidebarOpen"
5
6
  :ui="{
6
- root: 'max-lg:hidden',
7
7
  content: 'max-lg:fixed z-40 max-lg:bg-white left-0 top-0 data-[state=open]:animate-collapsible-right data-[state=closed]:animate-collapsible-left border-r border-scn-sidebar-border dark:border-default'
8
8
  }"
9
9
  >
@@ -19,15 +19,17 @@
19
19
  </template>
20
20
  </UCollapsible>
21
21
  <UDrawer
22
+ v-if="breakpoints.isSmaller('lg')"
22
23
  v-model:open="sidebarOpen"
23
24
  direction="left"
24
- :ui="{
25
- overlay: 'lg:hidden',
26
- content: 'lg:hidden'
27
- }"
28
25
  >
29
26
  <template #content>
30
- <div class="w-[40vw]">
27
+ <UIcon
28
+ name="i-lucide-x"
29
+ class="size-5 absolute z-50 top-4 right-4 cursor-pointer lg:hidden"
30
+ @click="closeSidebar"
31
+ />
32
+ <div class="w-[40vw] mt-10">
31
33
  <MainMenu />
32
34
  </div>
33
35
  </template>
@@ -37,7 +39,11 @@
37
39
 
38
40
  <script setup>
39
41
  import { useState } from "#app";
42
+ import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
40
43
  import MainMenu from "./MainMenu.vue";
44
+ const breakpoints = useBreakpoints(breakpointsTailwind, {
45
+ ssrWidth: 768
46
+ });
41
47
  const sidebarOpen = useState("sidebarOpen", () => true);
42
48
  function closeSidebar() {
43
49
  sidebarOpen.value = false;
@@ -1,4 +1,4 @@
1
- import type { TableProps } from '@nuxt/ui';
1
+ import type { TableProps, TableSlots } from '@nuxt/ui';
2
2
  declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<({
4
4
  tableProps: TableProps<T>;
@@ -11,9 +11,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
11
11
  }> & import("vue").PublicProps;
12
12
  expose: (exposed: {}) => void;
13
13
  attrs: any;
14
- slots: {
15
- [x: number]: ((props: any) => any) | undefined;
16
- };
14
+ slots: TableSlots<T>;
17
15
  emit: (evt: "update:page", value: number | undefined) => void;
18
16
  }>) => import("vue").VNode & {
19
17
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -5,6 +5,7 @@ defineProps({
5
5
  itemsPerPage: { type: Number, required: false, default: 5 }
6
6
  });
7
7
  const page = defineModel("page", { type: Number });
8
+ defineSlots();
8
9
  </script>
9
10
 
10
11
  <template>
@@ -13,24 +14,17 @@ const page = defineModel("page", { type: Number });
13
14
  v-bind="tableProps"
14
15
  class="flex-1 border border-default rounded-lg grow"
15
16
  >
16
- <template
17
- v-for="(_, name) in $slots"
18
- #[name]="slotProps"
19
- >
20
- <slot
21
- :name="name"
22
- v-bind="slotProps"
23
- />
17
+ <template #default="slotProps">
18
+ <slot v-bind="slotProps" />
24
19
  </template>
25
20
  </UTable>
26
21
  <div
27
22
  v-if="tableProps.data && totalRows"
28
23
  class="flex items-center justify-between"
29
24
  >
30
- <span
31
- class="text-base text-dimmed"
32
- >
33
- {{ tableProps.data?.length || itemsPerPage }} of {{ totalRows || itemsPerPage }} rows
25
+ <span class="text-base text-dimmed">
26
+ {{ tableProps.data?.length || itemsPerPage }} of
27
+ {{ totalRows || itemsPerPage }} rows
34
28
  </span>
35
29
  <UPagination
36
30
  v-model:page="page"
@@ -1,4 +1,4 @@
1
- import type { TableProps } from '@nuxt/ui';
1
+ import type { TableProps, TableSlots } from '@nuxt/ui';
2
2
  declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<({
4
4
  tableProps: TableProps<T>;
@@ -11,9 +11,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
11
11
  }> & import("vue").PublicProps;
12
12
  expose: (exposed: {}) => void;
13
13
  attrs: any;
14
- slots: {
15
- [x: number]: ((props: any) => any) | undefined;
16
- };
14
+ slots: TableSlots<T>;
17
15
  emit: (evt: "update:page", value: number | undefined) => void;
18
16
  }>) => import("vue").VNode & {
19
17
  __ctx?: Awaited<typeof __VLS_setup>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "erp-blocks",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Ready-to-use UI layouts and components designed as ERP system elements ",
5
5
  "repository": {
6
6
  "type": "git",