@mythpe/quasar-ui-qui 0.0.17 → 0.0.18-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/jsconfig.json +10 -0
- package/package.json +15 -8
- package/src/boot/register.ts +14 -0
- package/src/components/form/MBtn.vue +14 -3
- package/src/components/form/MInput.vue +178 -0
- package/src/components/form/MInputFieldControl.vue +24 -0
- package/src/components/form/MInputLabel.vue +31 -0
- package/src/components/form/index.ts +14 -0
- package/src/components/grid/MBlock.vue +10 -2
- package/src/components/grid/MCol.vue +11 -3
- package/src/components/grid/MColumn.vue +8 -0
- package/src/components/grid/MContainer.vue +2 -2
- package/src/components/grid/MHelpRow.vue +2 -3
- package/src/components/grid/MRow.vue +10 -2
- package/src/components/grid/index.ts +16 -0
- package/src/components/index.ts +11 -0
- package/src/components/typography/MTypingString.vue +8 -0
- package/src/components/typography/index.ts +10 -0
- package/src/composable/index.ts +10 -0
- package/src/composable/useHelpersMyth.ts +178 -0
- package/src/composable/useMyth.ts +17 -0
- package/src/index.common.js +17 -4
- package/src/index.d.ts +9 -0
- package/src/index.esm.js +17 -4
- package/src/index.js +19 -0
- package/src/index.sass +8 -0
- package/src/index.umd.js +15 -4
- package/src/types/components.d.ts +166 -10
- package/src/types/index.d.ts +72 -1
- package/src/utils/index.ts +10 -0
- package/src/utils/myth.ts +37 -0
- package/src/utils/vue-plugin.ts +45 -0
- package/tsconfig.json +9 -4
- package/index.d.ts +0 -6
- package/src/types/VuePlugin.d.ts +0 -44
- package/src/utils.ts +0 -33
- package/src/vue-plugin.js +0 -43
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import type { App } from 'vue'
|
|
10
|
+
import { name, version } from '../../package.json'
|
|
11
|
+
import { myth } from './myth'
|
|
12
|
+
import { MBlock, MBtn, MCol, MColumn, MContainer, MHelpRow, MInput, MInputFieldControl, MInputLabel, MRow, MTypingString } from '../components'
|
|
13
|
+
|
|
14
|
+
function install (app: App, options = {}) {
|
|
15
|
+
myth.withOptions(options)
|
|
16
|
+
|
|
17
|
+
// Form.
|
|
18
|
+
app.component('MBtn', MBtn)
|
|
19
|
+
app.component('MInput', MInput)
|
|
20
|
+
app.component('MInputFieldControl', MInputFieldControl)
|
|
21
|
+
app.component('MInputLabel', MInputLabel)
|
|
22
|
+
|
|
23
|
+
// Grid.
|
|
24
|
+
app.component('MBlock', MBlock)
|
|
25
|
+
app.component('MCol', MCol)
|
|
26
|
+
app.component('MColumn', MColumn)
|
|
27
|
+
app.component('MContainer', MContainer)
|
|
28
|
+
app.component('MHelpRow', MHelpRow)
|
|
29
|
+
app.component('MRow', MRow)
|
|
30
|
+
|
|
31
|
+
// Typography.
|
|
32
|
+
app.component('MTypingString', MTypingString)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
name,
|
|
37
|
+
version,
|
|
38
|
+
install
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
name,
|
|
43
|
+
version,
|
|
44
|
+
install
|
|
45
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"resolveJsonModule": true,
|
|
8
8
|
"moduleDetection": "force",
|
|
9
9
|
"isolatedModules": true,
|
|
10
|
-
"verbatimModuleSyntax": true,
|
|
11
10
|
"module": "preserve",
|
|
12
11
|
"noEmit": true,
|
|
13
12
|
"lib": [
|
|
@@ -19,10 +18,16 @@
|
|
|
19
18
|
"allowUnreachableCode": false,
|
|
20
19
|
"allowUnusedLabels": false,
|
|
21
20
|
"noImplicitOverride": true,
|
|
22
|
-
"exactOptionalPropertyTypes":
|
|
23
|
-
"noUncheckedIndexedAccess": true
|
|
21
|
+
"exactOptionalPropertyTypes": false,
|
|
22
|
+
"noUncheckedIndexedAccess": true
|
|
24
23
|
},
|
|
24
|
+
"include": [
|
|
25
|
+
"./**/*.d.ts",
|
|
26
|
+
"./**/*"
|
|
27
|
+
],
|
|
25
28
|
"exclude": [
|
|
26
|
-
"./build"
|
|
29
|
+
"./build",
|
|
30
|
+
"./dist",
|
|
31
|
+
"./node_modules",
|
|
27
32
|
]
|
|
28
33
|
}
|
package/index.d.ts
DELETED
package/src/types/VuePlugin.d.ts
DELETED
|
@@ -1,44 +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 UiOptions {
|
|
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 MythOptionsContext {
|
|
38
|
-
defaults: Ref<UiOptions>;
|
|
39
|
-
getDefaults: () => UiOptions;
|
|
40
|
-
setDefaults: (values: Partial<UiOptions>) => void;
|
|
41
|
-
withDefaults: (values: Partial<UiOptions>) => void;
|
|
42
|
-
withBtnDefaults: (values: Partial<QBtnProps>) => void;
|
|
43
|
-
btnDefaults: () => UiOptions;
|
|
44
|
-
}
|
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
|
-
}
|