pukaad-ui-lib 1.217.0 → 1.219.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.217.0",
4
+ "version": "1.219.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -244,6 +244,7 @@ const module$1 = defineNuxtModule({
244
244
  });
245
245
  });
246
246
  _nuxt.options.alias["@"] = resolver.resolve(".");
247
+ _nuxt.options.css.push("leaflet/dist/leaflet.css");
247
248
  _nuxt.options.css.push(resolver.resolve("./runtime/assets/css/main.css"));
248
249
  _nuxt.hook("vite:extendConfig", (config) => {
249
250
  config.plugins.push(tailwindcss());
@@ -1,6 +1,6 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17" fill="none">
2
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"/>
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="currentColor"/>
4
4
  </g>
5
5
  <defs>
6
6
  <clipPath id="clip0_6644_10663">
@@ -0,0 +1,21 @@
1
+ export interface PlaceAddress {
2
+ full_address?: string;
3
+ }
4
+ export interface PlaceItem {
5
+ id?: string;
6
+ business_name?: string;
7
+ description?: string;
8
+ address?: PlaceAddress;
9
+ rating?: number;
10
+ image_cover?: string;
11
+ review_count?: number;
12
+ like_count?: number;
13
+ }
14
+ type __VLS_Props = {
15
+ item?: PlaceItem;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ item: PlaceItem;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div class="flex gap-[16px] items-center">
3
+ <Image v-if="props.item?.image_cover" :src="props.item.image_cover" width="227" height="128"
4
+ class="rounded-[4px] flex-shrink-0 object-cover" />
5
+ <div v-else class="w-[227px] h-[128px] rounded-[4px] flex-shrink-0 bg-cloud flex items-center justify-center">
6
+ <Icon name="pukaad:map-location-dot" :size="36" class="text-gray" />
7
+ </div>
8
+ <div class="flex flex-col gap-[4px]">
9
+ <div v-if="props.item?.business_name" class="font-title-small-promient">
10
+ {{ props.item.business_name }}
11
+ </div>
12
+
13
+ <div class="flex items-center gap-[4px] font-body-medium text-gray">
14
+ <InputRating :size="10" readonly :model-value="props.item.rating || 0" />
15
+ <span v-if="props.item.review_count !== void 0" class="ml-[4px]">{{
16
+ convertNumber(props.item.review_count) }}</span>
17
+ <span v-if="props.item.review_count !== void 0 && props.item.like_count !== void 0">•</span>
18
+ <span v-if="props.item.like_count !== void 0">ถูกใจ {{ convertNumber(props.item.like_count)
19
+ }}</span>
20
+ </div>
21
+
22
+ <div v-if="props.item.address?.full_address" class="font-body-medium text-gray">
23
+ {{ props.item.address.full_address }}
24
+ </div>
25
+ <div v-if="props.item.description" class="font-body-medium text-gray line-clamp-2">
26
+ {{ props.item.description }}
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup>
33
+ import { useConvert } from "../../composables/useConvert";
34
+ const { convertNumber } = useConvert();
35
+ const props = defineProps({
36
+ item: { type: Object, required: false, default: () => ({}) }
37
+ });
38
+ </script>
@@ -0,0 +1,21 @@
1
+ export interface PlaceAddress {
2
+ full_address?: string;
3
+ }
4
+ export interface PlaceItem {
5
+ id?: string;
6
+ business_name?: string;
7
+ description?: string;
8
+ address?: PlaceAddress;
9
+ rating?: number;
10
+ image_cover?: string;
11
+ review_count?: number;
12
+ like_count?: number;
13
+ }
14
+ type __VLS_Props = {
15
+ item?: PlaceItem;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ item: PlaceItem;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -1,4 +1,3 @@
1
- import "leaflet/dist/leaflet.css";
2
1
  type __VLS_Props = {
3
2
  provinceId?: number;
4
3
  amphurId?: number;
@@ -8,7 +8,6 @@
8
8
 
9
9
  <script setup>
10
10
  import { ref, onMounted, watch } from "vue";
11
- import "leaflet/dist/leaflet.css";
12
11
  import { useThaiAddress } from "@/runtime/composables/useThaiAddress";
13
12
  import provincesGeoJson from "@/runtime/geo/provinces.json";
14
13
  import mapPinSvg from "@/runtime/assets/svg/map-pin.svg?raw";
@@ -39,6 +38,12 @@ onMounted(async () => {
39
38
  emits("update:latLng", { lat: e.latlng.lat, lng: e.latlng.lng });
40
39
  }
41
40
  });
41
+ const resizeObserver = new ResizeObserver(() => {
42
+ if (map) {
43
+ map.invalidateSize();
44
+ }
45
+ });
46
+ resizeObserver.observe(mapContainer.value);
42
47
  drawPolygon(L);
43
48
  }
44
49
  });
@@ -1,4 +1,3 @@
1
- import "leaflet/dist/leaflet.css";
2
1
  type __VLS_Props = {
3
2
  provinceId?: number;
4
3
  amphurId?: number;
@@ -64,15 +64,15 @@ 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
- modal: boolean;
69
67
  responsive: boolean;
70
68
  restore: boolean;
71
69
  checkCrossOrigin: boolean;
72
70
  checkOrientation: boolean;
73
71
  crossorigin: "" | "anonymous" | "use-credentials";
72
+ modal: boolean;
74
73
  guides: boolean;
75
74
  highlight: boolean;
75
+ background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -64,15 +64,15 @@ 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
- modal: boolean;
69
67
  responsive: boolean;
70
68
  restore: boolean;
71
69
  checkCrossOrigin: boolean;
72
70
  checkOrientation: boolean;
73
71
  crossorigin: "" | "anonymous" | "use-credentials";
72
+ modal: boolean;
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;
@@ -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.217.0",
3
+ "version": "1.219.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",