@mythpe/quasar-ui-qui 0.2.4 → 0.2.6

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.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -67,22 +67,6 @@ const _toolbar = [
67
67
  'size-7'
68
68
  ]
69
69
  },
70
- {
71
- label: $q.lang.editor.fontSize,
72
- icon: $q.iconSet.editor.fontSize,
73
- fixedLabel: true,
74
- fixedIcon: true,
75
- list: 'no-icons',
76
- options: [
77
- 'size-1',
78
- 'size-2',
79
- 'size-3',
80
- 'size-4',
81
- 'size-5',
82
- 'size-6',
83
- 'size-7'
84
- ]
85
- },
86
70
  {
87
71
  label: $q.lang.editor.defaultFont,
88
72
  icon: $q.iconSet.editor.font,
@@ -41,7 +41,11 @@ interface P {
41
41
  mobile?: Props['mobile'];
42
42
  email?: Props['email'];
43
43
  float?: Props['float'];
44
- sar?: boolean;
44
+ sar?: Props['sar'];
45
+ prependIcon?: Props['prependIcon'];
46
+ prependIconProps?: Props['prependIconProps'];
47
+ appendIcon?: Props['appendIcon'];
48
+ appendIconProps?: Props['appendIconProps'];
45
49
  }
46
50
 
47
51
  const props = withDefaults(defineProps<P>(), {
@@ -69,7 +73,11 @@ const props = withDefaults(defineProps<P>(), {
69
73
  mobile: undefined,
70
74
  email: undefined,
71
75
  float: undefined,
72
- sar: !1
76
+ sar: !1,
77
+ prependIcon: undefined,
78
+ prependIconProps: undefined,
79
+ appendIcon: undefined,
80
+ appendIconProps: undefined
73
81
  })
74
82
  defineModel<Props['modelValue']>({ required: !1, default: undefined })
75
83
  const { __, props: pluginOptions } = useMyth()
@@ -151,6 +159,18 @@ defineOptions({
151
159
  }"
152
160
  v-on="listeners"
153
161
  >
162
+ <template v-if="!!prependIcon">
163
+ <q-icon
164
+ :name="prependIcon"
165
+ v-bind="prependIconProps"
166
+ />
167
+ </template>
168
+ <template v-if="!!appendIcon">
169
+ <q-icon
170
+ :name="appendIcon"
171
+ v-bind="appendIconProps"
172
+ />
173
+ </template>
154
174
  <template
155
175
  v-if="viewMode"
156
176
  #control
@@ -171,7 +171,12 @@ const input = useTemplateRef<InstanceType<typeof QSelect> | InstanceType<typeof
171
171
  const scopes = reactive(inputScope)
172
172
  const getViewModeValue = computed(() => {
173
173
  if (props.viewModeValue === undefined) {
174
- const i = getOptions.value.find(e => e.value === value.value)
174
+ const i = getOptions.value.find((e) => {
175
+ if (typeof props.optionValue === 'function') {
176
+ return e[props.optionValue(e)] === value.value
177
+ }
178
+ return e[props.optionValue] === value.value
179
+ })
175
180
  if (i) {
176
181
  if (typeof props.optionLabel === 'function') {
177
182
  return props.optionLabel(i)
@@ -17,7 +17,7 @@ import type {
17
17
  QEditorSlots,
18
18
  QFieldSlots,
19
19
  QFileProps,
20
- QFileSlots,
20
+ QFileSlots, QIconProps,
21
21
  QInputProps,
22
22
  QInputSlots,
23
23
  QItemProps,
@@ -44,6 +44,7 @@ import type { MTransitionProps, MTransitionsSlots } from './api/MTransition'
44
44
  import type { MAxiosProps, MAxiosSlots } from './api/MAxios'
45
45
  import type { MSelectProps, MSelectSlots } from './api/MSelect'
46
46
  import type { MSignaturePadProps, MSignaturePadSlots } from './api/MSignaturePad'
47
+ import Parials from '../components/parials'
47
48
 
48
49
  export type MBtnProps = QBtnProps & {
49
50
  ariaLabel?: boolean | string | null | undefined;
@@ -344,6 +345,10 @@ export type BaseInputsSlots = InputHelpSlots & {
344
345
 
345
346
  export interface MInputProps extends Omit<QInputProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint'>, BaseInputsProps {
346
347
  sar?: boolean;
348
+ prependIcon?: string;
349
+ prependIconProps?: Partial<QIconProps>;
350
+ appendIcon?: string;
351
+ appendIconProps?: Partial<QIconProps>;
347
352
  }
348
353
 
349
354
  export type MInputSlots = QInputSlots & QFieldSlots & BaseInputsSlots