@mythpe/quasar-ui-qui 0.0.39 → 0.0.41
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.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"description": "MyTh Quasar UI Kit App Extension",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "MyTh Ahmed Faiz",
|
|
@@ -49,18 +49,18 @@
|
|
|
49
49
|
"@types/express": "^5.0.0",
|
|
50
50
|
"@types/lodash": "^4.17.13",
|
|
51
51
|
"@types/node": "^22.10.1",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
53
|
-
"@typescript-eslint/parser": "^
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
53
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
54
54
|
"autoprefixer": "^10.4.20",
|
|
55
55
|
"chalk": "^5.3.0",
|
|
56
56
|
"core-js": "^3.39.0",
|
|
57
57
|
"cssnano": "^7.0.6",
|
|
58
|
-
"eslint": "^
|
|
59
|
-
"eslint-config-standard": "^17.
|
|
60
|
-
"eslint-plugin-import": "^2.
|
|
61
|
-
"eslint-plugin-n": "^
|
|
62
|
-
"eslint-plugin-promise": "^
|
|
63
|
-
"eslint-plugin-vue": "^9.
|
|
58
|
+
"eslint": "^8.57.0",
|
|
59
|
+
"eslint-config-standard": "^17.0.0",
|
|
60
|
+
"eslint-plugin-import": "^2.19.1",
|
|
61
|
+
"eslint-plugin-n": "^15.0.0",
|
|
62
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
63
|
+
"eslint-plugin-vue": "^9.0.0",
|
|
64
64
|
"fs-extra": "^11.2.0",
|
|
65
65
|
"open": "^10.1.0",
|
|
66
66
|
"postcss": "^8.4.49",
|
|
@@ -169,7 +169,7 @@ const btnLoading = computed(() => myth.btnLoading.value)
|
|
|
169
169
|
const getLabel = computed<string | undefined>(() => props.label ? (__(props.label) ?? undefined) : undefined)
|
|
170
170
|
const getSize = computed<string>(() => myth.btnLoading.value?.size || '20px')
|
|
171
171
|
const getColor = computed<string | undefined>(() => myth.btnLoading.value?.color || undefined)
|
|
172
|
-
const { attrs } = useBindInput<QBtnProps & { name: string }>(() => props, 'btn')
|
|
172
|
+
const { theme, attrs } = useBindInput<QBtnProps & { name: string }>(() => props, 'btn')
|
|
173
173
|
defineOptions({
|
|
174
174
|
name: 'MBtn',
|
|
175
175
|
inheritAttrs: !1
|
|
@@ -179,8 +179,8 @@ defineOptions({
|
|
|
179
179
|
<template>
|
|
180
180
|
<q-btn
|
|
181
181
|
v-bind="{
|
|
182
|
-
...$
|
|
183
|
-
...
|
|
182
|
+
...$attrs,
|
|
183
|
+
...theme,
|
|
184
184
|
label: loading ? `${getLabel} ...` : getLabel,
|
|
185
185
|
ariaLabel: 'ariaLabel' in attrs && attrs.ariaLabel ? __(attrs.ariaLabel) : getLabel
|
|
186
186
|
}"
|
|
@@ -19,11 +19,6 @@ import { QCheckbox, QField } from 'quasar'
|
|
|
19
19
|
const props = withDefaults(defineProps<Props>(), {
|
|
20
20
|
name: '',
|
|
21
21
|
label: undefined,
|
|
22
|
-
toggleIndeterminate: undefined,
|
|
23
|
-
leftLabel: undefined,
|
|
24
|
-
keepColor: undefined,
|
|
25
|
-
dark: undefined,
|
|
26
|
-
dense: undefined,
|
|
27
22
|
disable: undefined,
|
|
28
23
|
viewMode: undefined,
|
|
29
24
|
auto: undefined,
|
|
@@ -42,8 +37,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
42
37
|
})
|
|
43
38
|
defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
44
39
|
const { __ } = useMyth()
|
|
45
|
-
const helper = useBindInput<
|
|
46
|
-
const { getLabel,
|
|
40
|
+
const helper = useBindInput<Props>(() => props, 'checkbox')
|
|
41
|
+
const { getLabel, inputRules, theme } = helper
|
|
47
42
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
48
43
|
syncVModel: !0,
|
|
49
44
|
label: getLabel,
|
|
@@ -96,11 +91,11 @@ defineOptions({
|
|
|
96
91
|
<MCol v-bind="colProps">
|
|
97
92
|
<q-field
|
|
98
93
|
v-bind="{
|
|
99
|
-
...$
|
|
100
|
-
...
|
|
101
|
-
error
|
|
94
|
+
...$attrs,
|
|
95
|
+
...theme,
|
|
96
|
+
error: !!errorMessage,
|
|
102
97
|
errorMessage,
|
|
103
|
-
hint:__(hint),
|
|
98
|
+
hint: __(hint),
|
|
104
99
|
borderless: !0,
|
|
105
100
|
outlined: !1,
|
|
106
101
|
stackLabel: !0
|
|
@@ -109,10 +104,10 @@ defineOptions({
|
|
|
109
104
|
<q-checkbox
|
|
110
105
|
ref="input"
|
|
111
106
|
v-bind="{
|
|
112
|
-
...$
|
|
113
|
-
...
|
|
114
|
-
modelValue:value,
|
|
115
|
-
disable:viewMode,
|
|
107
|
+
...$attrs,
|
|
108
|
+
...theme,
|
|
109
|
+
modelValue: value,
|
|
110
|
+
disable: viewMode === !0 ? viewMode : disable,
|
|
116
111
|
label: undefined,
|
|
117
112
|
}"
|
|
118
113
|
v-on="listeners"
|
|
@@ -23,10 +23,10 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
|
|
|
23
23
|
})
|
|
24
24
|
|
|
25
25
|
const { themeBtn, themeInput, props: pluginProps } = myth
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
for (const k in
|
|
29
|
-
|
|
26
|
+
const themeStyle = computed(() => (key === 'btn' ? themeBtn.value : themeInput.value) ?? {})
|
|
27
|
+
const theme = ref({})
|
|
28
|
+
for (const k in themeStyle.value) {
|
|
29
|
+
theme.value[k] = props[k] !== undefined ? props[k] : themeStyle.value[k]
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Top Label Style.
|
|
@@ -35,8 +35,8 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
|
|
|
35
35
|
if (props.topLabel !== undefined) {
|
|
36
36
|
return props.topLabel !== !1
|
|
37
37
|
}
|
|
38
|
-
if ('topLabel' in
|
|
39
|
-
return
|
|
38
|
+
if ('topLabel' in themeStyle.value && themeStyle.value.topLabel !== undefined) {
|
|
39
|
+
return themeStyle.value.topLabel !== !1
|
|
40
40
|
}
|
|
41
41
|
if (pluginProps.value[key] && 'topLabel' in pluginProps.value[key]) {
|
|
42
42
|
return pluginProps.value[key]?.topLabel !== !1
|
|
@@ -195,7 +195,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
|
|
|
195
195
|
const attrs = computed(() => ({
|
|
196
196
|
...props,
|
|
197
197
|
...attributes,
|
|
198
|
-
...
|
|
198
|
+
...theme.value
|
|
199
199
|
}))
|
|
200
200
|
return {
|
|
201
201
|
inputRules,
|
|
@@ -205,6 +205,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
|
|
|
205
205
|
getPlaceholder,
|
|
206
206
|
getAutocompleteAttribute,
|
|
207
207
|
getProp,
|
|
208
|
-
attrs
|
|
208
|
+
attrs,
|
|
209
|
+
theme
|
|
209
210
|
}
|
|
210
211
|
}
|
package/src/types/theme.d.ts
CHANGED
|
@@ -5,8 +5,37 @@ export type ThemeShadow = string | number | 'transition' | 'none';
|
|
|
5
5
|
export type ThemeRounded = boolean;
|
|
6
6
|
export type ThemeFluid = boolean;
|
|
7
7
|
export type ThemeInput =
|
|
8
|
-
Partial<Pick<QInputProps, 'standout'
|
|
8
|
+
Partial<Pick<QInputProps, 'standout'
|
|
9
|
+
| 'dense'
|
|
10
|
+
| 'filled'
|
|
11
|
+
| 'outlined'
|
|
12
|
+
| 'rounded'
|
|
13
|
+
| 'borderless'
|
|
14
|
+
| 'counter'
|
|
15
|
+
| 'noErrorIcon'
|
|
16
|
+
| 'hideBottomSpace'
|
|
17
|
+
| 'bottomSlots'
|
|
18
|
+
| 'clearIcon'
|
|
19
|
+
| 'itemAligned'
|
|
20
|
+
| 'square'
|
|
21
|
+
| 'stackLabel'
|
|
22
|
+
| 'color'
|
|
23
|
+
| 'textColor'
|
|
24
|
+
>>
|
|
9
25
|
& {
|
|
10
26
|
topLabel?: boolean;
|
|
11
27
|
}
|
|
12
|
-
export type ThemeBtn = Partial<Pick<QBtnProps, 'flat'
|
|
28
|
+
export type ThemeBtn = Partial<Pick<QBtnProps, 'flat'
|
|
29
|
+
| 'outline'
|
|
30
|
+
| 'push'
|
|
31
|
+
| 'unelevated'
|
|
32
|
+
| 'noCaps'
|
|
33
|
+
| 'rounded'
|
|
34
|
+
| 'glossy'
|
|
35
|
+
| 'square'
|
|
36
|
+
| 'padding'
|
|
37
|
+
| 'ripple'
|
|
38
|
+
| 'dense'
|
|
39
|
+
| 'color'
|
|
40
|
+
| 'textColor'
|
|
41
|
+
>>
|