pukaad-ui-lib 1.210.0 → 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.0",
4
+ "version": "1.211.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17" fill="none">
2
+ <g clip-path="url(#clip0_6644_10663)">
3
+ <path d="M14.1667 3.98438C14.1667 5.79727 11.6285 9.02793 10.5139 10.3594C10.2465 10.6781 9.75 10.6781 9.48611 10.3594C8.37153 9.02793 5.83333 5.79727 5.83333 3.98438C5.83333 1.78301 7.69792 0 10 0C12.3021 0 14.1667 1.78301 14.1667 3.98438ZM14.4444 6.65391C14.566 6.42481 14.6771 6.1957 14.7778 5.96992C14.7951 5.93008 14.8125 5.88691 14.8299 5.84707L18.8576 4.30645C19.4062 4.09727 20 4.48242 20 5.04688V14.0383C20 14.3637 19.7917 14.6559 19.4757 14.7787L14.4444 16.7012V6.65391ZM4.77778 4.59199C4.86111 5.06016 5.02778 5.53164 5.22222 5.96992C5.32292 6.1957 5.43403 6.42481 5.55556 6.65391V15.0012L1.14236 16.6912C0.59375 16.9004 0 16.5152 0 15.9508V6.95938C0 6.63399 0.208333 6.3418 0.524306 6.21895L4.78125 4.59199H4.77778ZM11.3819 11.0234C11.8646 10.4457 12.6215 9.50606 13.3333 8.4668V16.7443L6.66667 14.9215V8.4668C7.37847 9.50606 8.13542 10.4457 8.61806 11.0234C9.32986 11.8734 10.6701 11.8734 11.3819 11.0234ZM10 5.04688C10.3684 5.04688 10.7216 4.90695 10.9821 4.65788C11.2426 4.4088 11.3889 4.07099 11.3889 3.71875C11.3889 3.36651 11.2426 3.0287 10.9821 2.77962C10.7216 2.53055 10.3684 2.39063 10 2.39063C9.63164 2.39063 9.27837 2.53055 9.01791 2.77962C8.75744 3.0287 8.61111 3.36651 8.61111 3.71875C8.61111 4.07099 8.75744 4.4088 9.01791 4.65788C9.27837 4.90695 9.63164 5.04688 10 5.04688Z" fill="#1976B8"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_6644_10663">
7
+ <rect width="20" height="17" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -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,12 +64,12 @@ 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
+ modal: boolean;
67
68
  responsive: boolean;
68
69
  restore: boolean;
69
70
  checkCrossOrigin: boolean;
70
71
  checkOrientation: boolean;
71
72
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
73
  guides: boolean;
74
74
  highlight: boolean;
75
75
  background: boolean;
@@ -64,12 +64,12 @@ 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
+ modal: boolean;
67
68
  responsive: boolean;
68
69
  restore: boolean;
69
70
  checkCrossOrigin: boolean;
70
71
  checkOrientation: boolean;
71
72
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
73
  guides: boolean;
74
74
  highlight: boolean;
75
75
  background: 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;
@@ -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.0",
3
+ "version": "1.211.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",