pukaad-ui-lib 1.310.0 → 1.311.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.310.0",
4
+ "version": "1.311.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  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;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  highlight: boolean;
75
- background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -1,20 +1,17 @@
1
1
  import type { InputRatingProps } from "#pukaad-ui/types/components/input/input-rating";
2
- type __VLS_Props = InputRatingProps;
3
- declare const ratingValue: import("vue").ModelRef<number, string, number, number>;
4
- type __VLS_ModelProps = {
5
- modelValue?: typeof ratingValue['value'];
2
+ type __VLS_Props = InputRatingProps & {
3
+ modelValue?: number;
6
4
  };
7
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- "update:modelValue": (value: number) => any;
10
- } & {
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
6
  select: (value: number) => any;
12
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
7
+ "update:modelValue": (value: number) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
9
  onSelect?: ((value: number) => any) | undefined;
14
10
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
15
11
  }>, {
16
12
  size: number;
17
13
  borderColor: string;
14
+ modelValue: number;
18
15
  backgroundColor: string;
19
16
  readonly: boolean;
20
17
  ratingStep: number;
@@ -46,7 +46,7 @@
46
46
 
47
47
  <script setup>
48
48
  import { computed } from "vue";
49
- const emit = defineEmits(["select"]);
49
+ const emit = defineEmits(["select", "update:modelValue"]);
50
50
  const props = defineProps({
51
51
  readonly: { type: Boolean, required: false, default: false },
52
52
  ratingStep: { type: Number, required: false, default: 1 },
@@ -54,21 +54,19 @@ const props = defineProps({
54
54
  borderSize: { type: Number, required: false, default: 0 },
55
55
  borderColor: { type: String, required: false, default: "#fbc02d" },
56
56
  backgroundColor: { type: String, required: false, default: "#c4c4c4" },
57
- activeColor: { type: String, required: false, default: "#fbc02d" }
58
- });
59
- const ratingValue = defineModel({
60
- type: Number,
61
- default: 0
57
+ activeColor: { type: String, required: false, default: "#fbc02d" },
58
+ modelValue: { type: Number, required: false, default: 0 }
62
59
  });
63
60
  const uid = Math.random().toString(36).slice(2, 7);
61
+ const ratingVal = computed(() => props.modelValue ?? 0);
64
62
  const getFill = (n) => {
65
- const val = ratingValue.value;
63
+ const val = ratingVal.value;
66
64
  if (val >= n) return 100;
67
65
  if (val < n - 1) return 0;
68
66
  return Math.round((val - (n - 1)) * 100);
69
67
  };
70
68
  const onSelect = (value) => {
71
- ratingValue.value = value;
69
+ emit("update:modelValue", value);
72
70
  emit("select", value);
73
71
  };
74
72
  </script>
@@ -1,20 +1,17 @@
1
1
  import type { InputRatingProps } from "#pukaad-ui/types/components/input/input-rating";
2
- type __VLS_Props = InputRatingProps;
3
- declare const ratingValue: import("vue").ModelRef<number, string, number, number>;
4
- type __VLS_ModelProps = {
5
- modelValue?: typeof ratingValue['value'];
2
+ type __VLS_Props = InputRatingProps & {
3
+ modelValue?: number;
6
4
  };
7
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- "update:modelValue": (value: number) => any;
10
- } & {
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
6
  select: (value: number) => any;
12
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
7
+ "update:modelValue": (value: number) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
9
  onSelect?: ((value: number) => any) | undefined;
14
10
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
15
11
  }>, {
16
12
  size: number;
17
13
  borderColor: string;
14
+ modelValue: number;
18
15
  backgroundColor: string;
19
16
  readonly: boolean;
20
17
  ratingStep: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.310.0",
3
+ "version": "1.311.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",