@mythpe/quasar-ui-qui 0.3.19 → 0.3.21

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.19",
3
+ "version": "0.3.21",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -49,6 +49,9 @@ interface P {
49
49
  appendIconProps?: Props['appendIconProps'];
50
50
  copy?: Props['copy'];
51
51
  type?: Props['type'];
52
+ ltr?: Props['ltr'];
53
+ rtl?: Props['rtl'];
54
+ inputClass?: Props['ltr'];
52
55
  }
53
56
 
54
57
  const props = withDefaults(defineProps<P>(), {
@@ -82,7 +85,10 @@ const props = withDefaults(defineProps<P>(), {
82
85
  appendIcon: undefined,
83
86
  appendIconProps: undefined,
84
87
  copy: undefined,
85
- type: undefined
88
+ type: undefined,
89
+ ltr: undefined,
90
+ rtl: undefined,
91
+ inputClass: undefined
86
92
  })
87
93
  defineModel<Props['modelValue']>({ required: !1, default: undefined })
88
94
  const { __, props: pluginOptions, formatMoney, copyText } = useMyth()
@@ -120,6 +126,16 @@ const sarValue = computed<string | null>(() => {
120
126
  }
121
127
  })
122
128
  const computedViewModeValue = computed<any>(() => props.viewModeValue ?? value.value)
129
+ const computedInputClass = computed(() => {
130
+ const classes: any[] = [props.inputClass]
131
+ if (props.ltr) {
132
+ classes.push('ltr')
133
+ }
134
+ if (props.rtl) {
135
+ classes.push('rtl')
136
+ }
137
+ return classes
138
+ })
123
139
  defineExpose<typeof scopes & { input: typeof input }>({ input, ...scopes })
124
140
  defineOptions({
125
141
  name: 'MInput',
@@ -187,6 +203,7 @@ defineOptions({
187
203
  modelValue: value,
188
204
  placeholder: getPlaceholder,
189
205
  type,
206
+ inputClass: computedInputClass,
190
207
  }"
191
208
  v-on="listeners"
192
209
  >
@@ -212,29 +212,31 @@ watch(url, (url) => {
212
212
  name="pad"
213
213
  v-bind="{...scopes,width,height,reset,save,clear,undo,confirmed}"
214
214
  >
215
- <Vue3Signature
216
- v-if="!url"
217
- ref="padRef"
218
- :class="{'q-mx-auto': !0, 'hidden': !!$slots.pad}"
219
- :clear-on-resize="clearOnResize"
220
- :disabled="isDisabled"
221
- :h="height"
222
- :sig-option="{
223
- penColor: color,
224
- backgroundColor: bg
225
- }"
226
- :w="width"
227
- :water-mark="waterMark"
228
- />
229
- <template v-else-if="!!url">
230
- <q-img
231
- :height="height"
232
- :src="url"
233
- :width="width"
234
- fit="contain"
235
- no-spinner
215
+ <q-no-ssr>
216
+ <Vue3Signature
217
+ v-if="!url"
218
+ ref="padRef"
219
+ :class="{'q-mx-auto': !0, 'hidden': !!$slots.pad}"
220
+ :clear-on-resize="clearOnResize"
221
+ :disabled="isDisabled"
222
+ :h="height"
223
+ :sig-option="{
224
+ penColor: color,
225
+ backgroundColor: bg
226
+ }"
227
+ :w="width"
228
+ :water-mark="waterMark"
236
229
  />
237
- </template>
230
+ <template v-else-if="!!url">
231
+ <q-img
232
+ :height="height"
233
+ :src="url"
234
+ :width="width"
235
+ fit="contain"
236
+ no-spinner
237
+ />
238
+ </template>
239
+ </q-no-ssr>
238
240
  </slot>
239
241
  <slot
240
242
  :confirmed="confirmed"
@@ -159,6 +159,14 @@ export interface MInputProps extends Omit<QInputProps, 'rules' | 'name' | 'model
159
159
  * Default: false.
160
160
  */
161
161
  copy?: boolean;
162
+ /**
163
+ * Add ltr class to input-class
164
+ */
165
+ ltr?: boolean;
166
+ /**
167
+ * Add rtl class to input-class
168
+ */
169
+ rtl?: boolean;
162
170
  }
163
171
 
164
172
  export type MInputSlots = QInputSlots & QFieldSlots & BaseInputsSlots