@mythpe/quasar-ui-qui 0.0.22 → 0.0.23-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 +13 -0
- package/package.json +10 -8
- package/src/boot/register.ts +14 -0
- package/src/components/form/MBtn.vue +13 -2
- package/src/components/form/MInput.vue +181 -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 +9 -1
- package/src/components/grid/MColumn.vue +8 -0
- package/src/components/grid/MContainer.vue +2 -2
- package/src/components/grid/MHelpRow.vue +6 -4
- 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 +179 -0
- package/src/composable/useMyth.ts +17 -0
- package/src/index.common.js +19 -1
- package/src/index.esm.js +18 -3
- package/src/index.js +19 -0
- package/src/index.sass +8 -0
- package/src/index.ts +18 -4
- package/src/index.umd.js +16 -2
- package/src/types/components.d.ts +166 -10
- package/src/types/index.d.ts +72 -1
- package/src/utils/index.ts +11 -0
- package/src/{myth.ts → utils/myth.ts} +10 -3
- package/src/utils/vee-rules.ts +31 -0
- package/src/utils/vue-plugin.ts +45 -0
- package/tsconfig.json +8 -9
- package/src/types/myth.ts +0 -42
- package/src/vue-plugin.ts +0 -41
- package/types.d.ts +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
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 lodash from 'lodash'
|
|
10
|
+
import { patterns } from 'quasar'
|
|
11
|
+
|
|
12
|
+
const { testPattern } = patterns
|
|
13
|
+
|
|
14
|
+
export const veeRules = {
|
|
15
|
+
float: (v: any) => lodash.isNumber(parseInt(v)) && !isNaN(parseInt(v)) && v?.toString().split('.')?.length <= 2 && (/(\d)+/g.test(v) && !/[a-zA-Z]/.test(
|
|
16
|
+
v)),
|
|
17
|
+
date: (v: any) => /^-?[\d]+-[0-1]\d-[0-3]\d$/.test(v),
|
|
18
|
+
time: (v: any) => testPattern.time(v),
|
|
19
|
+
fulltime: (v: any) => testPattern.fulltime(v),
|
|
20
|
+
timeOrFulltime: (v: any) => testPattern.timeOrFulltime(v),
|
|
21
|
+
hexColor: (v: any) => testPattern.hexColor(v),
|
|
22
|
+
hexaColor: (v: any) => testPattern.hexaColor(v),
|
|
23
|
+
hexOrHexaColor: (v: any) => testPattern.hexOrHexaColor(v),
|
|
24
|
+
rgbColor: (v: any) => testPattern.rgbColor(v),
|
|
25
|
+
rgbaColor: (v: any) => testPattern.rgbaColor(v),
|
|
26
|
+
rgbOrRgbaColor: (v: any) => testPattern.rgbOrRgbaColor(v),
|
|
27
|
+
hexOrRgbColor: (v: any) => testPattern.hexOrRgbColor(v),
|
|
28
|
+
hexaOrRgbaColor: (v: any) => testPattern.hexaOrRgbaColor(v),
|
|
29
|
+
color: (v: any) => !v ? !0 : testPattern.anyColor(v),
|
|
30
|
+
requiredColor: (v: any) => testPattern.anyColor(v)
|
|
31
|
+
}
|
|
@@ -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
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"baseUrl": "./",
|
|
4
|
-
"rootDir": ".",
|
|
5
|
-
"outDir": "./dist",
|
|
6
3
|
"esModuleInterop": true,
|
|
7
4
|
"skipLibCheck": true,
|
|
8
5
|
"target": "esnext",
|
|
@@ -10,7 +7,6 @@
|
|
|
10
7
|
"resolveJsonModule": true,
|
|
11
8
|
"moduleDetection": "force",
|
|
12
9
|
"isolatedModules": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
10
|
"module": "preserve",
|
|
15
11
|
"noEmit": true,
|
|
16
12
|
"lib": [
|
|
@@ -22,13 +18,16 @@
|
|
|
22
18
|
"allowUnreachableCode": false,
|
|
23
19
|
"allowUnusedLabels": false,
|
|
24
20
|
"noImplicitOverride": true,
|
|
25
|
-
"exactOptionalPropertyTypes":
|
|
21
|
+
"exactOptionalPropertyTypes": false,
|
|
26
22
|
"noUncheckedIndexedAccess": true
|
|
27
23
|
},
|
|
28
|
-
"exclude": [
|
|
29
|
-
"./build"
|
|
30
|
-
],
|
|
31
24
|
"include": [
|
|
32
|
-
"
|
|
25
|
+
"./**/*.d.ts",
|
|
26
|
+
"./**/*"
|
|
27
|
+
],
|
|
28
|
+
"exclude": [
|
|
29
|
+
"./build",
|
|
30
|
+
"./dist",
|
|
31
|
+
"./node_modules",
|
|
33
32
|
]
|
|
34
33
|
}
|
package/src/types/myth.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/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/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/types'
|