@mythpe/quasar-ui-qui 0.0.26 → 0.0.27-dev

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.
Files changed (92) hide show
  1. package/index.d.ts +13 -0
  2. package/package.json +15 -8
  3. package/src/boot/register.ts +14 -0
  4. package/src/components/datatable/MDatatable.vue +2305 -0
  5. package/src/components/datatable/MDtAvatar.vue +49 -0
  6. package/src/components/datatable/MDtBtn.vue +153 -0
  7. package/src/components/datatable/MDtContextmenuItems.vue +54 -0
  8. package/src/components/datatable/index.ts +6 -0
  9. package/src/components/form/MAvatarViewer.vue +327 -0
  10. package/src/components/form/MAxios.vue +144 -0
  11. package/src/components/form/MBtn.vue +271 -93
  12. package/src/components/form/MCheckbox.vue +150 -0
  13. package/src/components/form/MColor.vue +122 -0
  14. package/src/components/form/MDate.vue +50 -0
  15. package/src/components/form/MEditor.vue +285 -0
  16. package/src/components/form/MEmail.vue +43 -0
  17. package/src/components/form/MField.vue +148 -0
  18. package/src/components/form/MFile.vue +215 -0
  19. package/src/components/form/MForm.vue +89 -0
  20. package/src/components/form/MHidden.vue +86 -0
  21. package/src/components/form/MHiddenInput.vue +58 -0
  22. package/src/components/form/MInput.vue +178 -0
  23. package/src/components/form/MInputFieldControl.vue +27 -0
  24. package/src/components/form/MInputLabel.vue +38 -0
  25. package/src/components/form/MMobile.vue +43 -0
  26. package/src/components/form/MOptions.vue +255 -0
  27. package/src/components/form/MOtp.vue +292 -0
  28. package/src/components/form/MPassword.vue +73 -0
  29. package/src/components/form/MPicker.vue +313 -0
  30. package/src/components/form/MRadio.vue +181 -0
  31. package/src/components/form/MSelect.vue +352 -0
  32. package/src/components/form/MTime.vue +48 -0
  33. package/src/components/form/MToggle.vue +211 -0
  34. package/src/components/form/MUploader.vue +511 -0
  35. package/src/components/form/index.ts +63 -0
  36. package/src/components/grid/MBlock.vue +39 -18
  37. package/src/components/grid/MCol.vue +11 -15
  38. package/src/components/grid/MColumn.vue +12 -1
  39. package/src/components/grid/MContainer.vue +22 -13
  40. package/src/components/grid/MHelpRow.vue +13 -12
  41. package/src/components/grid/MRow.vue +31 -10
  42. package/src/components/grid/index.ts +16 -0
  43. package/src/components/index.ts +15 -0
  44. package/src/components/modal/MDialog.vue +58 -0
  45. package/src/components/modal/MModalMenu.vue +62 -0
  46. package/src/components/modal/MTooltip.vue +39 -0
  47. package/src/components/modal/index.ts +5 -0
  48. package/src/components/parials/UploaderItem.vue +298 -0
  49. package/src/components/parials/index.ts +3 -0
  50. package/src/components/transition/MFadeTransition.vue +27 -0
  51. package/src/components/transition/MFadeXTransition.vue +26 -0
  52. package/src/components/transition/MTransition.vue +44 -0
  53. package/src/components/transition/index.ts +13 -0
  54. package/src/components/typography/MTypingString.vue +8 -0
  55. package/src/components/typography/index.ts +11 -0
  56. package/src/composable/index.ts +12 -0
  57. package/src/composable/useBindInput.ts +209 -0
  58. package/src/composable/useError.ts +11 -0
  59. package/src/composable/useMyth.ts +311 -0
  60. package/src/composable/useValue.ts +12 -0
  61. package/src/index.common.js +19 -1
  62. package/src/index.esm.js +18 -3
  63. package/src/index.js +19 -0
  64. package/src/index.sass +9 -26
  65. package/src/index.ts +18 -4
  66. package/src/index.umd.js +17 -2
  67. package/src/style/m-container.sass +13 -0
  68. package/src/style/main.sass +146 -0
  69. package/src/style/print.sass +14 -0
  70. package/src/style/transition.sass +40 -0
  71. package/src/types/api-helpers.d.ts +62 -0
  72. package/src/types/components.d.ts +1075 -27
  73. package/src/types/index.d.ts +21 -1
  74. package/src/types/install-options.d.ts +19 -0
  75. package/src/types/lodash.d.ts +26 -0
  76. package/src/types/m-datatable.d.ts +316 -0
  77. package/src/types/m-geolocation.d.ts +16 -0
  78. package/src/types/m-helpers.d.ts +97 -0
  79. package/src/types/plugin-props-option.d.ts +301 -0
  80. package/src/types/quasar-helpers.d.ts +7 -0
  81. package/src/types/theme.d.ts +12 -0
  82. package/src/utils/Helpers.ts +293 -0
  83. package/src/utils/Str.ts +211 -0
  84. package/src/utils/index.ts +13 -0
  85. package/src/utils/myth.ts +109 -0
  86. package/src/utils/vee-rules.ts +32 -0
  87. package/src/utils/vue-plugin.ts +161 -0
  88. package/tsconfig.json +9 -13
  89. package/src/myth.ts +0 -30
  90. package/src/types/myth.ts +0 -42
  91. package/src/vue-plugin.ts +0 -41
  92. package/types.d.ts +0 -1
