pukaad-ui-lib 1.48.0 → 1.50.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.48.0",
4
+ "version": "1.50.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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
  center: boolean;
66
66
  src: string;
67
- modal: boolean;
68
67
  responsive: boolean;
69
68
  restore: boolean;
70
69
  checkCrossOrigin: boolean;
71
70
  checkOrientation: boolean;
72
71
  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
  center: boolean;
66
66
  src: string;
67
- modal: boolean;
68
67
  responsive: boolean;
69
68
  restore: boolean;
70
69
  checkCrossOrigin: boolean;
71
70
  checkOrientation: boolean;
72
71
  crossorigin: "" | "anonymous" | "use-credentials";
72
+ modal: boolean;
73
73
  guides: boolean;
74
74
  highlight: boolean;
75
75
  background: boolean;
@@ -1,3 +1,20 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ import type { InputTextFieldProps } from "@/runtime/components/input/input-text-field.vue";
2
+ type __VLS_Props = InputTextFieldProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: string;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
8
+ setErrors: (errorMessage: string[]) => void;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
13
+ }>, {
14
+ label: string;
15
+ required: boolean;
16
+ name: string;
17
+ placeholder: string;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
19
  declare const _default: typeof __VLS_export;
3
20
  export default _default;
@@ -1,14 +1,52 @@
1
1
  <template>
2
- <!-- <InputTextField
2
+ <InputTextField
3
3
  ref="inputRef"
4
+ v-model="modelValue"
4
5
  :name="props.name"
5
6
  :label="props.label"
6
7
  :placeholder="props.placeholder"
7
8
  :required="props.required"
8
9
  :rules="rules"
9
- /> -->
10
+ />
10
11
  </template>
11
12
 
12
13
  <script setup>
13
-
14
+ import { ref } from "vue";
15
+ const modelValue = defineModel({ type: String, ...{
16
+ default: ""
17
+ } });
18
+ const props = defineProps({
19
+ id: { type: String, required: false },
20
+ name: { type: String, required: false, default: "email" },
21
+ disabled: { type: Boolean, required: false },
22
+ label: { type: String, required: false, default: "" },
23
+ rules: { type: [Object, String, Function], required: false },
24
+ readonly: { type: Boolean, required: false },
25
+ placeholder: { type: String, required: false, default: "\u0E2D\u0E35\u0E40\u0E21\u0E25" },
26
+ type: { type: String, required: false },
27
+ description: { type: String, required: false },
28
+ disabledErrorMessage: { type: Boolean, required: false },
29
+ disabledBorder: { type: Boolean, required: false },
30
+ required: { type: Boolean, required: false, default: false },
31
+ iconPrepend: { type: String, required: false },
32
+ iconAppend: { type: String, required: false },
33
+ showCounter: { type: Boolean, required: false },
34
+ limit: { type: Number, required: false },
35
+ defaultValue: { type: [String, Number], required: false },
36
+ modelValue: { type: [String, Number], required: false },
37
+ class: { type: null, required: false }
38
+ });
39
+ const inputRef = ref();
40
+ const rules = (v) => {
41
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
42
+ if (!v) return "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38 \u0E2D\u0E35\u0E40\u0E21\u0E25";
43
+ if (!emailRegex.test(v)) return "\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A \u0E2D\u0E35\u0E40\u0E21\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07";
44
+ return true;
45
+ };
46
+ const setErrors = (errorMessage) => {
47
+ inputRef.value.setErrors(errorMessage);
48
+ };
49
+ defineExpose({
50
+ setErrors
51
+ });
14
52
  </script>
@@ -1,3 +1,20 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ import type { InputTextFieldProps } from "@/runtime/components/input/input-text-field.vue";
2
+ type __VLS_Props = InputTextFieldProps;
3
+ type __VLS_ModelProps = {
4
+ modelValue?: string;
5
+ };
6
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
8
+ setErrors: (errorMessage: string[]) => void;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
13
+ }>, {
14
+ label: string;
15
+ required: boolean;
16
+ name: string;
17
+ placeholder: string;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
19
  declare const _default: typeof __VLS_export;
3
20
  export default _default;
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
18
18
  }>, {
19
19
  id: string;
20
20
  name: string;
21
- disabledForgotPassword: boolean;
22
21
  new: boolean;
22
+ disabledForgotPassword: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: typeof __VLS_export;
25
25
  export default _default;
@@ -103,7 +103,7 @@ const colorValidate = (valid) => {
103
103
  return "text-destructive";
104
104
  };
105
105
  const defaultRules = (v) => {
106
- if (!v) return "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19";
106
+ if (!v) return "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01\u0E43\u0E2B\u0E49\u0E04\u0E23\u0E1A";
107
107
  const isNotLength = v.length < 8 || v.length > 20;
108
108
  const isNotUppercase = !/[A-Z]/.test(v);
109
109
  const isNotNumber = !/\d/.test(v);
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
18
18
  }>, {
19
19
  id: string;
20
20
  name: string;
21
- disabledForgotPassword: boolean;
22
21
  new: boolean;
22
+ disabledForgotPassword: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: typeof __VLS_export;
25
25
  export default _default;
@@ -67,7 +67,7 @@ const modelValue = defineModel({ type: [String, Number], ...{
67
67
  const fieldRef = ref();
68
68
  const defaultRules = (v) => {
69
69
  if (!v && props.required) {
70
- return `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38 ${props.label}`;
70
+ return `\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01\u0E43\u0E2B\u0E49\u0E04\u0E23\u0E1A`;
71
71
  }
72
72
  return true;
73
73
  };
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  color: InputSliderColor;
13
13
  fullWidth: boolean;
14
14
  label: string;
15
- step: number;
16
15
  max: number;
17
16
  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
  color: InputSliderColor;
13
13
  fullWidth: boolean;
14
14
  label: string;
15
- step: number;
16
15
  max: number;
17
16
  min: number;
17
+ step: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -120,7 +120,7 @@ const modelValue = defineModel({ type: String, ...{
120
120
  const fieldRef = ref();
121
121
  const defaultRules = (v) => {
122
122
  if (!v && props.required) {
123
- return `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38 ${props.label}`;
123
+ return `\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01\u0E43\u0E2B\u0E49\u0E04\u0E23\u0E1A`;
124
124
  }
125
125
  if (props.limit > 0 && modelValue.value.length > props.limit) {
126
126
  return `\u0E08\u0E33\u0E19\u0E27\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 ${props.limit} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`;
@@ -100,7 +100,7 @@ const fieldRef = ref();
100
100
  const textareaRef = ref();
101
101
  const defaultRules = (v) => {
102
102
  if (!v && props.required) {
103
- return `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38 ${props.label || "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"}`;
103
+ return `\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01\u0E43\u0E2B\u0E49\u0E04\u0E23\u0E1A`;
104
104
  }
105
105
  if (props.limit > 0 && modelValue.value.length > props.limit) {
106
106
  return `\u0E08\u0E33\u0E19\u0E27\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 ${props.limit} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.48.0",
3
+ "version": "1.50.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",