@mythpe/quasar-ui-qui 0.3.44 → 0.3.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.3.44",
3
+ "version": "0.3.46",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -139,12 +139,12 @@ defineOptions({
139
139
  >
140
140
  <q-checkbox
141
141
  ref="input"
142
+ :model-value="value"
142
143
  v-bind="{
143
- ...theme,
144
- ...pluginOptions.checkbox,
144
+ ...theme as any,
145
+ ...pluginOptions.checkbox as any,
145
146
  checkedIcon: getProp('checkedIcon'),
146
147
  ...$attrs,
147
- modelValue: value,
148
148
  disable: viewMode === !0 ? !0 : disable,
149
149
  autocomplete: getAutocompleteAttribute || undefined,
150
150
  label: undefined,
@@ -0,0 +1,94 @@
1
+ <!--
2
+ - MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
3
+ - Email: mythpe@gmail.com
4
+ - Mobile: +966590470092
5
+ - Website: https://www.4myth.com
6
+ - Github: https://github.com/mythpe
7
+ -->
8
+
9
+ <script lang="ts" setup>
10
+
11
+ import { useFieldValue } from 'vee-validate'
12
+ import { computed } from 'vue'
13
+ import type { MInputSlots, MPhoneProps as Props } from '../../types'
14
+
15
+ interface P {
16
+ name: Props['name'];
17
+ countryPhone?: Props['countryPhone'];
18
+ readonly?: Props['readonly'];
19
+ viewModeValue?: Props['viewModeValue'];
20
+ mobile?: Props['mobile'];
21
+ auto?: Props['auto'];
22
+ col?: Props['col'];
23
+ xs?: Props['xs'];
24
+ sm?: Props['sm'];
25
+ md?: Props['md'];
26
+ lg?: Props['lg'];
27
+ xl?: Props['xl'];
28
+ }
29
+
30
+ const props = defineProps<P>()
31
+ const countryName = computed(() => props.countryPhone || `${props.name}_country`)
32
+ const countryValue = useFieldValue(countryName)
33
+ defineOptions({
34
+ name: 'MPhone',
35
+ inheritAttrs: !1
36
+ })
37
+ </script>
38
+
39
+ <template>
40
+ <MCol
41
+ :class="$attrs.class"
42
+ v-bind="{
43
+ auto: auto,
44
+ col: col,
45
+ xs: xs,
46
+ sm: sm,
47
+ md: md,
48
+ lg: lg,
49
+ xl: xl,
50
+ }"
51
+ >
52
+ <MRow col>
53
+ <MMobile
54
+ :mobile="mobile === undefined ? !1 : mobile"
55
+ :name="name"
56
+ input-class="ltr"
57
+ ltr
58
+ prepend-icon="ion-ios-phone-portrait"
59
+ type="text"
60
+ v-bind="{
61
+ ...$attrs,
62
+ col: readonly ? 12 : 7,
63
+ readonly: readonly ? !1 : !countryValue,
64
+ viewMode: readonly,
65
+ }"
66
+ >
67
+ <template
68
+ v-for="(_,slot) in $slots as Readonly<MInputSlots>"
69
+ :key="slot"
70
+ #[slot]
71
+ >
72
+ <slot :name="slot" />
73
+ </template>
74
+ </MMobile>
75
+ <MAxios
76
+ :autocomplete="false"
77
+ :class="{hidden: readonly}"
78
+ :name="countryName"
79
+ :prepend-icon="$q.screen.gt.xs ? 'ion-ios-keypad' : undefined"
80
+ :view-mode="readonly"
81
+ col
82
+ hide-bottom-space
83
+ hide-dropdown-icon
84
+ hide-empty-list
85
+ hide-hint
86
+ no-loading
87
+ option-label="code_label"
88
+ popup-content-class="m-select__popup-phone"
89
+ popup-no-route-dismiss
90
+ service="country.codes"
91
+ />
92
+ </MRow>
93
+ </MCol>
94
+ </template>
@@ -27,6 +27,7 @@ import MMobile from './MMobile.vue'
27
27
  import MOptions from './MOptions.vue'
