@mythpe/quasar-app-extension-qui 0.0.26 → 0.5.0
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/README.md +40 -22
- package/package.json +12 -12
- package/src/boot/register.js +5 -0
- package/src/index.cjs +83 -0
- package/src/install.js +2 -2
- package/src/prompts.js +28 -28
- package/src/uninstall.js +1 -1
- package/jsconfig.json +0 -5
- package/src/components/form/MBtn.vue +0 -168
- package/src/components/grid/MBlock.vue +0 -38
- package/src/components/grid/MCol.vue +0 -64
- package/src/components/grid/MColumn.vue +0 -15
- package/src/components/grid/MContainer.vue +0 -46
- package/src/components/grid/MHelpRow.vue +0 -62
- package/src/components/grid/MRow.vue +0 -35
- package/src/components/typography/MTypingString.vue +0 -78
- package/src/index.js +0 -48
- package/src/index.sass +0 -27
- package/src/types/components.d.ts +0 -163
- package/src/types/index.d.ts +0 -2
- package/src/types/myth.d.ts +0 -42
- package/src/utils/myth.ts +0 -30
- package/src/utils/vue-plugin.ts +0 -41
- package/tsconfig.json +0 -34
package/README.md
CHANGED
|
@@ -1,44 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://4myth.com">
|
|
3
|
+
<img src="https://4myth.com/logo.png" width="120" alt="Ahmed Faiz MyTh">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/quasar-app-extension-qui)
|
|
8
|
+
[](https://www.npmjs.com/package/quasar-app-extension-qui)
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
[](https://www.npmjs.com/package/@mythpe/quasar-app-extension-qui)
|
|
10
|
+
# Quasar App Extension QUI
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
This extension allows you to effortlessly integrate **QUI** components into your Quasar Framework applications with zero configuration.
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
quasar ext add @mythpe/qui
|
|
12
|
-
```
|
|
13
|
-
Quasar CLI will retrieve it from NPM and install the extension.
|
|
14
|
+
## 💻 Installation
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
To automatically install the extension and trigger the **invoke** script, run:
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
|
-
quasar ext
|
|
19
|
+
quasar ext add "@mythpe/qui"
|
|
19
20
|
```
|
|
20
21
|
|
|
22
|
+
## ⚙️ Extension Lifecycle
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
This app extension uses Quasar's lifecycle scripts to automate project setup:
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
* **Invoke (`index.js` / `install.js`)**: Automatically executed upon installation. It registers the extension, adds the required boot files, injects
|
|
27
|
+
UI configurations, and updates your project dependencies.
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
```bash
|
|
30
|
+
quasar ext invoke "@mythpe/qui"
|
|
31
|
+
```
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
* **Uninvoke (`uninstall.js`)**: Automatically executed upon removal. It cleans up your project by safely removing boot files, configuration lines,
|
|
34
|
+
and injected setup without leaving dead code.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
quasar ext uninvoke "@mythpe/qui"
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
## 🛠️ Uninstall
|
|
41
|
+
|
|
42
|
+
To remove the extension and trigger the **uninvoke** cleanup script, run:
|
|
33
43
|
|
|
34
44
|
```bash
|
|
35
|
-
quasar ext
|
|
45
|
+
quasar ext remove "@mythpe/qui"
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
## 🔗 Related Packages
|
|
49
|
+
|
|
50
|
+
* **[@mythpe/quasar-ui-qui](https://www.npmjs.com/package/@mythpe/quasar-ui-qui)**: Core UI library package.
|
|
51
|
+
|
|
52
|
+
## 📞 Support & Contact
|
|
53
|
+
|
|
54
|
+
Developed with 💙 by **Ahmed Faiz (MyTh)**.
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
* 🌐 **Website:** [4myth.com](https://4myth.com)
|
|
57
|
+
* 📧 **Email:** mythpe@gmail.com
|
|
58
|
+
* 📱 **WhatsApp:** [+966 59 047 0092](https://wa.me)
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
## 📄 License
|
|
43
61
|
|
|
44
|
-
MIT (c) MyTh
|
|
62
|
+
MIT (c) 2026 **Ahmed Faiz (MyTh)**
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mythpe/quasar-app-extension-qui",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "MyTh Ahmed Faiz",
|
|
6
|
+
"mobile": "+966590470092",
|
|
7
|
+
"email": "mythpe@gmail.com",
|
|
8
|
+
"url": "https://www.4myth.com"
|
|
9
|
+
},
|
|
10
|
+
"description": "MyTh Quasar App Extension for MyTh UI Kit",
|
|
8
11
|
"license": "MIT",
|
|
12
|
+
"main": "src/index.cjs",
|
|
9
13
|
"type": "module",
|
|
10
14
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"lint:fix": "eslint --ext .js,.ts,.vue ./ --fix",
|
|
13
|
-
"build": "node build/index.cjs",
|
|
14
|
-
"build:js": "node build/script.javascript.cjs",
|
|
15
|
-
"build:css": "node build/script.css.cjs"
|
|
15
|
+
"publish:npm": "npm publish --access public"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@mythpe/quasar-ui-qui": "^0.0
|
|
18
|
+
"@mythpe/quasar-ui-qui": "^0.5.0"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": "^
|
|
21
|
+
"node": "^28 || ^26 || ^24 || ^22.12",
|
|
22
22
|
"npm": ">= 6.13.4",
|
|
23
23
|
"yarn": ">= 1.21.1"
|
|
24
24
|
}
|
package/src/boot/register.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { boot } from 'quasar/wrappers'
|
|
2
2
|
import VuePlugin from '@mythpe/quasar-ui-qui'
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Global component auto-registration boot script
|
|
6
|
+
* Automatically applies the plugin components into the target Quasar application
|
|
7
|
+
*/
|
|
4
8
|
export default boot(({ app }) => {
|
|
5
9
|
app.use(VuePlugin)
|
|
10
|
+
console.log('💵❤️ Quasar App Extension @mythpe/quasar-ui-qui booted')
|
|
6
11
|
})
|
package/src/index.cjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//const path = require('path')
|
|
2
|
+
//const fs = require('fs')
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Quasar App Extension index/runner script
|
|
6
|
+
* (runs on each dev/build)
|
|
7
|
+
*
|
|
8
|
+
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
9
|
+
*/
|
|
10
|
+
//const path = require('path')
|
|
11
|
+
|
|
12
|
+
function extendConf(conf, api) {
|
|
13
|
+
// register our boot file
|
|
14
|
+
conf.boot.push('~@mythpe/quasar-app-extension-qui/src/boot/register.js')
|
|
15
|
+
|
|
16
|
+
// make sure the stylesheet goes through webpack to avoid SSR issues
|
|
17
|
+
//conf.css.push('~@mythpe/quasar-ui-qui/src/index.scss')
|
|
18
|
+
|
|
19
|
+
if (api.hasVite) {
|
|
20
|
+
//conf.build.alias['#myth'] = path.resolve(__dirname, '../../ui/dist/types/index.d.ts')
|
|
21
|
+
//conf.build.alias['#myth'] = path.resolve(__dirname, '~@mythpe/quasar-ui-qui/dist/types/index.d.ts')
|
|
22
|
+
//conf.build.alias['#myth'] = 'node_modules/@mythpe/quasar-ui-qui/dist/types/index.cjs'
|
|
23
|
+
//conf.build.alias['#myth'] = '@mythpe/quasar-ui-qui/dist/types/index.d.ts'
|
|
24
|
+
//conf.build.alias['#myth'] = './node_modules/@mythpe/quasar-ui-qui/dist/index.cjs'
|
|
25
|
+
//conf.build.alias['#myth'] = './../node_modules/@mythpe/quasar-ui-qui/dist/index.umd.cjs'
|
|
26
|
+
//conf.build.alias['#myth'] = '@mythpe/quasar-ui-qui/dist/types/index.d.ts'
|
|
27
|
+
//conf.build.alias['#myth'] = '@mythpe/quasar-ui-qui/dist/types/index.d.ts'
|
|
28
|
+
//conf.build.alias['#myth'] = '@mythpe/quasar-ui-qui/src/index.ts'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (api.hasWebpack) {
|
|
32
|
+
api.chainWebpack(chain => {
|
|
33
|
+
chain.resolve.alias
|
|
34
|
+
//.set('#myth', path.resolve(__dirname, '../ui/dist'))
|
|
35
|
+
.set('#myth', './node_modules/@mythpe/quasar-ui-qui/dist/index.cjs')
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
// make sure app extension files & ui package gets transpiled
|
|
39
|
+
const transpileTarget =
|
|
40
|
+
conf.build.webpackTranspileDependencies || // q/app-webpack >= v4
|
|
41
|
+
conf.build.transpileDependencies // q/app-webpack v3
|
|
42
|
+
transpileTarget.push(/@mythpe\/quasar-app-extension-qui[\\/]src/)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = function (api) {
|
|
47
|
+
// Quasar compatibility check; you may need
|
|
48
|
+
// hard dependencies, as in a minimum version of the "quasar"
|
|
49
|
+
// package or a minimum version of "@quasar/app-*" CLI
|
|
50
|
+
api.compatibleWith('quasar', '^2.0.0')
|
|
51
|
+
|
|
52
|
+
if (api.hasVite) {
|
|
53
|
+
api.compatibleWith('@quasar/app-vite', '^1.5.0 || ^2.0.0')
|
|
54
|
+
} else if (api.hasWebpack) {
|
|
55
|
+
api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Uncomment the line below if you provide a JSON API for your component
|
|
59
|
+
// api.registerDescribeApi('MyComponent', '~@mythpe/quasar-ui-qui/src/components/MyComponent.json')
|
|
60
|
+
// Uncomment the line below if you provide a JSON API for your directive
|
|
61
|
+
// api.registerDescribeApi('my-directive', '~@mythpe/quasar-ui-qui/src/directives/my-directive.json')
|
|
62
|
+
|
|
63
|
+
// We extend /quasar.conf.js
|
|
64
|
+
api.extendQuasarConf(conf => extendConf(conf, api))
|
|
65
|
+
|
|
66
|
+
api.registerCommand('myth-routes', ({ args, params }) => {
|
|
67
|
+
//const routesPath = path.join(process.cwd(), 'src/router/routes.ts')
|
|
68
|
+
//const outputPath = path.join(process.cwd(), 'src/router/routes-dot.json')
|
|
69
|
+
//if (!fs.existsSync(routesPath)) {
|
|
70
|
+
// console.error('❌ لم يتم العثور على ملف src/router/routes.ts')
|
|
71
|
+
// return
|
|
72
|
+
//}
|
|
73
|
+
try {
|
|
74
|
+
//const fileContent = fs.readFileSync(routesPath, 'utf-8')
|
|
75
|
+
//console.log('fileContent: ', fileContent)
|
|
76
|
+
//const nameRegex = /name:\s*['"`]([^'"`]+)['"`]/g
|
|
77
|
+
//let match
|
|
78
|
+
//const routeNames = []
|
|
79
|
+
} catch (error) {
|
|
80
|
+
console.error('❌ Error:', error.message)
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
}
|
package/src/install.js
CHANGED
|
@@ -11,8 +11,8 @@ export default function (api) {
|
|
|
11
11
|
api.compatibleWith('quasar', '^2.0.0')
|
|
12
12
|
|
|
13
13
|
if (api.hasVite) {
|
|
14
|
-
api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0
|
|
14
|
+
api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0')
|
|
15
15
|
} else if (api.hasWebpack) {
|
|
16
|
-
api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0
|
|
16
|
+
api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0')
|
|
17
17
|
}
|
|
18
18
|
}
|
package/src/prompts.js
CHANGED
|
@@ -9,36 +9,36 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Example:
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
name: 'name',
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
message: 'Quasar CLI Extension name (without prefix)',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'preset',
|
|
21
|
+
type: 'checkbox',
|
|
22
|
+
message: 'Check the features needed for your project:',
|
|
23
|
+
choices: [
|
|
24
|
+
{
|
|
25
|
+
name: 'Install script',
|
|
26
|
+
value: 'install'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Prompts script',
|
|
30
|
+
value: 'prompts'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Uninstall script',
|
|
34
|
+
value: 'uninstall'
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
39
|
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
-
export default function (
|
|
42
|
+
export default function (_api) {
|
|
43
43
|
return []
|
|
44
44
|
}
|
package/src/uninstall.js
CHANGED
package/jsconfig.json
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { MBtnProps } from '../../types'
|
|
3
|
-
import { useI18n } from 'vue-i18n'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
import { extend } from 'quasar'
|
|
6
|
-
import { myth } from '../../utils/myth'
|
|
7
|
-
|
|
8
|
-
const props = defineProps<MBtnProps>()
|
|
9
|
-
const options = computed(() => myth.options.value.btn ?? {})
|
|
10
|
-
const { t, te } = useI18n({ useScope: 'global' })
|
|
11
|
-
const getLabel = computed(() => {
|
|
12
|
-
if (props.label !== undefined) {
|
|
13
|
-
if (te(`attributes.${props.label}`)) {
|
|
14
|
-
return t(`attributes.${props.label}`)
|
|
15
|
-
}
|
|
16
|
-
if (te(`${props.label}`)) {
|
|
17
|
-
return t(`${props.label}`)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return props.label
|
|
21
|
-
})
|
|
22
|
-
defineOptions({
|
|
23
|
-
name: 'MBtn',
|
|
24
|
-
inheritAttrs: !1
|
|
25
|
-
})
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<template>
|
|
29
|
-
<q-btn v-bind="extend(!0,{...$attrs},options.props,{...$props},{label: getLabel})">
|
|
30
|
-
<template
|
|
31
|
-
v-if="!!options.loading && !$slots.loading"
|
|
32
|
-
#loading
|
|
33
|
-
>
|
|
34
|
-
<q-spinner-audio
|
|
35
|
-
v-if="options.loading.type === 'audio'"
|
|
36
|
-
:color="options.loading.color"
|
|
37
|
-
:size="options.loading.size"
|
|
38
|
-
class="on-left"
|
|
39
|
-
/>
|
|
40
|
-
<q-spinner-ball
|
|
41
|
-
v-if="options.loading.type === 'ball'"
|
|
42
|
-
:color="options.loading.color"
|
|
43
|
-
:size="options.loading.size"
|
|
44
|
-
class="on-left"
|
|
45
|
-
/>
|
|
46
|
-
<q-spinner-bars
|
|
47
|
-
v-if="options.loading.type === 'bars'"
|
|
48
|
-
:color="options.loading.color"
|
|
49
|
-
class="on-left"
|
|
50
|
-
/>
|
|
51
|
-
<q-spinner-box
|
|
52
|
-
v-if="options.loading.type === 'box'"
|
|
53
|
-
:color="options.loading.color"
|
|
54
|
-
class="on-left"
|
|
55
|
-
/>
|
|
56
|
-
<q-spinner-clock
|
|
57
|
-
v-if="options.loading.type === 'clock'"
|
|
58
|
-
:color="options.loading.color"
|
|
59
|
-
class="on-left"
|
|
60
|
-
/>
|
|
61
|
-
<q-spinner-comment
|
|
62
|
-
v-if="options.loading.type === 'comment'"
|
|
63
|
-
:color="options.loading.color"
|
|
64
|
-
class="on-left"
|
|
65
|
-
/>
|
|
66
|
-
<q-spinner-cube
|
|
67
|
-
v-if="options.loading.type === 'cube'"
|
|
68
|
-
:color="options.loading.color"
|
|
69
|
-
class="on-left"
|
|
70
|
-
/>
|
|
71
|
-
<q-spinner-dots
|
|
72
|
-
v-if="options.loading.type === 'dots'"
|
|
73
|
-
:color="options.loading.color"
|
|
74
|
-
class="on-left"
|
|
75
|
-
/>
|
|
76
|
-
<q-spinner-facebook
|
|
77
|
-
v-if="options.loading.type === 'facebook'"
|
|
78
|
-
:color="options.loading.color"
|
|
79
|
-
class="on-left"
|
|
80
|
-
/>
|
|
81
|
-
<q-spinner-gears
|
|
82
|
-
v-if="options.loading.type === 'gears'"
|
|
83
|
-
:color="options.loading.color"
|
|
84
|
-
class="on-left"
|
|
85
|
-
/>
|
|
86
|
-
<q-spinner-grid
|
|
87
|
-
v-if="options.loading.type === 'grid'"
|
|
88
|
-
:color="options.loading.color"
|
|
89
|
-
class="on-left"
|
|
90
|
-
/>
|
|
91
|
-
<q-spinner-hearts
|
|
92
|
-
v-if="options.loading.type === 'hearts'"
|
|
93
|
-
:color="options.loading.color"
|
|
94
|
-
class="on-left"
|
|
95
|
-
/>
|
|
96
|
-
<q-spinner-hearts
|
|
97
|
-
v-if="options.loading.type === 'hearts'"
|
|
98
|
-
:color="options.loading.color"
|
|
99
|
-
class="on-left"
|
|
100
|
-
/>
|
|
101
|
-
<q-spinner-hourglass
|
|
102
|
-
v-if="options.loading.type === 'hourglass'"
|
|
103
|
-
:color="options.loading.color"
|
|
104
|
-
class="on-left"
|
|
105
|
-
/>
|
|
106
|
-
<q-spinner-infinity
|
|
107
|
-
v-if="options.loading.type === 'infinity'"
|
|
108
|
-
:color="options.loading.color"
|
|
109
|
-
class="on-left"
|
|
110
|
-
/>
|
|
111
|
-
<q-spinner-ios
|
|
112
|
-
v-if="options.loading.type === 'ios'"
|
|
113
|
-
:color="options.loading.color"
|
|
114
|
-
class="on-left"
|
|
115
|
-
/>
|
|
116
|
-
<q-spinner-orbit
|
|
117
|
-
v-if="options.loading.type === 'orbit'"
|
|
118
|
-
:color="options.loading.color"
|
|
119
|
-
class="on-left"
|
|
120
|
-
/>
|
|
121
|
-
<q-spinner-oval
|
|
122
|
-
v-if="options.loading.type === 'oval'"
|
|
123
|
-
:color="options.loading.color"
|
|
124
|
-
class="on-left"
|
|
125
|
-
/>
|
|
126
|
-
<q-spinner-pie
|
|
127
|
-
v-if="options.loading.type === 'pie'"
|
|
128
|
-
:color="options.loading.color"
|
|
129
|
-
class="on-left"
|
|
130
|
-
/>
|
|
131
|
-
<q-spinner-puff
|
|
132
|
-
v-if="options.loading.type === 'puff'"
|
|
133
|
-
:color="options.loading.color"
|
|
134
|
-
class="on-left"
|
|
135
|
-
/>
|
|
136
|
-
<q-spinner-radio
|
|
137
|
-
v-if="options.loading.type === 'radio'"
|
|
138
|
-
:color="options.loading.color"
|
|
139
|
-
class="on-left"
|
|
140
|
-
/>
|
|
141
|
-
<q-spinner-rings
|
|
142
|
-
v-if="options.loading.type === 'rings'"
|
|
143
|
-
:color="options.loading.color"
|
|
144
|
-
class="on-left"
|
|
145
|
-
/>
|
|
146
|
-
<q-spinner-tail
|
|
147
|
-
v-if="options.loading.type === 'tail'"
|
|
148
|
-
:color="options.loading.color"
|
|
149
|
-
class="on-left"
|
|
150
|
-
/>
|
|
151
|
-
<template v-if="options.loading.label === !0">
|
|
152
|
-
{{ getLabel }}
|
|
153
|
-
</template>
|
|
154
|
-
</template>
|
|
155
|
-
<template
|
|
156
|
-
v-else-if="!!$slots.loading"
|
|
157
|
-
#loading
|
|
158
|
-
>
|
|
159
|
-
<slot name="loading" />
|
|
160
|
-
</template>
|
|
161
|
-
<template
|
|
162
|
-
v-if="!!$slots.default"
|
|
163
|
-
#default
|
|
164
|
-
>
|
|
165
|
-
<slot name="default" />
|
|
166
|
-
</template>
|
|
167
|
-
</q-btn>
|
|
168
|
-
</template>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { MBlockProps } from '../../types'
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import MythOptions from '../../utils/myth'
|
|
5
|
-
import { extend } from 'quasar'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
size?: MBlockProps['size'];
|
|
9
|
-
rounded?: MBlockProps['rounded'];
|
|
10
|
-
shadow?: MBlockProps['shadow'];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
-
size: 'md',
|
|
15
|
-
rounded: !1,
|
|
16
|
-
shadow: 'none'
|
|
17
|
-
})
|
|
18
|
-
const block = computed(() => MythOptions.options.value.block ?? {})
|
|
19
|
-
const options = computed<Props>(() => extend(!0, { ...props }, block.value))
|
|
20
|
-
defineOptions({
|
|
21
|
-
name: 'MBlock',
|
|
22
|
-
inheritAttrs: !1
|
|
23
|
-
})
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<div
|
|
28
|
-
:class="{
|
|
29
|
-
'm---block' : !0,
|
|
30
|
-
[`q-pa-${options.size}`] : options.size && options.size !== 'none',
|
|
31
|
-
'rounded-borders' : options.rounded === !0,
|
|
32
|
-
[`shadow-${options.shadow}`] : options.shadow && options.shadow !== 'none'
|
|
33
|
-
}"
|
|
34
|
-
v-bind="$attrs"
|
|
35
|
-
>
|
|
36
|
-
<slot />
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<script
|
|
2
|
-
lang="ts"
|
|
3
|
-
setup
|
|
4
|
-
>
|
|
5
|
-
import { computed } from 'vue'
|
|
6
|
-
import { uniq } from 'lodash'
|
|
7
|
-
import type { MColProps } from '../../types'
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
name?: MColProps['name']
|
|
11
|
-
auto?: MColProps['auto']
|
|
12
|
-
col?: MColProps['col']
|
|
13
|
-
xs?: MColProps['xs']
|
|
14
|
-
sm?: MColProps['sm']
|
|
15
|
-
md?: MColProps['md']
|
|
16
|
-
lg?: MColProps['lg']
|
|
17
|
-
xl?: MColProps['xl']
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const props = defineProps<Props>()
|
|
21
|
-
const classes = computed(() => {
|
|
22
|
-
const list: string[] = ['m--col']
|
|
23
|
-
if (props.auto === !0) {
|
|
24
|
-
list.push('col-auto')
|
|
25
|
-
}
|
|
26
|
-
if (props.col === 'grow') {
|
|
27
|
-
list.push('col-grow')
|
|
28
|
-
} else if (props.col === 'shrink') {
|
|
29
|
-
list.push('col-shrink')
|
|
30
|
-
} else if (typeof props.col === 'string') {
|
|
31
|
-
if (props.col?.toString()?.trim()?.length > 0 && !list.includes(`col-${props.col}`)) {
|
|
32
|
-
list.push(`col-${props.col}`)
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
for (const k of (['xs', 'sm', 'md', 'lg', 'xl'] as (keyof Props)[])) {
|
|
37
|
-
if (props[k] && typeof props[k] !== 'boolean') {
|
|
38
|
-
if (!list.includes(`col-${k}-${props[k]}`)) {
|
|
39
|
-
list.push(`col-${k}-${props[k]}`)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (list.length === 1 && props.col !== !1) {
|
|
45
|
-
list.push('col')
|
|
46
|
-
}
|
|
47
|
-
return uniq(list)
|
|
48
|
-
// return list
|
|
49
|
-
})
|
|
50
|
-
defineOptions({
|
|
51
|
-
name: 'MCol',
|
|
52
|
-
inheritAttrs: !1
|
|
53
|
-
})
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<div
|
|
58
|
-
:class="classes"
|
|
59
|
-
:data-input-name="name??undefined"
|
|
60
|
-
v-bind="$attrs"
|
|
61
|
-
>
|
|
62
|
-
<slot />
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
import type { MContainerProps } from '../../types'
|
|
11
|
-
import MythOptions from '../../utils/myth'
|
|
12
|
-
import { computed } from 'vue'
|
|
13
|
-
|
|
14
|
-
interface Props {
|
|
15
|
-
size?: MContainerProps['size'];
|
|
16
|
-
fluid?: MContainerProps['fluid'];
|
|
17
|
-
dense?: MContainerProps['dense'];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const props = defineProps<Props>()
|
|
21
|
-
const styles = computed(() => MythOptions.options.value?.style ?? {})
|
|
22
|
-
const sizeProp = computed(() => {
|
|
23
|
-
if (props.size !== undefined) {
|
|
24
|
-
return props.size
|
|
25
|
-
}
|
|
26
|
-
return styles.value.gutters
|
|
27
|
-
})
|
|
28
|
-
defineOptions({
|
|
29
|
-
name: 'MContainer',
|
|
30
|
-
inheritAttrs: !1
|
|
31
|
-
})
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<div
|
|
36
|
-
:class="{
|
|
37
|
-
'm--container' : !0,
|
|
38
|
-
'm--container__fluid' : (fluid !== !1 && fluid !== undefined) || (styles.fluid === !0 && (fluid !== !1 && fluid !== undefined)),
|
|
39
|
-
'm--container__dense' : dense !== !1 && dense !== undefined,
|
|
40
|
-
[`q-pa-${sizeProp||''}`]: sizeProp && sizeProp !== 'none'
|
|
41
|
-
}"
|
|
42
|
-
v-bind="$attrs"
|
|
43
|
-
>
|
|
44
|
-
<slot />
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
@@ -1,62 +0,0 @@
|
|
|
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 { useI18n } from 'vue-i18n'
|
|
14
|
-
|
|
15
|
-
interface Props {
|
|
16
|
-
text?: string | undefined;
|
|
17
|
-
icon?: string | undefined;
|
|
18
|
-
tooltip?: boolean | undefined;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
defineProps<Props>()
|
|
22
|
-
const { t, te } = useI18n({ useScope: 'global' })
|
|
23
|
-
const __ = (s: any) => !s ? '' : te(`attributes.${s}`) ? t(`attributes.${s}`) : te(s) ? t(s) : s
|
|
24
|
-
defineOptions({
|
|
25
|
-
name: 'MHelpRow',
|
|
26
|
-
inheritAttrs: !1
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<div class="row">
|
|
32
|
-
<div class="col-auto">
|
|
33
|
-
<q-icon
|
|
34
|
-
:left="!!text && !tooltip"
|
|
35
|
-
class="cursor-pointer"
|
|
36
|
-
name="ion-ios-information-circle-outline"
|
|
37
|
-
size="19px"
|
|
38
|
-
>
|
|
39
|
-
<q-tooltip
|
|
40
|
-
v-if="!!tooltip"
|
|
41
|
-
anchor="center end"
|
|
42
|
-
class="bg-transparent text-black text-justify"
|
|
43
|
-
self="center start"
|
|
44
|
-
transition-hide="jump-right"
|
|
45
|
-
transition-show="jump-left"
|
|
46
|
-
>
|
|
47
|
-
<q-card style="max-width: 280px">
|
|
48
|
-
<q-card-section style="font-size: 13px">
|
|
49
|
-
{{ __(text) }}
|
|
50
|
-
</q-card-section>
|
|
51
|
-
</q-card>
|
|
52
|
-
</q-tooltip>
|
|
53
|
-
</q-icon>
|
|
54
|
-
</div>
|
|
55
|
-
<div
|
|
56
|
-
v-if="!tooltip && !!text"
|
|
57
|
-
class="col"
|
|
58
|
-
>
|
|
59
|
-
<div v-text="__(text)" />
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<script
|
|
2
|
-
lang="ts"
|
|
3
|
-
setup
|
|
4
|
-
>
|
|
5
|
-
import type { MRowProps } from '../../types'
|
|
6
|
-
import { computed } from 'vue'
|
|
7
|
-
import MythOptions from '../../utils/myth'
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
gutter?: MRowProps['gutter'];
|
|
11
|
-
col?: MRowProps['col'];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const props = defineProps<Props>()
|
|
15
|
-
const defSize = computed<string>(() => MythOptions.options.value.style?.gutters || '')
|
|
16
|
-
const gutterSize = computed<string>(() => props.gutter === !0 ? defSize.value : (props.gutter || defSize.value))
|
|
17
|
-
const colSize = computed<string>(() => props.gutter === !0 ? defSize.value : (props.gutter || defSize.value))
|
|
18
|
-
defineOptions({
|
|
19
|
-
name: 'MRow',
|
|
20
|
-
inheritAttrs: !1
|
|
21
|
-
})
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<template>
|
|
25
|
-
<div
|
|
26
|
-
:class="{
|
|
27
|
-
'm--row row': !0,
|
|
28
|
-
[`q-gutter-${gutterSize}`]: gutter !== !1 && gutter !== undefined,
|
|
29
|
-
[`q-col-gutter-${colSize}`]: col !== !1 && col !== undefined,
|
|
30
|
-
}"
|
|
31
|
-
v-bind="$attrs"
|
|
32
|
-
>
|
|
33
|
-
<slot />
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<script
|
|
2
|
-
lang="ts"
|
|
3
|
-
setup
|
|
4
|
-
>
|
|
5
|
-
|
|
6
|
-
import Typed, { type TypedOptions } from 'typed.js'
|
|
7
|
-
import { computed, onBeforeUnmount, onMounted, watch } from 'vue'
|
|
8
|
-
import type { MTypingStringProps } from '../../types'
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
name: MTypingStringProps['name'];
|
|
12
|
-
tag?: MTypingStringProps['tag'];
|
|
13
|
-
string: MTypingStringProps['string'];
|
|
14
|
-
loop?: MTypingStringProps['loop'];
|
|
15
|
-
typeSpeed?: MTypingStringProps['typeSpeed'];
|
|
16
|
-
backDelay?: MTypingStringProps['backDelay'];
|
|
17
|
-
fadeOut?: MTypingStringProps['fadeOut'];
|
|
18
|
-
options?: MTypingStringProps['options'];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const props = defineProps<Props>()
|
|
22
|
-
|
|
23
|
-
const elmId = computed(() => `typed-content-${props.name}`)
|
|
24
|
-
const computedOptions = computed(() => ({
|
|
25
|
-
loop: props.loop === undefined ? !1 : props.loop,
|
|
26
|
-
typeSpeed: props.typeSpeed === undefined ? 300 : props.typeSpeed,
|
|
27
|
-
backDelay: props.backDelay,
|
|
28
|
-
fadeOut: props.fadeOut,
|
|
29
|
-
strings: typeof props.string === 'string' ? [props.string] : props.string,
|
|
30
|
-
...props.options
|
|
31
|
-
} as TypedOptions))
|
|
32
|
-
let typed: Typed | undefined
|
|
33
|
-
const iniTyped = () => {
|
|
34
|
-
try {
|
|
35
|
-
typed = new Typed(`#${elmId.value}`, computedOptions.value)
|
|
36
|
-
} catch (e) {
|
|
37
|
-
console.log(e)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const destroy = () => {
|
|
41
|
-
if (typed) {
|
|
42
|
-
try {
|
|
43
|
-
typed.destroy()
|
|
44
|
-
} catch (e) {
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
watch(() => props.string, () => {
|
|
50
|
-
destroy()
|
|
51
|
-
iniTyped()
|
|
52
|
-
})
|
|
53
|
-
onMounted(() => {
|
|
54
|
-
if (props.string) {
|
|
55
|
-
try {
|
|
56
|
-
iniTyped()
|
|
57
|
-
} catch (e) {
|
|
58
|
-
console.log(e)
|
|
59
|
-
const a = document.getElementById(elmId.value)
|
|
60
|
-
a && (a.innerHTML = typeof props.string === 'string' ? props.string : props.string.join('<br />'))
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
onBeforeUnmount(() => destroy())
|
|
65
|
-
defineExpose({ typed })
|
|
66
|
-
defineOptions({
|
|
67
|
-
name: 'MTypingString',
|
|
68
|
-
inheritAttrs: !1
|
|
69
|
-
})
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<template>
|
|
73
|
-
<component
|
|
74
|
-
:is="tag || 'span'"
|
|
75
|
-
:id="elmId"
|
|
76
|
-
v-bind="$attrs"
|
|
77
|
-
/>
|
|
78
|
-
</template>
|
package/src/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quasar App Extension index/runner script
|
|
3
|
-
* (runs on each dev/build)
|
|
4
|
-
*
|
|
5
|
-
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
function extendConf (conf, api) {
|
|
9
|
-
// register our boot file
|
|
10
|
-
conf.boot.push('~quasar-app-extension-qui/src/boot/register.js')
|
|
11
|
-
|
|
12
|
-
if (api.hasWebpack) {
|
|
13
|
-
// make sure app extension files & ui package gets transpiled
|
|
14
|
-
const transpileTarget = (
|
|
15
|
-
conf.build.webpackTranspileDependencies // q/app-webpack >= v4
|
|
16
|
-
|| conf.build.transpileDependencies // q/app-webpack v3
|
|
17
|
-
)
|
|
18
|
-
transpileTarget.push(/quasar-app-extension-qui[\\/]src/)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// make sure the stylesheet goes through webpack to avoid SSR issues
|
|
22
|
-
conf.css.push('~quasar-ui-qui/src/index.sass')
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default function (api) {
|
|
26
|
-
// Quasar compatibility check; you may need
|
|
27
|
-
// hard dependencies, as in a minimum version of the "quasar"
|
|
28
|
-
// package or a minimum version of "@quasar/app-*" CLI
|
|
29
|
-
api.compatibleWith('quasar', '^2.0.0')
|
|
30
|
-
|
|
31
|
-
if (api.hasVite) {
|
|
32
|
-
api.compatibleWith('@quasar/app-vite', '^1.5.0 || ^2.0.0-rc.1')
|
|
33
|
-
}
|
|
34
|
-
else if (api.hasWebpack) {
|
|
35
|
-
api.compatibleWith('@quasar/app-webpack', '^3.10.0 || ^4.0.0-rc.1')
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Uncomment the line below if you provide a JSON API for your component
|
|
40
|
-
// api.registerDescribeApi('MyComponent', '~quasar-ui-qui/src/components/MyComponent.json')
|
|
41
|
-
|
|
42
|
-
// Uncomment the line below if you provide a JSON API for your directive
|
|
43
|
-
// api.registerDescribeApi('my-directive', '~quasar-ui-qui/src/directives/my-directive.json')
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// We extend /quasar.conf.js
|
|
47
|
-
api.extendQuasarConf(extendConf)
|
|
48
|
-
}
|
package/src/index.sass
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@import 'quasar/src/css/variables.sass'
|
|
2
|
-
$m--container-padding: $space-base !default
|
|
3
|
-
$m--container-fluid-width: 1440px !default
|
|
4
|
-
$m--row-margin-top: $m--container-padding !default
|
|
5
|
-
|
|
6
|
-
.flex-break
|
|
7
|
-
flex: 1 0 100% !important
|
|
8
|
-
|
|
9
|
-
.row
|
|
10
|
-
.flex-break
|
|
11
|
-
height: 0 !important
|
|
12
|
-
|
|
13
|
-
.column
|
|
14
|
-
.flex-break
|
|
15
|
-
width: 0 !important
|
|
16
|
-
|
|
17
|
-
.m--container
|
|
18
|
-
&__dense
|
|
19
|
-
padding: 0 !important
|
|
20
|
-
|
|
21
|
-
&__fluid
|
|
22
|
-
max-width: $m--container-fluid-width
|
|
23
|
-
margin-left: auto
|
|
24
|
-
margin-right: auto
|
|
25
|
-
|
|
26
|
-
.m--row + .m--row
|
|
27
|
-
margin-top: $m--row-margin-top
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import type { GlobalComponentConstructor, QBtnProps, QBtnSlots, QItemProps } from 'quasar'
|
|
2
|
-
import type { VNode } from 'vue'
|
|
3
|
-
import { TypedOptions } from 'typed.js'
|
|
4
|
-
|
|
5
|
-
export type StyleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none';
|
|
6
|
-
|
|
7
|
-
export interface MBtnProps extends QBtnProps {
|
|
8
|
-
//
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface MBtnSlots extends QBtnSlots {
|
|
12
|
-
/**
|
|
13
|
-
* Use for custom content, instead of relying on 'icon' and 'label' props
|
|
14
|
-
*/
|
|
15
|
-
default: () => VNode[];
|
|
16
|
-
/**
|
|
17
|
-
* Override the default QSpinner when in 'loading' state
|
|
18
|
-
*/
|
|
19
|
-
loading: () => VNode[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface MBlockProps {
|
|
23
|
-
/**
|
|
24
|
-
* Size of the padding block.
|
|
25
|
-
* Default: 'md'
|
|
26
|
-
*/
|
|
27
|
-
readonly size?: StyleSize | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Rounded block
|
|
30
|
-
*/
|
|
31
|
-
readonly rounded?: boolean | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Shadow level
|
|
34
|
-
*/
|
|
35
|
-
readonly shadow?: string | number | 'transition' | 'none' | undefined;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface MBlockSlots {
|
|
39
|
-
default: () => VNode[];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type ColStyleType =
|
|
43
|
-
boolean
|
|
44
|
-
| undefined
|
|
45
|
-
| string
|
|
46
|
-
| number
|
|
47
|
-
| 'auto'
|
|
48
|
-
| 'grow'
|
|
49
|
-
| 'shrink'
|
|
50
|
-
| '1'
|
|
51
|
-
| '2'
|
|
52
|
-
| '3'
|
|
53
|
-
| '4'
|
|
54
|
-
| '5'
|
|
55
|
-
| '6'
|
|
56
|
-
| '7'
|
|
57
|
-
| '8'
|
|
58
|
-
| '9'
|
|
59
|
-
| '10'
|
|
60
|
-
| '11'
|
|
61
|
-
| '12'
|
|
62
|
-
| 1
|
|
63
|
-
| 2
|
|
64
|
-
| 3
|
|
65
|
-
| 4
|
|
66
|
-
| 5
|
|
67
|
-
| 6
|
|
68
|
-
| 7
|
|
69
|
-
| 8
|
|
70
|
-
| 9
|
|
71
|
-
| 10
|
|
72
|
-
| 11
|
|
73
|
-
| 12
|
|
74
|
-
|
|
75
|
-
export interface MColProps {
|
|
76
|
-
readonly auto?: boolean | undefined;
|
|
77
|
-
readonly col?: ColStyleType;
|
|
78
|
-
readonly xs?: ColStyleType;
|
|
79
|
-
readonly sm?: ColStyleType;
|
|
80
|
-
readonly md?: ColStyleType;
|
|
81
|
-
readonly lg?: ColStyleType;
|
|
82
|
-
readonly xl?: ColStyleType;
|
|
83
|
-
readonly name?: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface MColSlots {
|
|
87
|
-
default: () => VNode[];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface MColumnProps {
|
|
91
|
-
[key: string]: any;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface MColumnSlots {
|
|
95
|
-
default: () => VNode[];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface MContainerProps {
|
|
99
|
-
readonly size?: StyleSize | string | undefined;
|
|
100
|
-
readonly dense?: boolean | undefined;
|
|
101
|
-
readonly fluid?: boolean | undefined;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface MContainerSlots {
|
|
105
|
-
default: () => VNode[];
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface MRowProps {
|
|
109
|
-
/**
|
|
110
|
-
* Default: false.
|
|
111
|
-
*/
|
|
112
|
-
gutter?: boolean | StyleSize | undefined;
|
|
113
|
-
/**
|
|
114
|
-
* Default: false.
|
|
115
|
-
*/
|
|
116
|
-
col?: boolean | StyleSize | undefined;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface MRowSlots {
|
|
120
|
-
default: () => VNode[];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface MHelpRowProps extends Partial<QItemProps> {
|
|
124
|
-
text?: string | undefined;
|
|
125
|
-
icon?: string | undefined;
|
|
126
|
-
tooltip?: boolean | undefined;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface MHelpRowSlots {
|
|
130
|
-
default: () => VNode[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface MTypingStringProps {
|
|
134
|
-
name: number | string;
|
|
135
|
-
tag?: string;
|
|
136
|
-
string: string | string[];
|
|
137
|
-
loop?: TypedOptions['loop'];
|
|
138
|
-
typeSpeed?: TypedOptions['typeSpeed'];
|
|
139
|
-
backDelay?: TypedOptions['backDelay'];
|
|
140
|
-
fadeOut?: TypedOptions['fadeOut'];
|
|
141
|
-
options?: Omit<TypedOptions, 'loop' | 'typeSpeed' | 'backDelay' | 'fadeOut'>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface MTypingStringSlots {
|
|
145
|
-
default: () => VNode[];
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
declare module '@vue/runtime-core' {
|
|
149
|
-
interface GlobalComponents {
|
|
150
|
-
// Form.
|
|
151
|
-
MBtn: GlobalComponentConstructor<MBtnProps, MBtnSlots>;
|
|
152
|
-
|
|
153
|
-
// Grid.
|
|
154
|
-
MBlock: GlobalComponentConstructor<MBlockProps, MBlockSlots>;
|
|
155
|
-
MCol: GlobalComponentConstructor<MColProps, MColSlots>;
|
|
156
|
-
MColumn: GlobalComponentConstructor<MColumnProps, MColumnSlots>;
|
|
157
|
-
MContainer: GlobalComponentConstructor<MContainerProps, MContainerSlots>;
|
|
158
|
-
MHelpRow: GlobalComponentConstructor<MHelpRowProps, MHelpRowSlots>;
|
|
159
|
-
MRow: GlobalComponentConstructor<MRowProps, MRowSlots>;
|
|
160
|
-
// Typography.
|
|
161
|
-
MTypingString: GlobalComponentConstructor<MTypingStringProps, MTypingStringSlots>;
|
|
162
|
-
}
|
|
163
|
-
}
|
package/src/types/index.d.ts
DELETED
package/src/types/myth.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { QBtnProps } from 'quasar'
|
|
2
|
-
import type { Ref } from 'vue'
|
|
3
|
-
import type { MBlockProps, StyleSize } from './components'
|
|
4
|
-
|
|
5
|
-
export interface UiOptionsContext {
|
|
6
|
-
/**
|
|
7
|
-
* Style of the components.
|
|
8
|
-
*/
|
|
9
|
-
style?: {
|
|
10
|
-
/**
|
|
11
|
-
* Apply Padding on all sides of components.
|
|
12
|
-
*/
|
|
13
|
-
gutters?: StyleSize | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Apply Fluid on all sides of containers.
|
|
16
|
-
*/
|
|
17
|
-
fluid?: boolean | undefined;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* MBtn component.
|
|
21
|
-
*/
|
|
22
|
-
btn?: {
|
|
23
|
-
props?: Partial<QBtnProps>;
|
|
24
|
-
loading?: {
|
|
25
|
-
type: 'audio' | 'ball' | 'bars' | 'box' | 'clock' | 'comment' | 'cube' | 'dots' | 'facebook' | 'gears' | 'grid' | 'hearts' | 'hourglass' | 'infinity' | 'ios' | 'orbit' | 'oval' | 'pie' | 'puff' | 'radio' | 'rings' | 'tail';
|
|
26
|
-
color?: string | undefined;
|
|
27
|
-
size?: string | undefined;
|
|
28
|
-
label?: boolean | undefined;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* MBlock component.
|
|
33
|
-
*/
|
|
34
|
-
block?: Partial<MBlockProps>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface MythContext {
|
|
38
|
-
options: Ref<UiOptionsContext>;
|
|
39
|
-
setOptions: (values: Partial<UiOptionsContext>) => void;
|
|
40
|
-
withOptions: (values: Partial<UiOptionsContext>) => void;
|
|
41
|
-
withBtnOptions: (values: Partial<QBtnProps>) => void;
|
|
42
|
-
}
|
package/src/utils/myth.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ref } from 'vue'
|
|
2
|
-
import type { QBtnProps } from 'quasar'
|
|
3
|
-
import { extend } from 'quasar'
|
|
4
|
-
import type { MythContext, UiOptionsContext } from '../types'
|
|
5
|
-
|
|
6
|
-
const defGutters = 'md'
|
|
7
|
-
const defaultOptions: UiOptionsContext = {
|
|
8
|
-
style: {
|
|
9
|
-
gutters: defGutters
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
const optionsRef = ref<UiOptionsContext>({ ...defaultOptions })
|
|
13
|
-
|
|
14
|
-
export const myth : MythContext = {
|
|
15
|
-
options: optionsRef,
|
|
16
|
-
setOptions (values: Partial<UiOptionsContext>) {
|
|
17
|
-
optionsRef.value = extend(!0, defaultOptions, values)
|
|
18
|
-
},
|
|
19
|
-
withOptions (values: Partial<UiOptionsContext>) {
|
|
20
|
-
optionsRef.value = extend(!0, defaultOptions, optionsRef.value, values)
|
|
21
|
-
},
|
|
22
|
-
withBtnOptions (values: Partial<QBtnProps>) {
|
|
23
|
-
this.withOptions({
|
|
24
|
-
btn: {
|
|
25
|
-
props: values
|
|
26
|
-
}
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export default myth
|
package/src/utils/vue-plugin.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import js from '../../package.json'
|
|
2
|
-
import myth from './myth'
|
|
3
|
-
import MBtn from '../components/form/MBtn.vue'
|
|
4
|
-
import MBlock from '../components/grid/MBlock.vue'
|
|
5
|
-
import MCol from '../components/grid/MCol.vue'
|
|
6
|
-
import MColumn from '../components/grid/MColumn.vue'
|
|
7
|
-
import MContainer from '../components/grid/MContainer.vue'
|
|
8
|
-
import MHelpRow from '../components/grid/MHelpRow.vue'
|
|
9
|
-
import MRow from '../components/grid/MRow.vue'
|
|
10
|
-
import MTypingString from '../components/typography/MTypingString.vue'
|
|
11
|
-
import type { App } from 'vue'
|
|
12
|
-
|
|
13
|
-
const name = js.name
|
|
14
|
-
const version = js.version
|
|
15
|
-
|
|
16
|
-
function install (app: App, options = {}) {
|
|
17
|
-
myth.withOptions(options)
|
|
18
|
-
|
|
19
|
-
// Form.
|
|
20
|
-
app.component('MBtn', MBtn)
|
|
21
|
-
|
|
22
|
-
// Grid.
|
|
23
|
-
app.component('MBlock', MBlock)
|
|
24
|
-
app.component('MCol', MCol)
|
|
25
|
-
app.component('MColumn', MColumn)
|
|
26
|
-
app.component('MContainer', MContainer)
|
|
27
|
-
app.component('MHelpRow', MHelpRow)
|
|
28
|
-
app.component('MRow', MRow)
|
|
29
|
-
|
|
30
|
-
// Typography.
|
|
31
|
-
app.component('MTypingString', MTypingString)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const e = {
|
|
35
|
-
name,
|
|
36
|
-
version,
|
|
37
|
-
install,
|
|
38
|
-
myth
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default e
|
package/tsconfig.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": "./",
|
|
4
|
-
"rootDir": "./",
|
|
5
|
-
"outDir": "./dist",
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"target": "esnext",
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"moduleDetection": "force",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"module": "preserve",
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
"lib": [
|
|
17
|
-
"esnext",
|
|
18
|
-
"dom",
|
|
19
|
-
"dom.iterable"
|
|
20
|
-
],
|
|
21
|
-
"strict": true,
|
|
22
|
-
"allowUnreachableCode": false,
|
|
23
|
-
"allowUnusedLabels": false,
|
|
24
|
-
"noImplicitOverride": true,
|
|
25
|
-
"exactOptionalPropertyTypes": true,
|
|
26
|
-
"noUncheckedIndexedAccess": true
|
|
27
|
-
},
|
|
28
|
-
"exclude": [
|
|
29
|
-
"./build"
|
|
30
|
-
],
|
|
31
|
-
"include": [
|
|
32
|
-
"src/**/*"
|
|
33
|
-
]
|
|
34
|
-
}
|