pukaad-ui-lib 1.210.1 → 1.211.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.210.1",
4
+ "version": "1.211.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -18,41 +18,37 @@ type __VLS_ModelProps = {
18
18
  "selected"?: Record<string, any>[];
19
19
  };
20
20
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
- declare var __VLS_1: {
22
- selected: Record<string, any>[];
23
- }, __VLS_15: {
21
+ declare var __VLS_13: {
24
22
  item: TableHeader[];
25
- }, __VLS_43: `header-${string}`, __VLS_44: {
23
+ }, __VLS_41: `header-${string}`, __VLS_42: {
26
24
  header: TableHeader;
27
25
  onSort: () => void;
28
26
  isSorted: boolean;
29
27
  sortDesc: boolean;
30
- }, __VLS_51: {
28
+ }, __VLS_49: {
31
29
  items: Record<string, any>[];
32
30
  header: TableHeader[];
33
- }, __VLS_99: {
31
+ }, __VLS_97: {
34
32
  item: Record<string, any>;
35
33
  header: TableHeader[];
36
34
  index: number;
37
- }, __VLS_108: `item-${string}`, __VLS_109: {
35
+ }, __VLS_106: `item-${string}`, __VLS_107: {
38
36
  item: Record<string, any>;
39
- }, __VLS_111: {}, __VLS_119: {};
37
+ }, __VLS_109: {}, __VLS_117: {};
40
38
  type __VLS_Slots = {} & {
41
- [K in NonNullable<typeof __VLS_43>]?: (props: typeof __VLS_44) => any;
39
+ [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
42
40
  } & {
43
- [K in NonNullable<typeof __VLS_108>]?: (props: typeof __VLS_109) => any;
41
+ [K in NonNullable<typeof __VLS_106>]?: (props: typeof __VLS_107) => any;
44
42
  } & {
45
- 'selection-actions'?: (props: typeof __VLS_1) => any;
43
+ header?: (props: typeof __VLS_13) => any;
46
44
  } & {
47
- header?: (props: typeof __VLS_15) => any;
45
+ body?: (props: typeof __VLS_49) => any;
48
46
  } & {
49
- body?: (props: typeof __VLS_51) => any;
47
+ item?: (props: typeof __VLS_97) => any;
50
48
  } & {
51
- item?: (props: typeof __VLS_99) => any;
49
+ empty?: (props: typeof __VLS_109) => any;
52
50
  } & {
53
- empty?: (props: typeof __VLS_111) => any;
54
- } & {
55
- 'empty-content'?: (props: typeof __VLS_119) => any;
51
+ 'empty-content'?: (props: typeof __VLS_117) => any;
56
52
  };
57
53
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
54
  "update:page": (value: number) => any;
@@ -115,15 +115,6 @@ const getJustifyClass = (alignment = "start") => {
115
115
  <template>
116
116
  <div class="bg-white rounded-lg h-full flex flex-col">
117
117
  <!-- Selection Action Bar -->
118
- <div
119
- v-if="props.selectable && selected.length > 0"
120
- class="flex items-center gap-3 px-4 py-2 bg-primary rounded-t-lg"
121
- >
122
- <span class="font-body-medium text-white">
123
- เลือก {{ selected.length }} รายการ
124
- </span>
125
- <slot name="selection-actions" :selected="selected" />
126
- </div>
127
118
 
128
119
  <!-- Table Container -->
129
120
  <div class="flex-1 overflow-auto">
@@ -136,7 +127,9 @@ const getJustifyClass = (alignment = "start") => {
136
127
  <ShadTableHead v-if="props.selectable" class="w-12">
137
128
  <div class="flex items-center justify-center">
138
129
  <InputCheckbox
139
- :model-value="isIndeterminate ? 'indeterminate' : isAllSelected"
130
+ :model-value="
131
+ isIndeterminate ? 'indeterminate' : isAllSelected
132
+ "
140
133
  @update:model-value="() => toggleAll()"
141
134
  />
142
135
  </div>
@@ -208,7 +201,9 @@ const getJustifyClass = (alignment = "start") => {
208
201
  v-for="(item, i_body) in sortedItems"
209
202
  :key="i_body"
210
203
  class="cursor-pointer"
211
- :data-state="props.selectable && isSelected(item) ? 'selected' : void 0"
204
+ :data-state="
205
+ props.selectable && isSelected(item) ? 'selected' : void 0
206
+ "
212
207
  @click="emit('click-row', item, i_body)"
213
208
  >
214
209
  <!-- Checkbox per row -->
@@ -233,6 +228,11 @@ const getJustifyClass = (alignment = "start") => {
233
228
  :class="
234
229
  getAlignmentClass(header.alignment || props.cellAlignment)
235
230
  "
231
+ :style="{
232
+ width: header.width ? typeof header.width === 'number' ? `${header.width}px` : header.width : void 0,
233
+ minWidth: header.minWidth ? typeof header.minWidth === 'number' ? `${header.minWidth}px` : header.minWidth : void 0,
234
+ maxWidth: header.maxWidth ? typeof header.maxWidth === 'number' ? `${header.maxWidth}px` : header.maxWidth : header.width ? typeof header.width === 'number' ? `${header.width}px` : header.width : header.minWidth ? typeof header.minWidth === 'number' ? `${header.minWidth}px` : header.minWidth : void 0
235
+ }"
236
236
  >
237
237
  <slot :name="`item-${header.key}`" :item="item">
238
238
  {{ item[header.key] }}
@@ -18,41 +18,37 @@ type __VLS_ModelProps = {
18
18
  "selected"?: Record<string, any>[];
19
19
  };
20
20
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
- declare var __VLS_1: {
22
- selected: Record<string, any>[];
23
- }, __VLS_15: {
21
+ declare var __VLS_13: {
24
22
  item: TableHeader[];
25
- }, __VLS_43: `header-${string}`, __VLS_44: {
23
+ }, __VLS_41: `header-${string}`, __VLS_42: {
26
24
  header: TableHeader;
27
25
  onSort: () => void;
28
26
  isSorted: boolean;
29
27
  sortDesc: boolean;
30
- }, __VLS_51: {
28
+ }, __VLS_49: {
31
29
  items: Record<string, any>[];
32
30
  header: TableHeader[];
33
- }, __VLS_99: {
31
+ }, __VLS_97: {
34
32
  item: Record<string, any>;
35
33
  header: TableHeader[];
36
34
  index: number;
37
- }, __VLS_108: `item-${string}`, __VLS_109: {
35
+ }, __VLS_106: `item-${string}`, __VLS_107: {
38
36
  item: Record<string, any>;
39
- }, __VLS_111: {}, __VLS_119: {};
37
+ }, __VLS_109: {}, __VLS_117: {};
40
38
  type __VLS_Slots = {} & {
41
- [K in NonNullable<typeof __VLS_43>]?: (props: typeof __VLS_44) => any;
39
+ [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
42
40
  } & {
43
- [K in NonNullable<typeof __VLS_108>]?: (props: typeof __VLS_109) => any;
41
+ [K in NonNullable<typeof __VLS_106>]?: (props: typeof __VLS_107) => any;
44
42
  } & {
45
- 'selection-actions'?: (props: typeof __VLS_1) => any;
43
+ header?: (props: typeof __VLS_13) => any;
46
44
  } & {
47
- header?: (props: typeof __VLS_15) => any;
45
+ body?: (props: typeof __VLS_49) => any;
48
46
  } & {
49
- body?: (props: typeof __VLS_51) => any;
47
+ item?: (props: typeof __VLS_97) => any;
50
48
  } & {
51
- item?: (props: typeof __VLS_99) => any;
49
+ empty?: (props: typeof __VLS_109) => any;
52
50
  } & {
53
- empty?: (props: typeof __VLS_111) => any;
54
- } & {
55
- 'empty-content'?: (props: typeof __VLS_119) => any;
51
+ 'empty-content'?: (props: typeof __VLS_117) => any;
56
52
  };
57
53
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
54
  "update:page": (value: number) => any;
@@ -64,7 +64,6 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
64
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
65
65
  src: string;
66
66
  center: boolean;
67
- background: boolean;
68
67
  modal: boolean;
69
68
  responsive: boolean;
70
69
  restore: boolean;
@@ -73,6 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
73
72
  crossorigin: "" | "anonymous" | "use-credentials";
74
73
  guides: boolean;
75
74
  highlight: boolean;
75
+ background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -64,7 +64,6 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
64
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
65
65
  src: string;
66
66
  center: boolean;
67
- background: boolean;
68
67
  modal: boolean;
69
68
  responsive: boolean;
70
69
  restore: boolean;
@@ -73,6 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
73
72
  crossorigin: "" | "anonymous" | "use-credentials";
74
73
  guides: boolean;
75
74
  highlight: boolean;
75
+ background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
35
35
  fullHeight: boolean;
36
36
  name: string;
37
37
  limit: number;
38
- disabledErrorMessage: boolean;
39
38
  accept: string;
39
+ disabledErrorMessage: boolean;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
42
42
  column: boolean;
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
35
35
  fullHeight: boolean;
36
36
  name: string;
37
37
  limit: number;
38
- disabledErrorMessage: boolean;
39
38
  accept: string;
39
+ disabledErrorMessage: boolean;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
42
42
  column: boolean;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  }>, {
23
23
  id: string;
24
24
  name: string;
25
- new: boolean;
26
25
  disabledForgotPassword: boolean;
26
+ new: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  }>, {
23
23
  id: string;
24
24
  name: string;
25
- new: boolean;
26
25
  disabledForgotPassword: boolean;
26
+ new: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  label: string;
13
13
  color: InputSliderColor;
14
14
  fullWidth: boolean;
15
+ step: number;
15
16
  max: number;
16
17
  min: number;
17
- step: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  label: string;
13
13
  color: InputSliderColor;
14
14
  fullWidth: boolean;
15
+ step: number;
15
16
  max: number;
16
17
  min: number;
17
- step: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
25
25
  "onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
26
26
  }>, {
27
27
  name: string;
28
- placeholder: string;
29
28
  state: "user" | "admin";
29
+ placeholder: string;
30
30
  limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
25
25
  "onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
26
26
  }>, {
27
27
  name: string;
28
- placeholder: string;
29
28
  state: "user" | "admin";
29
+ placeholder: string;
30
30
  limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
24
24
  }) => any) | undefined;
25
25
  }>, {
26
26
  title: string;
27
- disabledForgotPassword: boolean;
28
27
  confirmText: string;
28
+ disabledForgotPassword: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
24
24
  }) => any) | undefined;
25
25
  }>, {
26
26
  title: string;
27
- disabledForgotPassword: boolean;
28
27
  confirmText: string;
28
+ disabledForgotPassword: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
28
28
  }>, {
29
29
  title: string;
30
30
  mode: "login" | "secure";
31
- disabledForgotPassword: boolean;
32
31
  confirmText: string;
32
+ disabledForgotPassword: boolean;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  export default _default;
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
28
28
  }>, {
29
29
  title: string;
30
30
  mode: "login" | "secure";
31
- disabledForgotPassword: boolean;
32
31
  confirmText: string;
32
+ disabledForgotPassword: boolean;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.210.1",
3
+ "version": "1.211.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",