28
28
  import MOtp from './MOtp.vue'
29
29
  import MPassword from './MPassword.vue'
30
+ import MPhone from './MPhone.vue'
30
31
  import MPicker from './MPicker.vue'
31
32
  import MRadio from './MRadio.vue'
32
33
  import MSelect from './MSelect.vue'
@@ -57,6 +58,7 @@ export {
57
58
  MOptions,
58
59
  MOtp,
59
60
  MPassword,
61
+ MPhone,
60
62
  MPicker,
61
63
  MRadio,
62
64
  MSelect,
@@ -23,6 +23,7 @@ export const defineAsyncComponents = function (app: App) {
23
23
  app.component('MOptions', defineAsyncComponent(() => import('../components/form/MOptions.vue')))
24
24
  app.component('MOtp', defineAsyncComponent(() => import('../components/form/MOtp.vue')))
25
25
  app.component('MPassword', defineAsyncComponent(() => import('../components/form/MPassword.vue')))
26
+ app.component('MPhone', defineAsyncComponent(() => import('../components/form/MPhone.vue')))
26
27
  app.component('MPicker', defineAsyncComponent(() => import('../components/form/MPicker.vue')))
27
28
  app.component('MRadio', defineAsyncComponent(() => import('../components/form/MRadio.vue')))
28
29
  app.component('MSelect', defineAsyncComponent(() => import('../components/form/MSelect.vue')))
@@ -0,0 +1,16 @@
1
+ /*
2
+ * MyTh Ahmed Faiz Copyright © 2016-2025 All rights reserved.
3
+ * Email: mythpe@gmail.com
4
+ * Mobile: +966590470092
5
+ * Website: https://www.4myth.com
6
+ * Github: https://github.com/mythpe
7
+ */
8
+
9
+ import type { MInputProps } from './MInput'
10
+
11
+ export type MPhoneProps = MInputProps & {
12
+ /**
13
+ * Name of country phone. default: $name_country
14
+ */
15
+ countryPhone?: string;
16
+ }
@@ -52,6 +52,7 @@ import type { MInputLabelProps, MInputLabelSlots } from './api/MInputLabel'
52
52
  import type { MOptionsProps, MOptionsSlots } from './api/MOptions'
53
53
  import type { MOtpProps, MOtpSlots } from './api/MOtp'
54
54
  import type { MPasswordProps } from './api/MPassword'
55
+ import type { MPhoneProps } from './api/MPhone'
55
56
  import type { MPickerProps, MPickerSlots } from './api/MPicker'
56
57
  import type { MRadioProps, MRadioSlots } from './api/MRadio'
57
58
  import type { MTimeProps, MTimeSlots } from './api/MTime'
@@ -95,6 +96,7 @@ declare module '@vue/runtime-core' {
95
96
  MOptions: GlobalComponentConstructor<MOptionsProps, MOptionsSlots>;
96
97
  MOtp: GlobalComponentConstructor<MOtpProps, MOtpSlots>;
97
98
  MPassword: GlobalComponentConstructor<MPasswordProps, MInputSlots>;
99
+ MPhone: GlobalComponentConstructor<MPhoneProps, MInputSlots>;
98
100
  MPicker: GlobalComponentConstructor<MPickerProps, MPickerSlots>;
99
101
  MRadio: GlobalComponentConstructor<MRadioProps, MRadioSlots>;
100
102
  MSelect: GlobalComponentConstructor<MSelectProps, MSelectSlots>;
@@ -90,6 +90,7 @@ export { MFileProps } from './api/MFile'
90
90
  export { MEditorSlots } from './api/MEditor'
91
91
  export { MEditorProps } from './api/MEditor'
92
92
  export { MPasswordProps } from './api/MPassword'
93
+ export { MPhoneProps } from './api/MPhone'
93
94
  export { MInputLabelSlots } from './api/MInputLabel'
94
95
  export { MInputLabelProps } from './api/MInputLabel'
95
96
  export { MInputSlots } from './api/MInput'