pukaad-ui-lib 1.150.0 → 1.152.0

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": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.150.0",
4
+ "version": "1.152.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1 +1 @@
1
- @import "tailwindcss";@import "tw-animate-css";@import "./system.css";@import "./scroll-bar.css";@import "quill/dist/quill.snow.css";@custom-variant dark (&:is(.dark *));@theme inline{--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary-foreground:var(--primary-foreground);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring);--color-chart-1:var(--chart-1);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4);--color-chart-5:var(--chart-5);--color-sidebar:var(--sidebar);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-border:var(--sidebar-border);--color-sidebar-ring:var(--sidebar-ring);--color-red:var(--red);--color-error:var(--error);--color-success:var(--success);--color-green:var(--green);--color-warning:var(--warning);--color-yellow:var(--yellow);--color-primary:var(--primary);--color-secondary:var(--secondary);--color-info:var(--info);--color-black:var(--black);--color-dark:var(--dark);--color-gray:var(--gray);--color-cloud:var(--cloud);--color-mercury:var(--mercury);--color-green-light:var(--green-light);--color-red-light:var(--red-light);--color-yellow-light:var(--yellow-light);--color-bright:var(--bright);--color-silver:var(--silver);--color-smoke:var(--smoke);--z-index-announce-tool:10;--z-index-dropdown:11;--z-index-overlay:12;--z-index-loading:13;--z-index-drawer:14;--z-index-modal:15;--z-index-toast:99998;--z-index-loading-page:99999}:root{--radius:0.625rem;--red:#b71c1c;--success:#43a047;--green:#1b5e20;--warning:#f9a825;--yellow:#fbc02d;--info:#e3f2fd;--black:#212121;--dark:#424242;--gray:#616161;--cloud:#c4c4c4;--mercury:#e0e0e0;--green-light:#e3f5e3;--red-light:#fde3e3;--yellow-light:#fef3c7;--bright:#f5f5f5;--silver:#f7f7f7;--smoke:#fafafa;--white:#fff;--background:var(--white);--foreground:var(--black);--card:var(--background);--card-foreground:var(--foreground);--popover:var(--background);--popover-foreground:var(--foreground);--primary:#1976b8;--primary-foreground:var(--white);--secondary:#22a7ef;--secondary-foreground:var(--white);--muted:oklch(0.97 0 0);--muted-foreground:var(--cloud);--accent:oklch(0.97 0 0);--accent-foreground:oklch(0.205 0 0);--destructive:#d32f2f;--destructive-foreground:var(--white);--border:var(--color-mercury);--input:var(--color-mercury);--ring:var(--mercury);--chart-1:oklch(0.646 0.222 41.116);--chart-2:oklch(0.6 0.118 184.704);--chart-3:oklch(0.398 0.07 227.392);--chart-4:oklch(0.828 0.189 84.429);--chart-5:oklch(0.769 0.188 70.08);--sidebar:oklch(0.985 0 0);--sidebar-foreground:var(--foreground);--sidebar-primary:oklch(0.205 0 0);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.97 0 0);--sidebar-accent-foreground:oklch(0.205 0 0);--sidebar-border:var(--color-mercury);--sidebar-ring:var(--color-mercury)}.dark{--background:oklch(0.145 0 0);--foreground:oklch(0.985 0 0);--card:oklch(0.145 0 0);--card-foreground:oklch(0.985 0 0);--popover:oklch(0.145 0 0);--popover-foreground:oklch(0.985 0 0);--primary:oklch(0.985 0 0);--primary-foreground:oklch(0.205 0 0);--secondary:oklch(0.269 0 0);--secondary-foreground:oklch(0.985 0 0);--muted:oklch(0.269 0 0);--muted-foreground:oklch(0.708 0 0);--accent:oklch(0.269 0 0);--accent-foreground:oklch(0.985 0 0);--destructive:oklch(0.396 0.141 25.723);--destructive-foreground:oklch(0.637 0.237 25.331);--border:oklch(0.269 0 0);--input:oklch(0.269 0 0);--ring:oklch(0.439 0 0);--chart-1:oklch(0.488 0.243 264.376);--chart-2:oklch(0.696 0.17 162.48);--chart-3:oklch(0.769 0.188 70.08);--chart-4:oklch(0.627 0.265 303.9);--chart-5:oklch(0.645 0.246 16.439);--sidebar:oklch(0.205 0 0);--sidebar-foreground:oklch(0.985 0 0);--sidebar-primary:oklch(0.488 0.243 264.376);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.269 0 0);--sidebar-accent-foreground:oklch(0.985 0 0);--sidebar-border:oklch(0.269 0 0);--sidebar-ring:oklch(0.439 0 0)}@layer base{*{@apply border-border outline-ring/50}body{@apply bg-background text-foreground}}
1
+ @import "tailwindcss";@import "tw-animate-css";@import "./system.css";@import "./scroll-bar.css";@import "quill/dist/quill.snow.css";@custom-variant dark (&:is(.dark *));@theme inline{--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary-foreground:var(--primary-foreground);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring);--color-chart-1:var(--chart-1);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4);--color-chart-5:var(--chart-5);--color-sidebar:var(--sidebar);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-border:var(--sidebar-border);--color-sidebar-ring:var(--sidebar-ring);--color-red:var(--red);--color-error:var(--error);--color-success:var(--success);--color-green:var(--green);--color-warning:var(--warning);--color-yellow:var(--yellow);--color-pink:var(--pink);--color-primary:var(--primary);--color-secondary:var(--secondary);--color-info:var(--info);--color-black:var(--black);--color-dark:var(--dark);--color-gray:var(--gray);--color-cloud:var(--cloud);--color-mercury:var(--mercury);--color-green-light:var(--green-light);--color-red-light:var(--red-light);--color-yellow-light:var(--yellow-light);--color-bright:var(--bright);--color-silver:var(--silver);--color-smoke:var(--smoke);--z-index-announce-tool:10;--z-index-dropdown:11;--z-index-overlay:12;--z-index-loading:13;--z-index-drawer:14;--z-index-modal:15;--z-index-toast:99998;--z-index-loading-page:99999}:root{--radius:0.625rem;--red:#b71c1c;--success:#43a047;--green:#1b5e20;--warning:#f9a825;--yellow:#fbc02d;--info:#e3f2fd;--black:#212121;--dark:#424242;--gray:#616161;--cloud:#c4c4c4;--mercury:#e0e0e0;--green-light:#e3f5e3;--red-light:#fde3e3;--yellow-light:#fef3c7;--bright:#f5f5f5;--silver:#f7f7f7;--smoke:#fafafa;--white:#fff;--pink:#ffe6f4;--background:var(--white);--foreground:var(--black);--card:var(--background);--card-foreground:var(--foreground);--popover:var(--background);--popover-foreground:var(--foreground);--primary:#1976b8;--primary-foreground:var(--white);--secondary:#22a7ef;--secondary-foreground:var(--white);--muted:oklch(0.97 0 0);--muted-foreground:var(--cloud);--accent:oklch(0.97 0 0);--accent-foreground:oklch(0.205 0 0);--destructive:#d32f2f;--destructive-foreground:var(--white);--border:var(--color-mercury);--input:var(--color-mercury);--ring:var(--mercury);--chart-1:oklch(0.646 0.222 41.116);--chart-2:oklch(0.6 0.118 184.704);--chart-3:oklch(0.398 0.07 227.392);--chart-4:oklch(0.828 0.189 84.429);--chart-5:oklch(0.769 0.188 70.08);--sidebar:oklch(0.985 0 0);--sidebar-foreground:var(--foreground);--sidebar-primary:oklch(0.205 0 0);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.97 0 0);--sidebar-accent-foreground:oklch(0.205 0 0);--sidebar-border:var(--color-mercury);--sidebar-ring:var(--color-mercury)}.dark{--background:oklch(0.145 0 0);--foreground:oklch(0.985 0 0);--card:oklch(0.145 0 0);--card-foreground:oklch(0.985 0 0);--popover:oklch(0.145 0 0);--popover-foreground:oklch(0.985 0 0);--primary:oklch(0.985 0 0);--primary-foreground:oklch(0.205 0 0);--secondary:oklch(0.269 0 0);--secondary-foreground:oklch(0.985 0 0);--muted:oklch(0.269 0 0);--muted-foreground:oklch(0.708 0 0);--accent:oklch(0.269 0 0);--accent-foreground:oklch(0.985 0 0);--destructive:oklch(0.396 0.141 25.723);--destructive-foreground:oklch(0.637 0.237 25.331);--border:oklch(0.269 0 0);--input:oklch(0.269 0 0);--ring:oklch(0.439 0 0);--chart-1:oklch(0.488 0.243 264.376);--chart-2:oklch(0.696 0.17 162.48);--chart-3:oklch(0.769 0.188 70.08);--chart-4:oklch(0.627 0.265 303.9);--chart-5:oklch(0.645 0.246 16.439);--sidebar:oklch(0.205 0 0);--sidebar-foreground:oklch(0.985 0 0);--sidebar-primary:oklch(0.488 0.243 264.376);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.269 0 0);--sidebar-accent-foreground:oklch(0.985 0 0);--sidebar-border:oklch(0.269 0 0);--sidebar-ring:oklch(0.439 0 0)}@layer base{*{@apply border-border outline-ring/50}body{@apply bg-background text-foreground}}
@@ -8,6 +8,7 @@ export interface DataTableProps {
8
8
  disabledSort?: boolean;
9
9
  disabledPagination?: boolean;
10
10
  totalPage?: number;
11
+ loading?: boolean;
11
12
  }
12
13
  type __VLS_Props = DataTableProps;
13
14
  type __VLS_ModelProps = {
@@ -19,25 +20,25 @@ declare var __VLS_13: {
19
20
  }, __VLS_32: {
20
21
  items: Record<string, any>[];
21
22
  header: TableHeader[];
22
- }, __VLS_48: {
23
+ }, __VLS_65: {
23
24
  item: Record<string, any>;
24
25
  header: TableHeader[];
25
26
  index: number;
26
- }, __VLS_57: `item-${string}`, __VLS_58: {
27
+ }, __VLS_74: `item-${string}`, __VLS_75: {
27
28
  item: Record<string, any>;
28
- }, __VLS_60: {}, __VLS_68: {};
29
+ }, __VLS_77: {}, __VLS_85: {};
29
30
  type __VLS_Slots = {} & {
30
- [K in NonNullable<typeof __VLS_57>]?: (props: typeof __VLS_58) => any;
31
+ [K in NonNullable<typeof __VLS_74>]?: (props: typeof __VLS_75) => any;
31
32
  } & {
32
33
  header?: (props: typeof __VLS_13) => any;
33
34
  } & {
34
35
  body?: (props: typeof __VLS_32) => any;
35
36
  } & {
36
- item?: (props: typeof __VLS_48) => any;
37
+ item?: (props: typeof __VLS_65) => any;
37
38
  } & {
38
- empty?: (props: typeof __VLS_60) => any;
39
+ empty?: (props: typeof __VLS_77) => any;
39
40
  } & {
40
- 'empty-content'?: (props: typeof __VLS_68) => any;
41
+ 'empty-content'?: (props: typeof __VLS_85) => any;
41
42
  };
42
43
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
44
  "update:page": (value: number) => any;
@@ -61,6 +62,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
61
62
  cellAlinement: TableHeaderAlignment;
62
63
  disabledHeader: boolean;
63
64
  disabledSort: boolean;
65
+ loading: boolean;
64
66
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
65
67
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
66
68
  declare const _default: typeof __VLS_export;
@@ -9,6 +9,7 @@ import {
9
9
  TableCell as ShadTableCell,
10
10
  TableEmpty as ShadTableEmpty
11
11
  } from "@/runtime/components/ui/table";
12
+ import { Skeleton } from "@/runtime/components/ui/skeleton";
12
13
  const emit = defineEmits(["select-page", "change-page", "click-row", "change-item-per-page"]);
13
14
  const props = defineProps({
14
15
  items: { type: Array, required: false, default: () => [] },
@@ -18,13 +19,15 @@ const props = defineProps({
18
19
  disabledHeader: { type: Boolean, required: false, default: false },
19
20
  disabledSort: { type: Boolean, required: false, default: false },
20
21
  disabledPagination: { type: Boolean, required: false, default: false },
21
- totalPage: { type: Number, required: false, default: 1 }
22
+ totalPage: { type: Number, required: false, default: 1 },
23
+ loading: { type: Boolean, required: false, default: false }
22
24
  });
23
25
  const page = defineModel("page", { type: Number, ...{
24
26
  default: 1
25
27
  } });
26
28
  const sortkey = ref("");
27
29
  const sortDesc = ref(false);
30
+ const itemPerPage = ref(10);
28
31
  const itemHeaders = computed(() => {
29
32
  if (props.itemHeader.length > 0) return props.itemHeader;
30
33
  if (props.items.length === 0) return [];
@@ -120,7 +123,20 @@ const getJustifyClass = (alignment = "start") => {
120
123
  <!-- Body -->
121
124
  <slot name="body" :items="sortedItems" :header="itemHeaders">
122
125
  <ShadTableBody>
123
- <template v-if="sortedItems.length > 0">
126
+ <!-- Loading Skeleton -->
127
+ <template v-if="props.loading">
128
+ <ShadTableRow v-for="row in itemPerPage" :key="`skeleton-${row}`">
129
+ <ShadTableCell
130
+ v-for="(header, i_header) in itemHeaders"
131
+ :key="`skeleton-cell-${row}-${i_header}`"
132
+ >
133
+ <Skeleton class="h-4 w-full" />
134
+ </ShadTableCell>
135
+ </ShadTableRow>
136
+ </template>
137
+
138
+ <!-- Data Rows -->
139
+ <template v-else-if="sortedItems.length > 0">
124
140
  <ShadTableRow
125
141
  v-for="(item, i_body) in sortedItems"
126
142
  :key="i_body"
@@ -170,7 +186,10 @@ const getJustifyClass = (alignment = "start") => {
170
186
  :totalPage="props.totalPage"
171
187
  v-model="page"
172
188
  @change-item-per-page="
173
- (val) => emit('change-item-per-page', val)
189
+ (val) => {
190
+ itemPerPage = val;
191
+ emit('change-item-per-page', val);
192
+ }
174
193
  "
175
194
  />
176
195
  </div>
@@ -8,6 +8,7 @@ export interface DataTableProps {
8
8
  disabledSort?: boolean;
9
9
  disabledPagination?: boolean;
10
10
  totalPage?: number;
11
+ loading?: boolean;
11
12
  }
12
13
  type __VLS_Props = DataTableProps;
13
14
  type __VLS_ModelProps = {
@@ -19,25 +20,25 @@ declare var __VLS_13: {
19
20
  }, __VLS_32: {
20
21
  items: Record<string, any>[];
21
22
  header: TableHeader[];
22
- }, __VLS_48: {
23
+ }, __VLS_65: {
23
24
  item: Record<string, any>;
24
25
  header: TableHeader[];
25
26
  index: number;
26
- }, __VLS_57: `item-${string}`, __VLS_58: {
27
+ }, __VLS_74: `item-${string}`, __VLS_75: {
27
28
  item: Record<string, any>;
28
- }, __VLS_60: {}, __VLS_68: {};
29
+ }, __VLS_77: {}, __VLS_85: {};
29
30
  type __VLS_Slots = {} & {
30
- [K in NonNullable<typeof __VLS_57>]?: (props: typeof __VLS_58) => any;
31
+ [K in NonNullable<typeof __VLS_74>]?: (props: typeof __VLS_75) => any;
31
32
  } & {
32
33
  header?: (props: typeof __VLS_13) => any;
33
34
  } & {
34
35
  body?: (props: typeof __VLS_32) => any;
35
36
  } & {
36
- item?: (props: typeof __VLS_48) => any;
37
+ item?: (props: typeof __VLS_65) => any;
37
38
  } & {
38
- empty?: (props: typeof __VLS_60) => any;
39
+ empty?: (props: typeof __VLS_77) => any;
39
40
  } & {
40
- 'empty-content'?: (props: typeof __VLS_68) => any;
41
+ 'empty-content'?: (props: typeof __VLS_85) => any;
41
42
  };
42
43
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
44
  "update:page": (value: number) => any;
@@ -61,6 +62,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
61
62
  cellAlinement: TableHeaderAlignment;
62
63
  disabledHeader: boolean;
63
64
  disabledSort: boolean;
65
+ loading: boolean;
64
66
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
65
67
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
66
68
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from "vue";
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes["class"];
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,13 @@
1
+ <script setup>
2
+ import { cn } from "@/runtime/plugins/shadcn";
3
+ const props = defineProps({
4
+ class: { type: null, required: false }
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <div
10
+ data-slot="skeleton"
11
+ :class="cn('animate-pulse rounded-md bg-gray-200', props.class)"
12
+ />
13
+ </template>
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from "vue";
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes["class"];
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Skeleton } from "./Skeleton.vue.js";
@@ -0,0 +1 @@
1
+ export { default as Skeleton } from "./Skeleton.vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.150.0",
3
+ "version": "1.152.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",