pukaad-ui-lib 1.255.0 → 1.257.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.255.0",
4
+ "version": "1.257.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <Drawer
3
3
  class="w-[748px]"
4
- title="เกี่ยวกับ"
4
+ title="ข้อมูลทั่วไป"
5
5
  :loading="loading"
6
6
  @close="onClose"
7
7
  disabled-auto-close
@@ -1,14 +1,14 @@
1
1
  <template>
2
- <InputTextField
3
- ref="inputTextFieldRef"
4
- v-bind="props"
5
- :rules="props.rules || defaultRules"
6
- v-model="modelValue"
7
- >
8
- <template v-for="(_, name) in $slots" v-slot:[name]="slotData">
9
- <slot :name="name" v-bind="slotData || {}" />
10
- </template>
11
- </InputTextField>
2
+ <InputTextField
3
+ ref="inputTextFieldRef"
4
+ v-bind="props"
5
+ :rules="props.rules || defaultRules"
6
+ v-model="modelValue"
7
+ >
8
+ <template v-for="(_, name) in $slots" v-slot:[name]="slotData">
9
+ <slot :name="name" v-bind="slotData || {}" />
10
+ </template>
11
+ </InputTextField>
12
12
  </template>
13
13
 
14
14
  <script setup>
@@ -41,6 +41,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
41
41
  readonly: boolean;
42
42
  disabledIcon: boolean;
43
43
  iconPosition: import("#pukaad-ui/types/components/input/input-search").InputSearchIconPosition;
44
+ roundedFull: boolean;
44
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
47
  declare const _default: typeof __VLS_export;
@@ -16,12 +16,17 @@
16
16
  </slot>
17
17
  </ShadFormLabel>
18
18
 
19
- <ShadInputGroup class="bg-white">
19
+ <ShadInputGroup
20
+ :class="[
21
+ 'bg-white overflow-hidden',
22
+ isRoundedFull ? 'rounded-full' : ''
23
+ ]"
24
+ >
20
25
  <ShadFormControl>
21
26
  <ShadInputGroupInput
22
27
  v-bind="componentField"
23
28
  :id="props.id || props.name"
24
- :class="props.class"
29
+ :class="[props.class]"
25
30
  :readonly="props.readonly"
26
31
  :disabled="props.disabled"
27
32
  :placeholder="props.placeholder"
@@ -71,11 +76,12 @@
71
76
  </template>
72
77
 
73
78
  <script setup>
74
- import { ref } from "vue";
79
+ import { ref, computed, getCurrentInstance } from "vue";
75
80
  const props = defineProps({
76
81
  disabledIcon: { type: Boolean, required: false, default: false },
77
82
  icon: { type: String, required: false, default: "streamline:magnifying-glass-solid" },
78
83
  iconPosition: { type: String, required: false, default: "right" },
84
+ roundedFull: { type: Boolean, required: false, default: false },
79
85
  id: { type: String, required: false, default: "input-search" },
80
86
  name: { type: String, required: false, default: "input-search" },
81
87
  disabled: { type: Boolean, required: false, default: false },
@@ -125,6 +131,11 @@ const setErrors = (errMsg) => {
125
131
  const validate = async () => {
126
132
  return await fieldRef.value?.validate?.();
127
133
  };
134
+ const isRoundedFull = computed(() => {
135
+ if (props.roundedFull === true || props.roundedFull === "") return true;
136
+ const attrs = getCurrentInstance()?.vnode.props || {};
137
+ return attrs.roundedFull !== void 0 && attrs.roundedFull !== false;
138
+ });
128
139
  defineExpose({
129
140
  setErrors,
130
141
  validate,
@@ -41,6 +41,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
41
41
  readonly: boolean;
42
42
  disabledIcon: boolean;
43
43
  iconPosition: import("#pukaad-ui/types/components/input/input-search").InputSearchIconPosition;
44
+ roundedFull: boolean;
44
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
47
  declare const _default: typeof __VLS_export;
@@ -12,6 +12,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
13
  onComplete?: ((state: ModalSecureState) => any) | undefined;
14
14
  }>, {
15
+ phone: string;
15
16
  email: string;
16
17
  twoFaEnabled: boolean;
17
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <component v-for="modal in modals" :key="modal.key" :is="modal.component" :email="props.email" mode="secure"
3
- @complete="(data) => handleComplete(modal.key, data)" :confirmed-text="isLastStep ? '\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19' : '\u0E16\u0E31\u0E14\u0E44\u0E1B'"
4
- @close="isOpen = false" v-model="modalStates[modal.key]" />
2
+ <component v-for="modal in modals" :key="modal.key" :is="modal.component" :email="props.email" :phone="props.phone"
3
+ mode="secure" @complete="(data) => handleComplete(modal.key, data)"
4
+ :confirmed-text="isLastStep ? '\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19' : '\u0E16\u0E31\u0E14\u0E44\u0E1B'" @close="isOpen = false" v-model="modalStates[modal.key]" />
5
5
  </template>
6
6
 
7
7
  <script setup>
@@ -20,6 +20,7 @@ const emit = defineEmits(["complete"]);
20
20
  const props = defineProps({
21
21
  state: { type: String, required: true },
22
22
  email: { type: String, required: false, default: "" },
23
+ phone: { type: String, required: false, default: "" },
23
24
  twoFaEnabled: { type: Boolean, required: true, default: false }
24
25
  });
25
26
  const isOpen = defineModel({ type: Boolean, ...{
@@ -12,6 +12,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
13
  onComplete?: ((state: ModalSecureState) => any) | undefined;
14
14
  }>, {
15
+ phone: string;
15
16
  email: string;
16
17
  twoFaEnabled: boolean;
17
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,14 +1,8 @@
1
1
  <template>
2
2
  <ShadDialog v-model:open="isOpen">
3
- <ShadDialogContent
4
- :class="props.class"
5
- :disabled-close-btn="props.disabledCloseBtn"
6
- :no-padding="props.disablePadding"
7
- :disable-outside-pointer-events="false"
8
- v-slot="{ meta }"
9
- @submit="onSubmit"
10
- @close="onClose"
11
- >
3
+ <ShadDialogContent :class="props.class" :disabled-close-btn="props.disabledCloseBtn"
4
+ :no-padding="props.disablePadding" :disable-outside-pointer-events="false" v-slot="{ meta }" @submit="onSubmit"
5
+ @close="onClose">
12
6
  <Loading :loading="props.loading" :text="props.loadingText" />
13
7
  <ShadDialogHeader :class="props.disablePadding ? 'bg-background' : ''">
14
8
  <slot name="header">
@@ -24,12 +18,9 @@
24
18
  </ShadDialogDescription>
25
19
  </slot>
26
20
  </ShadDialogHeader>
27
- <div
28
- :class="props.contentMaxHeight ? '-mx-6 px-6' : void 0"
29
- :style="
21
+ <div :class="props.contentMaxHeight ? '-mx-6 px-6' : void 0" :style="
30
22
  props.contentMaxHeight ? { maxHeight: `${props.contentMaxHeight}px`, overflowY: 'auto' } : void 0
31
- "
32
- >
23
+ ">
33
24
  <slot name="default" :meta="meta" />
34
25
  </div>
35
26
  <ShadDialogFooter v-if="$slots.footer">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.255.0",
3
+ "version": "1.257.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",