@mythpe/quasar-ui-qui 0.4.98 → 0.4.99

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.4.98",
3
+ "version": "0.4.99",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -10,5 +10,5 @@ import { boot } from 'quasar/wrappers'
10
10
  import { install } from '../utils'
11
11
 
12
12
  export default boot(({ app }) => {
13
- app.use(install)
13
+ app.use(install, {} as any)
14
14
  })
@@ -7,17 +7,9 @@
7
7
  -->
8
8
 
9
9
  <script lang="ts" setup>
10
- import type { QIconProps } from 'quasar'
11
- import { computed } from 'vue'
12
10
 
13
- type Props = QIconProps
14
- const noDefault = defineModel<boolean>('noDefault', { required: !1, default: !1 })
15
- const props = defineProps<Props>()
16
- const getSize = computed<any>(() => ({
17
- size: noDefault.value ? props.size : (props.size || '100%')
18
- }))
19
11
  defineOptions({
20
- name: 'MSarString',
12
+ name: 'MSarIcon',
21
13
  inheritAttrs: !1
22
14
  })
23
15
  </script>
@@ -25,20 +17,8 @@ defineOptions({
25
17
  <template>
26
18
  <q-icon
27
19
  class="m-sar-icon"
28
- v-bind="Object.assign({},$props,$attrs,getSize)"
20
+ v-bind="{...$attrs, name: 'myth-sar'}"
29
21
  >
30
- <slot name="default">
31
- <svg
32
- viewBox="0 0 1124.14 1256.39"
33
- xmlns="http://www.w3.org/2000/svg"
34
- >
35
- <path
36
- d="M699.62,1113.02h0c-20.06,44.48-33.32,92.75-38.4,143.37l424.51-90.24c20.06-44.47,33.31-92.75,38.4-143.37l-424.51,90.24Z"
37
- />
38
- <path
39
- d="M1085.73,895.8c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.33v-135.2l292.27-62.11c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.27V66.13c-50.67,28.45-95.67,66.32-132.25,110.99v403.35l-132.25,28.11V0c-50.67,28.44-95.67,66.32-132.25,110.99v525.69l-295.91,62.88c-20.06,44.47-33.33,92.75-38.42,143.37l334.33-71.05v170.26l-358.3,76.14c-20.06,44.47-33.32,92.75-38.4,143.37l375.04-79.7c30.53-6.35,56.77-24.4,73.83-49.24l68.78-101.97v-.02c7.14-10.55,11.3-23.27,11.3-36.97v-149.98l132.25-28.11v270.4l424.53-90.28Z"
40
- />
41
- </svg>
42
- </slot>
22
+ <slot />
43
23
  </q-icon>
44
24
  </template>
@@ -0,0 +1,13 @@
1
+ /*
2
+ * MyTh Ahmed Faiz Copyright © 2016-2026 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
+ export const iconSet = 'myth-'
10
+ export const icons = {
11
+ sar: 'M699.62,1113.02h0c-20.06,44.48-33.32,92.75-38.4,143.37l424.51-90.24c20.06-44.47,33.31-92.75,38.4-143.37l-424.51,90.24Z&&M1085.73,895.8c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.33v-135.2l292.27-62.11c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.27V66.13c-50.67,28.45-95.67,66.32-132.25,110.99v403.35l-132.25,28.11V0c-50.67,28.44-95.67,66.32-132.25,110.99v525.69l-295.91,62.88c-20.06,44.47-33.33,92.75-38.42,143.37l334.33-71.05v170.26l-358.3,76.14c-20.06,44.47-33.32,92.75-38.4,143.37l375.04-79.7c30.53-6.35,56.77-24.4,73.83-49.24l68.78-101.97v-.02c7.14-10.55,11.3-23.27,11.3-36.97v-149.98l132.25-28.11v270.4l424.53-90.28Z|0 0 1124.14 1256.39'
12
+ }
13
+ export default {}
@@ -0,0 +1,10 @@
1
+ /*
2
+ * MyTh Ahmed Faiz Copyright © 2016-2026 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
+ export * from './config'
10
+ export default {}
@@ -9,7 +9,7 @@
9
9
  import type { VNode } from 'vue'
10
10
  import type { QIconProps } from 'quasar'
11
11
 
12
- export type MSarIconProps = Omit<QIconProps, 'name'> & Record<string, any>;
12
+ export type MSarIconProps = Omit<QIconProps, 'name'>;
13
13
 
14
14
  export interface MSarIconSlots {
15
15
  default: () => VNode[]
@@ -13,6 +13,8 @@ import { defineComponents } from '../plugin/defineComponents'
13
13
 
14
14
  import { createMyth, extendOptions } from './createMyth'
15
15
  import { MythKey } from './const'
16
+ import { icons, iconSet } from '../icons'
17
+ import { Str } from './Str'
16
18
 
17
19
  function install (app: App, options: InstallOptions) {
18
20
  const opts = extendOptions(options)
@@ -35,6 +37,20 @@ function install (app: App, options: InstallOptions) {
35
37
  // for (const routesKey in routes) {
36
38
  // console.log(routesKey)
37
39
  // }
40
+ const otherIconMapFn = app.config.globalProperties.$q.iconMapFn
41
+ app.config.globalProperties.$q.iconMapFn = (iconName) => {
42
+ if (iconName.startsWith(iconSet)) {
43
+ const name = Str.camelCase(iconName.slice(iconSet.length))
44
+ if (Object.keys(icons).includes(name)) {
45
+ return {
46
+ icon: icons[name]
47
+ }
48
+ }
49
+ }
50
+ if (typeof otherIconMapFn === 'function') {
51
+ return otherIconMapFn(iconName)
52
+ }
53
+ }
38
54
  }
39
55
 
40
56
  export {