@@ -0,0 +1,150 @@
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
10
+ lang="ts"
11
+ setup
12
+ >
13
+ import { useField } from 'vee-validate'
14
+ import { reactive, toValue, useTemplateRef } from 'vue'
15
+ import { useBindInput, useMyth } from '../../composable'
16
+ import type { MCheckboxProps as Props } from '../../types'
17
+ import { QCheckbox, QField } from 'quasar'
18
+
19
+ const props = withDefaults(defineProps<Props>(), {
20
+ name: '',
21
+ label: undefined,
22
+ toggleIndeterminate: undefined,
23
+ leftLabel: undefined,
24
+ keepColor: undefined,
25
+ dark: undefined,
26
+ dense: undefined,
27
+ disable: undefined,
28
+ viewMode: undefined,
29
+ auto: undefined,
30
+ col: undefined,
31
+ xs: undefined,
32
+ sm: undefined,
33
+ md: undefined,
34
+ lg: undefined,
35
+ xl: undefined,
36
+ required: undefined,
37
+ autocomplete: undefined,
38
+ mobile: undefined,
39
+ email: undefined,
40
+ float: undefined,
41
+ useChoice: undefined
42
+ })
43
+ defineModel<Props['modelValue']>({ required: !1, default: undefined })
44
+ const { __ } = useMyth()
45
+ const helper = useBindInput<any>(() => props, 'checkbox')
46
+ const { getLabel, attrs, inputRules } = helper
47
+ const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
48
+ syncVModel: !0,
49
+ label: getLabel,
50
+ type: 'checkbox',
51
+ checkedValue: () => props.val,
52
+ ...toValue<any>(props.fieldOptions)
53
+ })
54
+ const { value, errorMessage, handleChange } = inputScope
55
+
56
+ const listeners = {
57
+ 'update:modelValue': (v: Props['modelValue']) => handleChange(v, !!errorMessage.value)
58
+ }
59
+ const input = useTemplateRef<InstanceType<typeof QCheckbox>>('input')
60
+ const scopes = reactive(inputScope)
61
+ defineExpose<typeof scopes & { input: typeof input }>({ input, ...scopes })
62
+ defineOptions({
63
+ name: 'MCheckbox',
64
+ inheritAttrs: !1
65
+ })
66
+ </script>
67
+
68
+ <template>
69
+ <MCol
70
+ :auto="auto"
71
+ :class="[$attrs.class,{'m--input__required':inputRules?.required!==undefined,'m--input__error':!!errorMessage,'m--input__view':viewMode}]"
72
+ :col="col"
73
+ :lg="lg"
74
+ :md="md"
75
+ :name="name"
76
+ :sm="sm"
77
+ :xs="xs"
78
+ >
79
+ <slot
80
+ name="top-input"
81
+ v-bind="scopes"
82
+ />
83
+ <slot name="caption">
84
+ <div
85
+ v-if="!!caption"
86
+ class="m--input__caption text-caption"
87
+ >
88
+ {{ __(caption) }}
89
+ </div>
90
+ </slot>
91
+ <MRow v-bind="rowProps">
92
+ <slot
93
+ name="before"
94
+ v-bind="scopes"
95
+ />
96
+ <MCol v-bind="colProps">
97
+ <q-field
98
+ v-bind="{
99
+ ...$props,
100
+ ...attrs,
101
+ error:!!errorMessage,
102
+ errorMessage,
103
+ hint:__(hint),
104
+ borderless: !0,
105
+ outlined: !1,
106
+ stackLabel: !0
107
+ }"
108
+ >
109
+ <q-checkbox
110
+ ref="input"
111
+ v-bind="{
112
+ ...$props,
113
+ ...attrs,
114
+ modelValue:value,
115
+ disable:viewMode,
116
+ label: undefined,
117
+ }"
118
+ v-on="listeners"
119
+ >
120
+ <template #default>
121
+ <MRow class="items-center">
122
+ <div
123
+ v-if="!!getLabel"
124
+ class="text-color"
125
+ >
126
+ {{ getLabel }}
127
+ </div>
128
+ <MHelpRow
129
+ v-if="!!help"
130
+ :right="!!getLabel"
131
+ :text="help"
132
+ tooltip
133
+ />
134
+ </MRow>
135
+ </template>
136
+ </q-checkbox>
137
+ </q-field>
138
+ <slot v-bind="scopes" />
139
+ </MCol>
140
+ <slot
141
+ name="after"
142
+ v-bind="scopes"
143
+ />
144
+ </MRow>
145
+ <slot
146
+ name="bottom-input"
147
+ v-bind="scopes"
148
+ />
149
+ </MCol>
150
+ </template>
@@ -0,0 +1,122 @@
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
10
+ lang="ts"
11
+ setup
12
+ >
13
+ import type { MInputProps as Props, MInputSlots } from '../../types'
14
+ import { reactive, toValue, useTemplateRef } from 'vue'
15
+ import { useField } from 'vee-validate'
16
+ import { useBindInput } from '../../composable'
17
+ import { QField, QInput } from 'quasar'
18
+
19
+ const props = withDefaults(defineProps<Props>(), {
20
+ name: () => '',
21
+ fillMask: undefined,
22
+ reverseFillMask: undefined,
23
+ unmaskedValue: undefined,
24
+ error: undefined,
25
+ noErrorIcon: undefined,
26
+ reactiveRules: undefined,
27
+ lazyRules: undefined,
28
+ stackLabel: undefined,
29
+ hideHint: undefined,
30
+ dark: undefined,
31
+ loading: undefined,
32
+ clearable: undefined,
33
+ filled: undefined,
34
+ outlined: undefined,
35
+ borderless: undefined,
36
+ standout: undefined,
37
+ labelSlot: undefined,
38
+ bottomSlots: undefined,
39
+ hideBottomSpace: undefined,
40
+ counter: undefined,
41
+ rounded: undefined,
42
+ square: undefined,
43
+ dense: undefined,
44
+ itemAligned: undefined,
45
+ disable: undefined,
46
+ readonly: undefined,
47
+ autofocus: undefined,
48
+ autogrow: undefined,
49
+ viewMode: undefined,
50
+ auto: undefined,
51
+ col: undefined,
52
+ xs: undefined,
53
+ sm: undefined,
54
+ md: undefined,
55
+ lg: undefined,
56
+ xl: undefined,
57
+ required: undefined,
58
+ autocomplete: undefined,
59
+ topLabel: undefined,
60
+ mobile: undefined,
61
+ email: undefined,
62
+ float: undefined
63
+ })
64
+ defineModel<Props['modelValue']>({ required: !1, default: undefined })
65
+ const helper = useBindInput<Props>(() => props, 'input')
66
+ const { getLabel, inputRules, attrs } = helper
67
+ const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
68
+ syncVModel: !0,
69
+ label: getLabel,
70
+ ...toValue<any>(props.fieldOptions)
71
+ })
72
+ const { value, errorMessage, handleChange, handleBlur } = inputScope
73
+
74
+ const listeners = {
75
+ blur: (v: any) => handleBlur(v, !0),
76
+ 'update:modelValue': (v: Props['modelValue']) => handleChange(v, !!errorMessage.value)
77
+ }
78
+ const input = useTemplateRef<InstanceType<typeof QInput> | InstanceType<typeof QField>>('input')
79
+ const scopes = reactive(inputScope)
80
+ defineExpose<typeof scopes & { input: typeof input }>({ input, ...scopes })
81
+ defineOptions({
82
+ name: 'MColor',
83
+ inheritAttrs: !1
84
+ })
85
+
86
+ </script>
87
+
88
+ <template>
89
+ <MInput
90
+ ref="input"
91
+ v-bind="{...$props,...attrs,rules:inputRules,modelValue:value}"
92
+ v-on="listeners"
93
+ >
94
+ <template #prepend>
95
+ <div
96
+ :style="`width: 20px; height: 20px; background-color: ${value};`"
97
+ class="m--input__color-preview"
98
+ />
99
+ </template>
100
+ <template #append>
101
+ <q-icon
102
+ class="cursor-pointer"
103
+ name="colorize"
104
+ >
105
+ <q-popup-proxy
106
+ cover
107
+ transition-hide="scale"
108
+ transition-show="scale"
109
+ >
110
+ <q-color v-model="value" />
111
+ </q-popup-proxy>
112
+ </q-icon>
113
+ </template>
114
+ <template
115
+ v-for="(_,slot) in $slots as Readonly<MInputSlots>"
116
+ :key="slot"
117
+ #[slot]
118
+ >
119
+ <slot :name="slot" />
120
+ </template>
121
+ </MInput>
122
+ </template>
@@ -0,0 +1,50 @@
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
10
+ lang="ts"
11
+ setup
12
+ >
13
+ import type { MDateProps as Props, MInputSlots } from '../../types'
14
+ import { useTemplateRef } from 'vue'
15
+ import MPicker from './MPicker.vue'
16
+
17
+ type P = {
18
+ name: Props['name'];
19
+ rules?: Props['rules'];
20
+ }
21
+ withDefaults(defineProps<P>(), {
22
+ name: () => '',
23
+ rules: undefined
24
+ })
25
+ const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
26
+ const input = useTemplateRef<InstanceType<typeof MPicker>>('input')
27
+ defineExpose<{
28
+ input: typeof input
29
+ }>({ input })
30
+ defineOptions({
31
+ name: 'MDate',
32
+ inheritAttrs: !1
33
+ })
34
+ </script>
35
+
36
+ <template>
37
+ <MPicker
38
+ ref="input"
39
+ v-model="modelValue"
40
+ v-bind="{...$attrs,type:'date',name}"
41
+ >
42
+ <template
43
+ v-for="(_,slot) in $slots as Readonly<MInputSlots>"
44
+ :key="slot"
45
+ #[slot]
46
+ >
47
+ <slot :name="slot" />
48
+ </template>
49
+ </MPicker>
50
+ </template>
@@ -0,0 +1,285 @@
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
10
+ lang="ts"
11
+ setup
12
+ >
13
+ import { QEditor, QField, useQuasar } from 'quasar'
14
+ import { useBindInput, useMyth } from '../../composable'
15
+ import { useField } from 'vee-validate'
16
+ import type { MEditorProps as Props } from '../../types'
17
+ import { reactive, toValue, useTemplateRef } from 'vue'
18
+ import { myth } from '../../utils'
19
+
20
+ const $q = useQuasar()
21
+ const _toolbar = [
22
+ [
23
+ // {
24
+ // label: $q.lang.editor.align,
25
+ // icon: $q.iconSet.editor.align,
26
+ // fixedLabel: true,
27
+ // list: 'only-icons',
28
+ // options: ['left', 'center', 'right', 'justify']
29
+ // },
30
+ {
31
+ label: $q.lang.editor.align,
32
+ icon: $q.iconSet.editor.align,
33
+ fixedLabel: true,
34
+ options: ['left', 'center', 'right', 'justify']
35
+ }
36
+ ],
37
+ ['bold', 'italic', 'strike', 'underline', 'subscript', 'superscript'],
38
+ ['hr', 'link', 'print', 'fullscreen'],
39
+ [
40
+ {
41
+ label: $q.lang.editor.formatting,
42
+ icon: $q.iconSet.editor.formatting,
43
+ list: 'no-icons',
44
+ options: [
45
+ 'p',
46
+ 'h1',
47
+ 'h2',
48
+ 'h3',
49
+ 'h4',
50
+ 'h5',
51
+ 'h6',
52
+ 'code'
53
+ ]
54
+ },
55
+ {
56
+ label: $q.lang.editor.fontSize,
57
+ icon: $q.iconSet.editor.fontSize,
58
+ fixedLabel: true,
59
+ fixedIcon: true,
60
+ list: 'no-icons',
61
+ options: [
62
+ 'size-1',
63
+ 'size-2',
64
+ 'size-3',
65
+ 'size-4',
66
+ 'size-5',
67
+ 'size-6',
68
+ 'size-7'
69
+ ]
70
+ },
71
+ {
72
+ label: $q.lang.editor.fontSize,
73
+ icon: $q.iconSet.editor.fontSize,
74
+ fixedLabel: true,
75
+ fixedIcon: true,
76
+ list: 'no-icons',
77
+ options: [
78
+ 'size-1',
79
+ 'size-2',
80
+ 'size-3',
81
+ 'size-4',
82
+ 'size-5',
83
+ 'size-6',
84
+ 'size-7'
85
+ ]
86
+ },
87
+ {
88
+ label: $q.lang.editor.defaultFont,
89
+ icon: $q.iconSet.editor.font,
90
+ fixedIcon: true,
91
+ list: 'no-icons',
92
+ options: [
93
+ 'default_font',
94
+ 'arial',
95
+ 'arial_black',
96
+ 'comic_sans',
97
+ 'courier_new',
98
+ 'impact',
99
+ 'lucida_grande',
100
+ 'times_new_roman',
101
+ 'verdana'
102
+ ]
103
+ },
104
+ 'removeFormat'
105
+ ],
106
+ ['quote', 'unordered', 'ordered', 'outdent', 'indent'],
107
+ ['undo', 'redo'],
108
+ ['viewsource']
109
+ ]
110
+ const _fonts = {
111
+ arial: 'Arial',
112
+ arial_black: 'Arial Black',
113
+ comic_sans: 'Comic Sans MS',
114
+ courier_new: 'Courier New',
115
+ impact: 'Impact',
116
+ lucida_grande: 'Lucida Grande',
117
+ times_new_roman: 'Times New Roman',
118
+ verdana: 'Verdana'
119
+ }
120
+ const _definitions = {
121
+ colors: {
122
+ label: 'Colors',
123
+ tip: 'Change the text & background colors',
124
+ icon: 'colorize'
125
+ }
126
+ }
127
+
128
+ interface P {
129
+ auto?: Props['auto'];
130
+ col?: Props['col'];
131
+ xs?: Props['xs'];
132
+ sm?: Props['sm'];
133
+ md?: Props['md'];
134
+ lg?: Props['lg'];
135
+ xl?: Props['xl'];
136
+ minHeight?: Props['minHeight'];
137
+ name: Props['name'];
138
+ label?: Props['label'];
139
+ caption?: Props['caption'];
140
+ hint?: Props['hint'];
141
+ placeholder?: Props['placeholder'];
142
+ help?: Props['help'];
143
+ dense?: Props['dense'];
144
+ toolbar?: Props['toolbar'];
145
+ fonts?: Props['fonts'];
146
+ rules?: Props['rules'];
147
+ viewMode?: Props['viewMode'];
148
+ topLabel?: Props['topLabel'];
149
+ required?: Props['required'];
150
+ fieldOptions?: Props['fieldOptions'];
151
+ useChoice?: Props['useChoice'];
152
+ }
153
+
154
+ const props = withDefaults(defineProps<P>(), {
155
+ auto: undefined,
156
+ col: undefined,
157
+ xs: undefined,
158
+ sm: undefined,
159
+ md: undefined,
160
+ lg: undefined,
161
+ xl: undefined,
162
+ minHeight: () => '10rem',
163
+ name: () => '',
164
+ label: undefined,
165
+ caption: undefined,
166
+ hint: undefined,
167
+ placeholder: undefined,
168
+ help: undefined,
169
+ dense: undefined,
170
+ toolbar: undefined,
171
+ fonts: undefined,
172
+ rules: undefined,
173
+ topLabel: undefined,
174
+ viewMode: undefined,
175
+ required: undefined,
176
+ fieldOptions: undefined,
177
+ useChoice: undefined
178
+ })
179
+ const { __ } = useMyth()
180
+ const { props: pluginOptions, themeInput } = myth
181
+ defineModel<Props['modelValue']>({ required: !1, default: undefined })
182
+ const helper = useBindInput<any>(() => props, 'editor')
183
+ const { hasTopLabel, getLabel, getPlaceholder, inputRules } = helper
184
+ const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
185
+ syncVModel: !0,
186
+ label: getLabel,
187
+ ...toValue<any>(props.fieldOptions)
188
+ })
189
+ const { value, errorMessage, handleChange } = inputScope
190
+
191
+ const listeners = {
192
+ 'update:modelValue': (v: Props['modelValue']) => handleChange(v, !!errorMessage.value)
193
+ }
194
+
195
+ const input = useTemplateRef<InstanceType<typeof QEditor> | InstanceType<typeof QField>>('input')
196
+ const scopes = reactive(inputScope)
197
+ defineExpose<typeof scopes & { input: typeof input }>({ input, ...scopes })
198
+ defineOptions({
199
+ name: 'MEditor',
200
+ inheritAttrs: !1
201
+ })
202
+ </script>
203
+
204
+ <template>
205
+ <MCol
206
+ :auto="auto"
207
+ :class="[$attrs.class,{'m--input__required':inputRules?.required!==undefined,'m--input__error':!!errorMessage,'m--input__view':viewMode}]"
208
+ :col="col"
209
+ :lg="lg"
210
+ :md="md"
211
+ :name="name"
212
+ :sm="sm"
213
+ :xs="xs"
214
+ >
215
+ <slot
216
+ name="top-input"
217
+ v-bind="inputScope"
218
+ />
219
+ <slot name="top-label">
220
+ <MInputLabel
221
+ v-if="hasTopLabel"
222
+ :field="scopes"
223
+ >
224
+ <MHelpRow
225
+ :text="help"
226
+ tooltip
227
+ />
228
+ </MInputLabel>
229
+ </slot>
230
+ <slot name="caption">
231
+ <div
232
+ v-if="!!caption"
233
+ class="m--input__caption"
234
+ >
235
+ {{ __(caption) }}
236
+ </div>
237
+ </slot>
238
+ <slot
239
+ name="help"
240
+ v-bind="inputScope"
241
+ >
242
+ <MHelpRow :text="help" />
243
+ </slot>
244
+ <component
245
+ :is="viewMode ? QField : QEditor"
246
+ ref="input"
247
+ :_definitions="{..._definitions,...pluginOptions.editor?.definitions}"
248
+ :fonts="fonts || _fonts"
249
+ :label="hasTopLabel ? undefined : getLabel"
250
+ :min-height="minHeight"
251
+ :model-value="value || ''"
252
+ :placeholder="getPlaceholder"
253
+ :toolbar="toolbar || _toolbar"
254
+ v-bind="{
255
+ ...pluginOptions.editor as any,
256
+ ...( viewMode ? pluginOptions.field : {} ),
257
+ ...$attrs,
258
+ ...( viewMode ? { stackLabel: !0 } : {} ),
259
+ dense: themeInput.dense !== undefined ? themeInput.dense : $q.screen.lt.lg
260
+ }"
261
+ v-on="listeners"
262
+ />
263
+ <slot
264
+ name="help"
265
+ v-bind="scopes"
266
+ >
267
+ <MHelpRow
268
+ v-if="!hasTopLabel"
269
+ :text="help"
270
+ />
271
+ </slot>
272
+ <slot
273
+ name="bottom-input"
274
+ v-bind="inputScope"
275
+ />
276
+ <MFadeXTransition>
277
+ <p
278
+ v-if="!!errorMessage"
279
+ class="text-body2 text-negative"
280
+ >
281
+ {{ errorMessage }}
282
+ </p>
283
+ </MFadeXTransition>
284
+ </MCol>
285
+ </template>
@@ -0,0 +1,43 @@
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
10
+ lang="ts"
11
+ setup
12
+ >
13
+ import type { MInputProps as Props, MInputSlots } from '../../types'
14
+ import { useTemplateRef } from 'vue'
15
+ import MInput from './MInput.vue'
16
+
17
+ defineProps<Props>()
18
+ const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
19
+ const input = useTemplateRef<InstanceType<typeof MInput>>('input')
20
+ defineExpose<{
21
+ input: typeof input
22
+ }>({ input })
23
+ defineOptions({
24
+ name: 'MEmail',
25
+ inheritAttrs: !1
26
+ })
27
+ </script>
28
+
29
+ <template>
30
+ <MInput
31
+ ref="input"
32
+ v-model="modelValue"
33
+ v-bind="{...$attrs,...$props,type:'email',email:!0}"
34
+ >
35
+ <template
36
+ v-for="(_,slot) in $slots as Readonly<MInputSlots>"
37
+ :key="slot"
38
+ #[slot]
39
+ >
40
+ <slot :name="slot" />
41
+ </template>
42
+ </MInput>
43
+ </template>