@mythpe/quasar-ui-qui 0.0.14 → 0.0.15-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.
- package/index.d.ts +3 -4
- package/jsconfig.json +10 -0
- package/package.json +20 -11
- package/src/boot/register.ts +6 -0
- package/src/components/form/MBtn.vue +2 -2
- package/src/components/grid/MBlock.vue +2 -2
- package/src/components/grid/MCol.vue +3 -2
- package/src/components/grid/MContainer.vue +2 -2
- package/src/components/grid/MRow.vue +2 -2
- package/src/index.common.js +1 -6
- package/src/index.esm.js +3 -5
- package/src/index.umd.js +2 -6
- package/src/types/index.d.ts +1 -1
- package/src/types/{VuePlugin.d.ts → myth.ts} +6 -8
- package/src/utils/myth.ts +30 -0
- package/src/utils/vue-plugin.ts +43 -0
- package/tsconfig.json +34 -0
- package/src/utils.ts +0 -33
- package/src/vue-plugin.js +0 -43
package/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from './src/vue-plugin'
|
|
1
|
+
export * from './src/utils/vue-plugin'
|
|
2
2
|
export * from './src/types'
|
|
3
|
-
export * from './src/utils'
|
|
4
3
|
|
|
5
|
-
import * as
|
|
6
|
-
export default
|
|
4
|
+
import * as Plugin from './src/utils/vue-plugin'
|
|
5
|
+
export default Plugin
|
package/jsconfig.json
ADDED
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mythpe/quasar-ui-qui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15-dev",
|
|
4
4
|
"description": "MyTh Quasar UI Kit App Extension",
|
|
5
|
-
"author":
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "MyTh Ahmed Faiz",
|
|
7
|
+
"mobile": "+966590470092",
|
|
8
|
+
"email": "mythpe@gmail.com",
|
|
9
|
+
"url": "https://www.4myth.com"
|
|
10
|
+
},
|
|
8
11
|
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
9
13
|
"module": "src/index.esm.js",
|
|
10
14
|
"main": "src/index.common.js",
|
|
11
|
-
"type": "module",
|
|
12
15
|
"scripts": {
|
|
13
16
|
"dev": "cd ../dev && yarn dev && cd ..",
|
|
14
17
|
"dev:umd": "yarn build && node build/script.open-umd.js",
|
|
@@ -21,10 +24,14 @@
|
|
|
21
24
|
"build:css": "node build/script.css.js"
|
|
22
25
|
},
|
|
23
26
|
"dependencies": {
|
|
24
|
-
"lodash": "^4.17.21",
|
|
25
27
|
"typed.js": "^2.1.0",
|
|
26
|
-
"vee-validate": "^4.14.
|
|
27
|
-
"
|
|
28
|
+
"vee-validate": "^4.14.0",
|
|
29
|
+
"@vee-validate/i18n": "^4.14.0",
|
|
30
|
+
"@vee-validate/rules": "^4.14.0",
|
|
31
|
+
"vue-i18n": "^10.0.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"lodash": "^4.17.21"
|
|
28
35
|
},
|
|
29
36
|
"devDependencies": {
|
|
30
37
|
"@quasar/app-webpack": "^3.13.0",
|
|
@@ -33,14 +40,15 @@
|
|
|
33
40
|
"@rollup/plugin-json": "^4.0.0",
|
|
34
41
|
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
35
42
|
"@rollup/plugin-replace": "^2.4.2",
|
|
43
|
+
"@types/express": "^5.0.0",
|
|
36
44
|
"@types/lodash": "^4.17.13",
|
|
37
|
-
"@types/node": "^
|
|
45
|
+
"@types/node": "^22.9.1",
|
|
38
46
|
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
39
47
|
"@typescript-eslint/parser": "^7.16.0",
|
|
40
48
|
"autoprefixer": "^10.0.2",
|
|
41
49
|
"chalk": "^4.1.0",
|
|
42
50
|
"core-js": "^3.0.0",
|
|
43
|
-
"cssnano": "^
|
|
51
|
+
"cssnano": "^7.0.6",
|
|
44
52
|
"eslint": "^8.57.0",
|
|
45
53
|
"eslint-config-standard": "^17.0.0",
|
|
46
54
|
"eslint-plugin-import": "^2.19.1",
|
|
@@ -53,8 +61,9 @@
|
|
|
53
61
|
"quasar": "^2.16.0",
|
|
54
62
|
"rimraf": "^3.0.0",
|
|
55
63
|
"rollup": "^2.45.0",
|
|
56
|
-
"rtlcss": "^
|
|
64
|
+
"rtlcss": "^4.3.0",
|
|
57
65
|
"sass": "^1.33.0",
|
|
66
|
+
"typescript": "~5.5.3",
|
|
58
67
|
"uglify-js": "^3.13.3",
|
|
59
68
|
"vue": "^3.0.0",
|
|
60
69
|
"vue-router": "^4.0.0",
|
|
@@ -3,10 +3,10 @@ import type { MBtnProps } from '../../types'
|
|
|
3
3
|
import { useI18n } from 'vue-i18n'
|
|
4
4
|
import { computed } from 'vue'
|
|
5
5
|
import { extend } from 'quasar'
|
|
6
|
-
import {
|
|
6
|
+
import { myth } from '../../utils/myth'
|
|
7
7
|
|
|
8
8
|
const props = defineProps<MBtnProps>()
|
|
9
|
-
const options = computed(() =>
|
|
9
|
+
const options = computed(() => myth.options.value.btn ?? {})
|
|
10
10
|
const { t, te } = useI18n({ useScope: 'global' })
|
|
11
11
|
const getLabel = computed(() => {
|
|
12
12
|
if (props.label !== undefined) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { MBlockProps } from '../../types'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
|
-
import MythOptions from '../../utils'
|
|
4
|
+
import MythOptions from '../../utils/myth'
|
|
5
5
|
import { extend } from 'quasar'
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -15,7 +15,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
15
15
|
rounded: !1,
|
|
16
16
|
shadow: 'none'
|
|
17
17
|
})
|
|
18
|
-
const block = computed(() => MythOptions.
|
|
18
|
+
const block = computed(() => MythOptions.options.value.block ?? {})
|
|
19
19
|
const options = computed<Props>(() => extend(!0, { ...props }, block.value))
|
|
20
20
|
defineOptions({
|
|
21
21
|
name: 'MBlock',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
setup
|
|
4
4
|
>
|
|
5
5
|
import { computed } from 'vue'
|
|
6
|
-
import { uniq } from 'lodash'
|
|
6
|
+
// import { uniq } from 'lodash'
|
|
7
7
|
import type { MColProps } from '../../types'
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
@@ -44,7 +44,8 @@ const classes = computed(() => {
|
|
|
44
44
|
if (list.length === 1 && props.col !== !1) {
|
|
45
45
|
list.push('col')
|
|
46
46
|
}
|
|
47
|
-
return uniq(list)
|
|
47
|
+
// return uniq(list)
|
|
48
|
+
return list
|
|
48
49
|
})
|
|
49
50
|
defineOptions({
|
|
50
51
|
name: 'MCol',
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
10
|
import type { MContainerProps } from '../../types'
|
|
11
|
-
import MythOptions from '../../utils'
|
|
11
|
+
import MythOptions from '../../utils/myth'
|
|
12
12
|
import { computed } from 'vue'
|
|
13
13
|
|
|
14
14
|
interface Props {
|
|
@@ -18,7 +18,7 @@ interface Props {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const props = defineProps<Props>()
|
|
21
|
-
const styles = computed(() => MythOptions.
|
|
21
|
+
const styles = computed(() => MythOptions.options.value?.style ?? {})
|
|
22
22
|
const sizeProp = computed(() => {
|
|
23
23
|
if (props.size !== undefined) {
|
|
24
24
|
return props.size
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
>
|
|
5
5
|
import type { MRowProps } from '../../types'
|
|
6
6
|
import { computed } from 'vue'
|
|
7
|
-
import MythOptions from '../../utils'
|
|
7
|
+
import MythOptions from '../../utils/myth'
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
gutter?: MRowProps['gutter'];
|
|
@@ -12,7 +12,7 @@ interface Props {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const props = defineProps<Props>()
|
|
15
|
-
const defSize = computed<string>(() => MythOptions.
|
|
15
|
+
const defSize = computed<string>(() => MythOptions.options.value.style?.gutters || '')
|
|
16
16
|
const gutterSize = computed<string>(() => props.gutter === !0 ? defSize.value : (props.gutter || defSize.value))
|
|
17
17
|
const colSize = computed<string>(() => props.gutter === !0 ? defSize.value : (props.gutter || defSize.value))
|
|
18
18
|
defineOptions({
|
package/src/index.common.js
CHANGED
package/src/index.esm.js
CHANGED
package/src/index.umd.js
CHANGED
package/src/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './components'
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './myth'
|
|
@@ -2,7 +2,7 @@ import type { QBtnProps } from 'quasar'
|
|
|
2
2
|
import type { Ref } from 'vue'
|
|
3
3
|
import type { MBlockProps, StyleSize } from './components'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface UiOptionsContext {
|
|
6
6
|
/**
|
|
7
7
|
* Style of the components.
|
|
8
8
|
*/
|
|
@@ -34,11 +34,9 @@ export interface UiOptions {
|
|
|
34
34
|
block?: Partial<MBlockProps>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export interface
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
withBtnDefaults: (values: Partial<QBtnProps>) => void;
|
|
43
|
-
btnDefaults: () => UiOptions;
|
|
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;
|
|
44
42
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { App } from 'vue'
|
|
2
|
+
import { name, version } from '../../package.json'
|
|
3
|
+
import { myth } from './myth'
|
|
4
|
+
import MBtn from '../components/form/MBtn.vue'
|
|
5
|
+
import MBlock from '../components/grid/MBlock.vue'
|
|
6
|
+
import MCol from '../components/grid/MCol.vue'
|
|
7
|
+
import MColumn from '../components/grid/MColumn.vue'
|
|
8
|
+
import MContainer from '../components/grid/MContainer.vue'
|
|
9
|
+
import MHelpRow from '../components/grid/MHelpRow.vue'
|
|
10
|
+
import MRow from '../components/grid/MRow.vue'
|
|
11
|
+
import MTypingString from '../components/typography/MTypingString.vue'
|
|
12
|
+
|
|
13
|
+
function install (app: App, options = {}) {
|
|
14
|
+
myth.withOptions(options)
|
|
15
|
+
|
|
16
|
+
// Form.
|
|
17
|
+
app.component('MBtn', MBtn)
|
|
18
|
+
|
|
19
|
+
// Grid.
|
|
20
|
+
app.component('MBlock', MBlock)
|
|
21
|
+
app.component('MCol', MCol)
|
|
22
|
+
app.component('MColumn', MColumn)
|
|
23
|
+
app.component('MContainer', MContainer)
|
|
24
|
+
app.component('MHelpRow', MHelpRow)
|
|
25
|
+
app.component('MRow', MRow)
|
|
26
|
+
|
|
27
|
+
// Typography.
|
|
28
|
+
app.component('MTypingString', MTypingString)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
name,
|
|
33
|
+
version,
|
|
34
|
+
install,
|
|
35
|
+
myth
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name,
|
|
40
|
+
version,
|
|
41
|
+
install,
|
|
42
|
+
myth
|
|
43
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
package/src/utils.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ref } from 'vue'
|
|
2
|
-
import type { QBtnProps } from 'quasar'
|
|
3
|
-
import { extend } from 'quasar'
|
|
4
|
-
import type { UiOptions } from './types'
|
|
5
|
-
|
|
6
|
-
const defGutters = 'md'
|
|
7
|
-
const defaultOptions: UiOptions = {
|
|
8
|
-
style: {
|
|
9
|
-
gutters: defGutters
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
const cmDefaults = ref<UiOptions>({ ...defaultOptions })
|
|
13
|
-
const MythOptions = {
|
|
14
|
-
defaults: cmDefaults,
|
|
15
|
-
setDefaults (values: Partial<UiOptions>) {
|
|
16
|
-
cmDefaults.value = extend(!0, defaultOptions, values)
|
|
17
|
-
},
|
|
18
|
-
withDefaults (values: Partial<UiOptions>) {
|
|
19
|
-
cmDefaults.value = extend(!0, defaultOptions, cmDefaults.value, values)
|
|
20
|
-
},
|
|
21
|
-
withBtnDefaults (values: Partial<QBtnProps>) {
|
|
22
|
-
cmDefaults.value = {
|
|
23
|
-
...cmDefaults.value,
|
|
24
|
-
btn: {
|
|
25
|
-
...cmDefaults.value.btn,
|
|
26
|
-
props: { ...values }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default MythOptions
|
|
33
|
-
export { MythOptions }
|
package/src/vue-plugin.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import js from '../package.json'
|
|
2
|
-
import { MythOptions } from './utils'
|
|
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
|
-
|
|
12
|
-
const name = js.name
|
|
13
|
-
const version = js.version
|
|
14
|
-
|
|
15
|
-
function install (app, options = {}) {
|
|
16
|
-
MythOptions.withDefaults(options)
|
|
17
|
-
// Form.
|
|
18
|
-
app.component('MBtn', MBtn)
|
|
19
|
-
|
|
20
|
-
// Grid.
|
|
21
|
-
app.component('MBlock', MBlock)
|
|
22
|
-
app.component('MCol', MCol)
|
|
23
|
-
app.component('MColumn', MColumn)
|
|
24
|
-
app.component('MContainer', MContainer)
|
|
25
|
-
app.component('MHelpRow', MHelpRow)
|
|
26
|
-
app.component('MRow', MRow)
|
|
27
|
-
|
|
28
|
-
// Typography.
|
|
29
|
-
app.component('MTypingString', MTypingString)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
name,
|
|
34
|
-
version,
|
|
35
|
-
install
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
name,
|
|
40
|
-
version,
|
|
41
|
-
install,
|
|
42
|
-
MythOptions
|
|
43
|
-
}
|